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

Memory leak in binlog_event_deserialize

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 8.0
    • Fix Version/s: 8.0.13-3
    • Component/s: None

      Description

      Seen on several MTR testcases with Valgrind or LeakSanitizer, e.g.

      worker[1] Sanitizer report from /home/laurynas/percona/obj-percona-8.0-debug-san/mysql-test/var/log/mysqld.3.err after tests:
       rpl_nogtid.rpl_heartbeat_2slaves
      --------------------------------------------------------------------------
      ==568==ERROR: LeakSanitizer: detected memory leaks
      
      Direct leak of 832 byte(s) in 2 object(s) allocated from:
          #0 0x7f8fb6841f30 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xedf30)
          #1 0x55fbf613609d in my_raw_malloc /home/laurynas/percona/percona-8.0/mysys/my_malloc.cc:199
          #2 0x55fbf613621b in my_malloc(unsigned int, unsigned long, int) /home/laurynas/percona/percona-8.0/mysys/my_malloc.cc:81
          #3 0x55fbf4facce7 in Log_event::operator new(unsigned long) /home/laurynas/percona/percona-8.0/sql/log_event.cc:999
          #4 0x55fbf519f747 in binlog_event_deserialize(unsigned char const*, unsigned int, binary_log::Format_description_event const*, bool, Log_event**, bool) /home/laurynas/percona/percona-8.0/sql/binlog_reader.cc:297
          #5 0x55fbf522a54f in Binlog_sender::send_format_description_event(Basic_binlog_file_reader<Binlog_ifile, Binlog_event_data_istream, Binlog_event_object_istream, Binlog_sender::Event_allocator>*, unsigned long long) /home/laurynas/percona/percona-8.0/sql/rpl_binlog_sender.cc:1061
          #6 0x55fbf522aedd in Binlog_sender::send_binlog(Basic_binlog_file_reader<Binlog_ifile, Binlog_event_data_istream, Binlog_event_object_istream, Binlog_sender::Event_allocator>*, unsigned long long) /home/laurynas/percona/percona-8.0/sql/rpl_binlog_sender.cc:366
          #7 0x55fbf523029e in Binlog_sender::run() /home/laurynas/percona/percona-8.0/sql/rpl_binlog_sender.cc:286
          #8 0x55fbf5215c56 in mysql_binlog_send(THD*, char*, unsigned long long, Gtid_set*, unsigned int) /home/laurynas/percona/percona-8.0/sql/rpl_master.cc:1009
          #9 0x55fbf5219529 in com_binlog_dump(THD*, char*, unsigned long) /home/laurynas/percona/percona-8.0/sql/rpl_master.cc:937
          #10 0x55fbf1c653f1 in dispatch_command(THD*, COM_DATA const*, enum_server_command) /home/laurynas/percona/percona-8.0/sql/sql_parse.cc:1938
          #11 0x55fbf1c6ae11 in do_command(THD*) /home/laurynas/percona/percona-8.0/sql/sql_parse.cc:1290
          #12 0x55fbf238bdc0 in handle_connection /home/laurynas/percona/percona-8.0/sql/conn_handler/connection_handler_per_thread.cc:317
          #13 0x55fbf6216b17 in pfs_spawn_thread /home/laurynas/percona/percona-8.0/storage/perfschema/pfs.cc:2836
          #14 0x7f8fb673b163 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8163
      

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  robert.golebiowski Robert Golebiowski
                  Reporter:
                  laurynas.biveinis Laurynas Biveinis
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 hour
                    1h