Memory leak on a failure to create a MTS worker thread

Bug #1675716 reported by Laurynas Biveinis on 2017-03-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Invalid
Undecided
Unassigned
5.6
Fix Released
High
Laurynas Biveinis
5.7
Fix Released
High
Laurynas Biveinis

Bug Description

On 5.6 trunk:

worker[4] Valgrind report from /mnt/workspace/percona-server-5.6-valgrind/BUILD_TYPE/valgrind/Host/ubuntu-xenial-64bit/build/mysql-test/var/4/log/mysqld.2.err after tests:
 rpl.rpl_mts_debug
--------------------------------------------------------------------------
HEAP SUMMARY:
    in use at exit: 69,329,568 bytes in 1,265 blocks
  total heap usage: 133,173 allocs, 131,908 frees, 390,044,816 bytes allocated

6 bytes in 1 blocks are possibly lost in loss record 1 of 438
   at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0xB35EC6: my_malloc (my_malloc.c:38)
   by 0xB0C126: Rpl_info_table::Rpl_info_table(unsigned int, char const*, char const*) (rpl_info_table.cc:28)
   by 0xB01AED: Rpl_info_factory::init_repositories(Rpl_info_factory::struct_table_data, Rpl_info_factory::struct_file_data, unsigned int, unsigned int, Rpl_info_handler**, Rpl_info_handler**, char const**) (rpl_info_factory.cc:873)
   by 0xB00CB5: Rpl_info_factory::create_worker(unsigned int, unsigned int, Relay_log_info*, bool) (rpl_info_factory.cc:404)
   by 0xAE9C50: slave_start_single_worker(Relay_log_info*, unsigned long) (rpl_slave.cc:5931)
   by 0xAEA175: slave_start_workers(Relay_log_info*, unsigned long, bool*) (rpl_slave.cc:6057)
   by 0xAEAB81: handle_slave_sql (rpl_slave.cc:6264)
   by 0xF1CAAB: pfs_spawn_thread (pfs.cc:1860)
   by 0x61596B9: start_thread (pthread_create.c:333)
   by 0x6D1D82C: clone (clone.S:109)
...
131,072 bytes in 1 blocks are possibly lost in loss record 407 of 438
   at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0xB35EC6: my_malloc (my_malloc.c:38)
   by 0xB0FAEE: init_dynamic_array2 (array.c:70)
   by 0xB03BDF: Slave_worker::init_worker(Relay_log_info*, unsigned long) (rpl_rli_pdb.cc:282)
   by 0xAE9C96: slave_start_single_worker(Relay_log_info*, unsigned long) (rpl_slave.cc:5938)
   by 0xAEA175: slave_start_workers(Relay_log_info*, unsigned long, bool*) (rpl_slave.cc:6057)
   by 0xAEAB81: handle_slave_sql (rpl_slave.cc:6264)
   by 0xF1CAAB: pfs_spawn_thread (pfs.cc:1860)
   by 0x61596B9: start_thread (pthread_create.c:333)
   by 0x6D1D82C: clone (clone.S:109)

LEAK SUMMARY:
   definitely lost: 0 bytes in 0 blocks
   indirectly lost: 0 bytes in 0 blocks
     possibly lost: 146,984 bytes in 16 blocks
   still reachable: 0 bytes in 0 blocks
                      of which reachable via heuristic:
                        newarray : 392 bytes in 1 blocks
        suppressed: 69,182,584 bytes in 1,249 blocks

This is a regression caused by bug 1619622 fix.

tags: added: regression valgrind

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1080

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers