Bug #78241 | Valgrind reports a memory leak on innodb.create_tablespace | ||
---|---|---|---|
Submitted: | 27 Aug 2015 10:24 | Modified: | 1 Sep 2015 9:48 |
Reporter: | Laurynas Biveinis (OCA) | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
Version: | 5.7.8 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | CREATE TABLESPACE, innodb, memory leak, valgrind |
[27 Aug 2015 10:24]
Laurynas Biveinis
[27 Aug 2015 10:43]
Laurynas Biveinis
The same and several more errors are reported on innodb.table_compress: innodb.table_compress [ pass ] 8688 worker[1] Valgrind report from /home/laurynas/obj-5.7-valgrind/mysql-test/var/log/mysqld.1.err after tests: innodb.table_compress -------------------------------------------------------------------------- HEAP SUMMARY: in use at exit: 20,082 bytes in 30 blocks total heap usage: 83,947 allocs, 83,917 frees, 401,322,593 bytes allocated Thread 1: 250 bytes in 7 blocks are indirectly lost in loss record 3 of 9 at 0x4C2BBA0: malloc (vg_replace_malloc.c:296) by 0x195306F: ut_allocator<unsigned char>::allocate(unsigned long, unsigned char const*, char const*, bool, bool) (ut0new.h:325) by 0x1C60A37: mem_strdup(char const*) (mem0mem.ic:578) by 0x1C61712: dict_mem_table_create(char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) (dict0mem.cc:130) by 0x1951188: create_table_info_t::create_table_def() (ha_innodb.cc:9358) by 0x193ECE7: create_table_info_t::create_table() (ha_innodb.cc:11108) by 0x193F963: ha_innobase::create(char const*, TABLE*, st_ha_create_information*) (ha_innodb.cc:11447) by 0xEB191F: handler::ha_create(char const*, TABLE*, st_ha_create_information*) (handler.cc:4669) by 0xEB1F82: ha_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, bool, bool) (handler.cc:4828) by 0x1620173: rea_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, List<Create_field>&, unsigned int, st_key*, handler*, bool) (unireg.cc:522) by 0x159D1E1: create_table_impl(THD*, char const*, char const*, char const*, st_ha_create_information*, Alter_info*, bool, unsigned int, bool, bool*, st_key**, unsigned int*) (sql_table.cc:5194) by 0x159D783: mysql_create_table_no_lock(THD*, char const*, char const*, st_ha_create_information*, Alter_info*, unsigned int, bool*) (sql_table.cc:5322) by 0x159D8A1: mysql_create_table(THD*, TABLE_LIST*, st_ha_create_information*, Alter_info*) (sql_table.cc:5368) by 0x15058FE: mysql_execute_command(THD*) (sql_parse.cc:2958) by 0x150C600: mysql_parse(THD*, Parser_state*) (sql_parse.cc:5255) by 0x150189B: dispatch_command(THD*, COM_DATA*, enum_server_command) (sql_parse.cc:1272) 1,320 bytes in 5 blocks are indirectly lost in loss record 4 of 9 at 0x4C2BBA0: malloc (vg_replace_malloc.c:296) by 0x195306F: ut_allocator<unsigned char>::allocate(unsigned long, unsigned char const*, char const*, bool, bool) (ut0new.h:325) by 0x19ED596: mem_heap_create_block_func(mem_block_info_t*, unsigned long, char const*, unsigned long, unsigned long) (mem0mem.cc:302) by 0x1C608C1: mem_heap_create_func(unsigned long, char const*, unsigned long, unsigned long) (mem0mem.ic:493) by 0x1C6165E: dict_mem_table_create(char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) (dict0mem.cc:115) by 0x1951188: create_table_info_t::create_table_def() (ha_innodb.cc:9358) by 0x193ECE7: create_table_info_t::create_table() (ha_innodb.cc:11108) by 0x193F963: ha_innobase::create(char const*, TABLE*, st_ha_create_information*) (ha_innodb.cc:11447) by 0xEB191F: handler::ha_create(char const*, TABLE*, st_ha_create_information*) (handler.cc:4669) by 0xEB1F82: ha_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, bool, bool) (handler.cc:4828) by 0x1620173: rea_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, List<Create_field>&, unsigned int, st_key*, handler*, bool) (unireg.cc:522) by 0x159D1E1: create_table_impl(THD*, char const*, char const*, char const*, st_ha_create_information*, Alter_info*, bool, unsigned int, bool, bool*, st_key**, unsigned int*) (sql_table.cc:5194) by 0x159D783: mysql_create_table_no_lock(THD*, char const*, char const*, st_ha_create_information*, Alter_info*, unsigned int, bool*) (sql_table.cc:5322) by 0x159D8A1: mysql_create_table(THD*, TABLE_LIST*, st_ha_create_information*, Alter_info*) (sql_table.cc:5368) by 0x15058FE: mysql_execute_command(THD*) (sql_parse.cc:2958) by 0x150C600: mysql_parse(THD*, Parser_state*) (sql_parse.cc:5255) 2,856 (816 direct, 2,040 indirect) bytes in 1 blocks are definitely lost in loss record 5 of 9 at 0x4C2BBA0: malloc (vg_replace_malloc.c:296) by 0x195306F: ut_allocator<unsigned char>::allocate(unsigned long, unsigned char const*, char const*, bool, bool) (ut0new.h:325) by 0x19ED596: mem_heap_create_block_func(mem_block_info_t*, unsigned long, char const*, unsigned long, unsigned long) (mem0mem.cc:302) by 0x19EDA1A: mem_heap_add_block(mem_block_info_t*, unsigned long) (mem0mem.cc:408) by 0x1C607A9: mem_heap_alloc(mem_block_info_t*, unsigned long) (mem0mem.ic:204) by 0x1C606BC: mem_heap_zalloc(mem_block_info_t*, unsigned long) (mem0mem.ic:173) by 0x1C61673: dict_mem_table_create(char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) (dict0mem.cc:118) by 0x1951188: create_table_info_t::create_table_def() (ha_innodb.cc:9358) by 0x193ECE7: create_table_info_t::create_table() (ha_innodb.cc:11108) by 0x193F963: ha_innobase::create(char const*, TABLE*, st_ha_create_information*) (ha_innodb.cc:11447) by 0xEB191F: handler::ha_create(char const*, TABLE*, st_ha_create_information*) (handler.cc:4669) by 0xEB1F82: ha_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, bool, bool) (handler.cc:4828) by 0x1620173: rea_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, List<Create_field>&, unsigned int, st_key*, handler*, bool) (unireg.cc:522) by 0x159D1E1: create_table_impl(THD*, char const*, char const*, char const*, st_ha_create_information*, Alter_info*, bool, unsigned int, bool, bool*, st_key**, unsigned int*) (sql_table.cc:5194) by 0x159D783: mysql_create_table_no_lock(THD*, char const*, char const*, st_ha_create_information*, Alter_info*, unsigned int, bool*) (sql_table.cc:5322) by 0x159D8A1: mysql_create_table(THD*, TABLE_LIST*, st_ha_create_information*, Alter_info*) (sql_table.cc:5368)
[27 Aug 2015 10:43]
Laurynas Biveinis
4,896 bytes in 6 blocks are indirectly lost in loss record 6 of 9 at 0x4C2BBA0: malloc (vg_replace_malloc.c:296) by 0x195306F: ut_allocator<unsigned char>::allocate(unsigned long, unsigned char const*, char const*, bool, bool) (ut0new.h:325) by 0x19ED596: mem_heap_create_block_func(mem_block_info_t*, unsigned long, char const*, unsigned long, unsigned long) (mem0mem.cc:302) by 0x19EDA1A: mem_heap_add_block(mem_block_info_t*, unsigned long) (mem0mem.cc:408) by 0x1C607A9: mem_heap_alloc(mem_block_info_t*, unsigned long) (mem0mem.ic:204) by 0x1C606BC: mem_heap_zalloc(mem_block_info_t*, unsigned long) (mem0mem.ic:173) by 0x1C61673: dict_mem_table_create(char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) (dict0mem.cc:118) by 0x1951188: create_table_info_t::create_table_def() (ha_innodb.cc:9358) by 0x193ECE7: create_table_info_t::create_table() (ha_innodb.cc:11108) by 0x193F963: ha_innobase::create(char const*, TABLE*, st_ha_create_information*) (ha_innodb.cc:11447) by 0xEB191F: handler::ha_create(char const*, TABLE*, st_ha_create_information*) (handler.cc:4669) by 0xEB1F82: ha_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, bool, bool) (handler.cc:4828) by 0x1620173: rea_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, List<Create_field>&, unsigned int, st_key*, handler*, bool) (unireg.cc:522) by 0x159D1E1: create_table_impl(THD*, char const*, char const*, char const*, st_ha_create_information*, Alter_info*, bool, unsigned int, bool, bool*, st_key**, unsigned int*) (sql_table.cc:5194) by 0x159D783: mysql_create_table_no_lock(THD*, char const*, char const*, st_ha_create_information*, Alter_info*, unsigned int, bool*) (sql_table.cc:5322) by 0x159D8A1: mysql_create_table(THD*, TABLE_LIST*, st_ha_create_information*, Alter_info*) (sql_table.cc:5368) 5,232 bytes in 3 blocks are indirectly lost in loss record 7 of 9 at 0x4C2BBA0: malloc (vg_replace_malloc.c:296) by 0x195306F: ut_allocator<unsigned char>::allocate(unsigned long, unsigned char const*, char const*, bool, bool) (ut0new.h:325) by 0x19ED596: mem_heap_create_block_func(mem_block_info_t*, unsigned long, char const*, unsigned long, unsigned long) (mem0mem.cc:302) by 0x19EDA1A: mem_heap_add_block(mem_block_info_t*, unsigned long) (mem0mem.cc:408) by 0x1C607A9: mem_heap_alloc(mem_block_info_t*, unsigned long) (mem0mem.ic:204) by 0x1C61816: dict_mem_table_create(char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) (dict0mem.cc:138) by 0x1951188: create_table_info_t::create_table_def() (ha_innodb.cc:9358) by 0x193ECE7: create_table_info_t::create_table() (ha_innodb.cc:11108) by 0x193F963: ha_innobase::create(char const*, TABLE*, st_ha_create_information*) (ha_innodb.cc:11447) by 0xEB191F: handler::ha_create(char const*, TABLE*, st_ha_create_information*) (handler.cc:4669) by 0xEB1F82: ha_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, bool, bool) (handler.cc:4828) by 0x1620173: rea_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, List<Create_field>&, unsigned int, st_key*, handler*, bool) (unireg.cc:522) by 0x159D1E1: create_table_impl(THD*, char const*, char const*, char const*, st_ha_create_information*, Alter_info*, bool, unsigned int, bool, bool*, st_key**, unsigned int*) (sql_table.cc:5194) by 0x159D783: mysql_create_table_no_lock(THD*, char const*, char const*, st_ha_create_information*, Alter_info*, unsigned int, bool*) (sql_table.cc:5322) by 0x159D8A1: mysql_create_table(THD*, TABLE_LIST*, st_ha_create_information*, Alter_info*) (sql_table.cc:5368) by 0x15058FE: mysql_execute_command(THD*) (sql_parse.cc:2958) 5,725 (528 direct, 5,197 indirect) bytes in 2 blocks are definitely lost in loss record 8 of 9 at 0x4C2BBA0: malloc (vg_replace_malloc.c:296) by 0x195306F: ut_allocator<unsigned char>::allocate(unsigned long, unsigned char const*, char const*, bool, bool) (ut0new.h:325) by 0x19ED596: mem_heap_create_block_func(mem_block_info_t*, unsigned long, char const*, unsigned long, unsigned long) (mem0mem.cc:302) by 0x1C608C1: mem_heap_create_func(unsigned long, char const*, unsigned long, unsigned long) (mem0mem.ic:493) by 0x1C6165E: dict_mem_table_create(char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) (dict0mem.cc:115) by 0x1951188: create_table_info_t::create_table_def() (ha_innodb.cc:9358) by 0x193ECE7: create_table_info_t::create_table() (ha_innodb.cc:11108) by 0x193F963: ha_innobase::create(char const*, TABLE*, st_ha_create_information*) (ha_innodb.cc:11447) by 0xEB191F: handler::ha_create(char const*, TABLE*, st_ha_create_information*) (handler.cc:4669) by 0xEB1F82: ha_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, bool, bool) (handler.cc:4828) by 0x1620173: rea_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, List<Create_field>&, unsigned int, st_key*, handler*, bool) (unireg.cc:522) by 0x159D1E1: create_table_impl(THD*, char const*, char const*, char const*, st_ha_create_information*, Alter_info*, bool, unsigned int, bool, bool*, st_key**, unsigned int*) (sql_table.cc:5194) by 0x159D783: mysql_create_table_no_lock(THD*, char const*, char const*, st_ha_create_information*, Alter_info*, unsigned int, bool*) (sql_table.cc:5322) by 0x159D8A1: mysql_create_table(THD*, TABLE_LIST*, st_ha_create_information*, Alter_info*) (sql_table.cc:5368) by 0x15058FE: mysql_execute_command(THD*) (sql_parse.cc:2958) by 0x150C600: mysql_parse(THD*, Parser_state*) (sql_parse.cc:5255) 11,437 (6,976 direct, 4,461 indirect) bytes in 4 blocks are definitely lost in loss record 9 of 9 at 0x4C2BBA0: malloc (vg_replace_malloc.c:296) by 0x195306F: ut_allocator<unsigned char>::allocate(unsigned long, unsigned char const*, char const*, bool, bool) (ut0new.h:325) by 0x19ED596: mem_heap_create_block_func(mem_block_info_t*, unsigned long, char const*, unsigned long, unsigned long) (mem0mem.cc:302) by 0x19EDA1A: mem_heap_add_block(mem_block_info_t*, unsigned long) (mem0mem.cc:408) by 0x1C607A9: mem_heap_alloc(mem_block_info_t*, unsigned long) (mem0mem.ic:204) by 0x1C61816: dict_mem_table_create(char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) (dict0mem.cc:138) by 0x1951188: create_table_info_t::create_table_def() (ha_innodb.cc:9358) by 0x193ECE7: create_table_info_t::create_table() (ha_innodb.cc:11108) by 0x193F963: ha_innobase::create(char const*, TABLE*, st_ha_create_information*) (ha_innodb.cc:11447) by 0xEB191F: handler::ha_create(char const*, TABLE*, st_ha_create_information*) (handler.cc:4669) by 0xEB1F82: ha_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, bool, bool) (handler.cc:4828) by 0x1620173: rea_create_table(THD*, char const*, char const*, char const*, st_ha_create_information*, List<Create_field>&, unsigned int, st_key*, handler*, bool) (unireg.cc:522) by 0x159D1E1: create_table_impl(THD*, char const*, char const*, char const*, st_ha_create_information*, Alter_info*, bool, unsigned int, bool, bool*, st_key**, unsigned int*) (sql_table.cc:5194) by 0x159D783: mysql_create_table_no_lock(THD*, char const*, char const*, st_ha_create_information*, Alter_info*, unsigned int, bool*) (sql_table.cc:5322) by 0x159D8A1: mysql_create_table(THD*, TABLE_LIST*, st_ha_create_information*, Alter_info*) (sql_table.cc:5368) by 0x15058FE: mysql_execute_command(THD*) (sql_parse.cc:2958) LEAK SUMMARY: definitely lost: 8,320 bytes in 7 blocks indirectly lost: 11,698 bytes in 21 blocks possibly lost: 0 bytes in 0 blocks still reachable: 0 bytes in 0 blocks suppressed: 64 bytes in 2 blocks
[27 Aug 2015 11:19]
MySQL Verification Team
2015-08-27T11:12:29.320527Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000) 2015-08-27T11:12:29.320647Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000) MySQL Version 5.7.9 Turning on valgrind for all executables Running valgrind with options " --show-reachable=yes " Turning off --check-testcases to save time when valgrinding Checking supported features... - SSL connections supported - binaries are debug compiled Collecting tests... Checking leftover processes... Removing old var directory... Creating var directory '/home/miguel/ago14.2015/mysql-5.7/mysql-test/var'... Installing system database... ============================================================================== TEST RESULT TIME (ms) or COMMENT -------------------------------------------------------------------------- worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009 innodb.create_tablespace [ pass ] 191040 worker[1] Valgrind report from /home/miguel/ago14.2015/mysql-5.7/mysql-test/var/log/mysqld.1.err after tests: innodb.create_tablespace -------------------------------------------------------------------------- HEAP SUMMARY: in use at exit: 64 bytes in 2 blocks total heap usage: 379,194 allocs, 379,192 frees, 727,003,632 bytes allocated Thread 1: 32 bytes in 1 blocks are still reachable in loss record 1 of 2 at 0x4A06A2E: malloc (vg_replace_malloc.c:270) by 0x347926AC2D: CRYPTO_malloc (in /usr/lib64/libcrypto.so.1.0.1e) by 0x34792E4F7E: sk_new (in /usr/lib64/libcrypto.so.1.0.1e) by 0x3479648984: ??? (in /usr/lib64/libssl.so.1.0.1e) by 0x3479648BA8: SSL_COMP_get_compression_methods (in /usr/lib64/libssl.so.1.0.1e) by 0x3479650378: SSL_library_init (in /usr/lib64/libssl.so.1.0.1e) by 0x1D0AEDD: ssl_start (viosslfactories.c:367) by 0xDF1379: init_ssl() (mysqld.cc:3306) by 0xDF41B0: mysqld_main(int, char**) (mysqld.cc:4676) by 0xDEB5F3: main (main.cc:25) 32 bytes in 1 blocks are still reachable in loss record 2 of 2 at 0x4A06A2E: malloc (vg_replace_malloc.c:270) by 0x347926AC2D: CRYPTO_malloc (in /usr/lib64/libcrypto.so.1.0.1e) by 0x34792E4F9C: sk_new (in /usr/lib64/libcrypto.so.1.0.1e) by 0x3479648984: ??? (in /usr/lib64/libssl.so.1.0.1e) by 0x3479648BA8: SSL_COMP_get_compression_methods (in /usr/lib64/libssl.so.1.0.1e) by 0x3479650378: SSL_library_init (in /usr/lib64/libssl.so.1.0.1e) by 0x1D0AEDD: ssl_start (viosslfactories.c:367) by 0xDF1379: init_ssl() (mysqld.cc:3306) by 0xDF41B0: mysqld_main(int, char**) (mysqld.cc:4676) by 0xDEB5F3: main (main.cc:25) LEAK SUMMARY: definitely lost: 0 bytes in 0 blocks indirectly lost: 0 bytes in 0 blocks possibly lost: 0 bytes in 0 blocks still reachable: 64 bytes in 2 blocks suppressed: 0 bytes in 0 blocks For counts of detected and suppressed errors, rerun with: -v Use --track-origins=yes to see where uninitialised values come from ERROR SUMMARY: 140 errors from 34 contexts (suppressed: 6 from 6) valgrind_report [ fail ] Test ended at 2015-08-27 08:17:28 Valgrind reported failures at shutdown, see above -------------------------------------------------------------------------- The servers were restarted 0 times Spent 191.040 of 306 seconds executing testcases Completed: Failed 1/2 tests, 50.00% were successful. Failing test(s): valgrind_report The log files in var/log may give you some hint of what went wrong. If you want to report this error, please read first the documentation at http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html mysql-test-run: *** ERROR: there were failing test cases [miguel@miguelbr mysql-test]$ ./mtr --valgrind --debug-server create_tablespace./mtr --valgrind --debug-server create_tablespace
[27 Aug 2015 11:24]
MySQL Verification Team
Thank you for the bug report.
[29 Aug 2015 9:19]
Laurynas Biveinis
Miguel, your verification log - does not show a single InnoDB DD-related Valgrind error (maybe the issue I'm reporting is already fixed in 5.7.9?) - shows two -DWITH_SSL=system Valgrind errors that are system-specific, and shouldn't be related to the MTR testcase here. These two errors should be shown on almost every testcase on your system. It's a separate issue which is very annoying and should be fixed.
[1 Sep 2015 9:48]
Erlend Dahl
This is no longer reproducible on latest 5.7 after a row of fixes that were pushed in mid-July (of which all didn't make it to 5.7.8).