Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-5921

Detect memory leaks on stage of bootstrap if PS was built with '-DWITH_ASAN'

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 8.0.16-7, Not 5.6.x, Not 5.7.x
    • Fix Version/s: 8.0.17-8
    • Component/s: None
    • Labels:

      Description

      Hi,

      While working on task https://jira.percona.com/browse/JEN-960 I found that mtr tests do not work at all in case PS is built with '-DWITH_ASAN'.

      https://ps3.cd.percona.com/view/8.0/job/percona-server-8.0-pipeline/2023/

      The 'bootstrap' log contains the following:

      2019-08-27T11:52:52.398112Z 0 [System] [MY-013170] [Server] /mnt/jenkins/ps-build/build/PS/bin/mysqld (mysqld 8.0.16-7-asan) initializing of server has completed
      
      =================================================================
      ==27365==ERROR: LeakSanitizer: detected memory leaks
      
      Direct leak of 104 byte(s) in 1 object(s) allocated from:
          #0 0x7f9f4eb76ed8 in operator new(unsigned long, std::nothrow_t const&) (/lib64/libasan.so.5+0xefed8)
          #1 0x44266e0 in dd::Properties::parse_properties(std::basic_string<char, std::char_traits<char>, Stateless_allocator<char, dd::String_type_alloc, My_free_functor> > const&) ../../sources/sql/dd/impl/properties_impl.cc:48
          #2 0x44687f5 in dd::bootstrap::DDSE_dict_init(THD*, dict_init_mode_t, unsigned int) ../../sources/sql/dd/impl/bootstrap/bootstrapper.cc:752
          #3 0x446dbb7 in dd::bootstrap::initialize(THD*) ../../sources/sql/dd/impl/bootstrap/bootstrapper.cc:921
          #4 0x2d93e30 in handle_bootstrap ../../sources/sql/bootstrap.cc:347
          #5 0x4a9382e in pfs_spawn_thread ../../../sources/storage/perfschema/pfs.cc:2836
          #6 0x7f9f4e872dd4 in start_thread (/lib64/libpthread.so.0+0x7dd4)
      
      SUMMARY: AddressSanitizer: 104 byte(s) leaked in 1 allocation(s).
      safe_process[27364]: Child process: 27365, exit: 1
      

      P.S. full log is in the attachment.

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                yura.sorokin Yura Sorokin
                Reporter:
                slava.sarzhan Slava Sarzhan
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 5 hours, 45 minutes
                  5h 45m