HandlerSocket leaks thread objects
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Won't Fix
|
Medium
|
Unassigned | |||
5.6 |
Fix Released
|
Medium
|
Laurynas Biveinis | |||
5.7 |
Invalid
|
Undecided
|
Unassigned |
Bug Description
PS 5.6 trunk on Valgrind (with dlclose() commented out in the core server to get usable stacktraces):
main.handler_socket [ pass ] 23754
worker[1] Valgrind report from /home/laurynas/
main.handler_
-------
HEAP SUMMARY:
in use at exit: 71,111,989 bytes in 1,134 blocks
total heap usage: 12,358 allocs, 11,224 frees, 107,333,476 bytes allocated
95 bytes in 1 blocks are still reachable in loss record 180 of 345
at 0x4C2DB8F: malloc (vg_replace_
by 0x401CD89: strdup (strdup.c:42)
by 0x40089D3: expand_
by 0x40089D3: _dl_map_object (dl-load.c:2409)
by 0x40153A6: dl_open_worker (dl-open.c:237)
by 0x4010393: _dl_catch_error (dl-error.c:187)
by 0x4014BD8: _dl_open (dl-open.c:660)
by 0x5696F08: dlopen_doit (dlopen.c:66)
by 0x4010393: _dl_catch_error (dl-error.c:187)
by 0x5697570: _dlerror_run (dlerror.c:163)
by 0x5696FA0: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
by 0x826496: plugin_
by 0x8277DC: plugin_
by 0x82A8BC: mysql_install_
by 0x81B4E6: mysql_execute_
by 0x81F444: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6972)
by 0x81092E: dispatch_
2,560 bytes in 16 blocks are indirectly lost in loss record 275 of 345
at 0x4C2E0EF: operator new(unsigned long) (vg_replace_
by 0x148734C2: dena::database:
by 0x148819D0: dena::hstcpsvr_
by 0x14884D47: dena::hstcpsvr_
by 0x1488C741: dena::worker_
by 0x1488CD1A: dena::thread<
by 0x1488C142: dena::hstcpsvr:
by 0x1487FB9A: daemon_
by 0x828808: plugin_
by 0x82A9A3: mysql_install_
by 0x81B4E6: mysql_execute_
by 0x81F444: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6972)
by 0x81092E: dispatch_
by 0x80F7A4: do_command(THD*) (sql_parse.cc:1053)
by 0x7D27F1: do_handle_
by 0x7D2289: handle_
2,944 bytes in 16 blocks are indirectly lost in loss record 276 of 345
at 0x4C2E0EF: operator new(unsigned long) (vg_replace_
by 0x14884D35: dena::hstcpsvr_
by 0x1488C741: dena::worker_
by 0x1488CD1A: dena::thread<
by 0x1488C142: dena::hstcpsvr:
by 0x1487FB9A: daemon_
by 0x828808: plugin_
by 0x82A9A3: mysql_install_
by 0x81B4E6: mysql_execute_
by 0x81F444: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6972)
by 0x81092E: dispatch_
by 0x80F7A4: do_command(THD*) (sql_parse.cc:1053)
by 0x7D27F1: do_handle_
by 0x7D2289: handle_
by 0xB958CF: pfs_spawn_thread (pfs.cc:1860)
by 0x58A16F9: start_thread (pthread_
12,800 bytes in 16 blocks are indirectly lost in loss record 289 of 345
at 0x4C2E0EF: operator new(unsigned long) (vg_replace_
by 0x14873CFD: dena::dbcontext
by 0x14881CBE: dena::(anonymous namespace)
by 0x14881D2D: dena::hstcpsvr_
by 0x1488C7AA: dena::worker_
by 0x1488E050: dena::thread<
by 0x58A16F9: start_thread (pthread_
by 0x645EB5C: clone (clone.S:109)
131,072 bytes in 16 blocks are indirectly lost in loss record 311 of 345
at 0x4C2E0EF: operator new(unsigned long) (vg_replace_
by 0x1487E4DF: __gnu_cxx:
by 0x1487DC1B: __gnu_cxx:
by 0x1487D301: std::_Vector_
by 0x1487C0A1: std::vector<char, std::allocator<
by 0x1487AB61: std::vector<char, std::allocator<
by 0x14879C44: std::vector<char, std::allocator<
by 0x148736EC: dena::dbcontext
by 0x148734D8: dena::database:
by 0x148819D0: dena::hstcpsvr_
by 0x14884D47: dena::hstcpsvr_
by 0x1488C741: dena::worker_
by 0x1488CD1A: dena::thread<
by 0x1488C142: dena::hstcpsvr:
by 0x1487FB9A: daemon_
by 0x828808: plugin_
737,280 bytes in 6 blocks are indirectly lost in loss record 325 of 345
at 0x4C2E0EF: operator new(unsigned long) (vg_replace_
by 0x1488A980: __gnu_cxx:
by 0x1488A267: __gnu_cxx:
by 0x1488949F: std::_Vector_
by 0x14887BE4: std::vector<
by 0x14886AA5: std::vector<
by 0x14885E42: std::vector<
by 0x14881BF4: dena::hstcpsvr_
by 0x14884D47: dena::hstcpsvr_
by 0x1488C741: dena::worker_
by 0x1488CD1A: dena::thread<
by 0x1488C142: dena::hstcpsvr:
by 0x1487FB9A: daemon_
by 0x828808: plugin_
by 0x82A9A3: mysql_install_
by 0x81B4E6: mysql_execute_
887,168 (512 direct, 886,656 indirect) bytes in 16 blocks are definitely lost in loss record 326 of 345
at 0x4C2E0EF: operator new(unsigned long) (vg_replace_
by 0x1488C129: dena::hstcpsvr:
by 0x1487FB9A: daemon_
by 0x828808: plugin_
by 0x82A9A3: mysql_install_
by 0x81B4E6: mysql_execute_
by 0x81F444: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6972)
by 0x81092E: dispatch_
by 0x80F7A4: do_command(THD*) (sql_parse.cc:1053)
by 0x7D27F1: do_handle_
by 0x7D2289: handle_
by 0xB958CF: pfs_spawn_thread (pfs.cc:1860)
by 0x58A16F9: start_thread (pthread_
by 0x645EB5C: clone (clone.S:109)
1,228,800 bytes in 10 blocks are possibly lost in loss record 333 of 345
at 0x4C2E0EF: operator new(unsigned long) (vg_replace_
by 0x1488A980: __gnu_cxx:
by 0x1488A267: __gnu_cxx:
by 0x1488949F: std::_Vector_
by 0x14887BE4: std::vector<
by 0x14886AA5: std::vector<
by 0x14885E42: std::vector<
by 0x14881BF4: dena::hstcpsvr_
by 0x14884D47: dena::hstcpsvr_
by 0x1488C741: dena::worker_
by 0x1488CD1A: dena::thread<
by 0x1488C142: dena::hstcpsvr:
by 0x1487FB9A: daemon_
by 0x828808: plugin_
by 0x82A9A3: mysql_install_
by 0x81B4E6: mysql_execute_
LEAK SUMMARY:
definitely lost: 512 bytes in 16 blocks
indirectly lost: 886,656 bytes in 70 blocks
possibly lost: 1,228,800 bytes in 10 blocks
still reachable: 95 bytes in 1 blocks
suppressed: 68,995,926 bytes in 1,037 blocks
This is caused by hstcpsvr::threads, which is auto_ptrcontain
tags: | added: ci handlersocket upstream valgrind |
https:/ /github. com/percona/ percona- server/ pull/937 /github. com/percona/ percona- server/ pull/938
https:/