Enhanced option modifiers do not deallocate memory | Valgrind: getopt_constraint_get_min_value and getopt_constraint_find definitely lost / still reachable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Medium
|
George Ormond Lorch III | ||
5.1 |
Invalid
|
Undecided
|
Unassigned | ||
5.5 |
Fix Released
|
Medium
|
George Ormond Lorch III | ||
5.6 |
Fix Released
|
Medium
|
George Ormond Lorch III |
Bug Description
$ ./mysql-test-run --mem percona_
11 bytes in 1 blocks are still reachable in loss record 1 of 88
at 0x4C2B3F8: malloc (in /usr/lib/
by 0x90E42B: my_malloc (my_malloc.c:38)
by 0x90E7E2: my_strdup (my_malloc.c:146)
by 0x908EB8: getopt_
by 0x90905D: getopt_
by 0x90AA62: setval (my_getopt.c:909)
by 0x909FBF: handle_options (my_getopt.c:736)
by 0x564D36: get_options(int*, char***) (mysqld.cc:7495)
by 0x55F331: init_common_
by 0x5619BD: mysqld_main(int, char**) (mysqld.cc:4553)
by 0x55A0DB: main (main.cc:25)
22 bytes in 1 blocks are still reachable in loss record 2 of 88
at 0x4C2B3F8: malloc (in /usr/lib/
by 0x90E42B: my_malloc (my_malloc.c:38)
by 0x90E7E2: my_strdup (my_malloc.c:146)
by 0x908EB8: getopt_
by 0x9090A5: getopt_
by 0x90A9EA: setval (my_getopt.c:897)
by 0x909FBF: handle_options (my_getopt.c:736)
by 0x564D36: get_options(int*, char***) (mysqld.cc:7495)
by 0x55F331: init_common_
by 0x5619BD: mysqld_main(int, char**) (mysqld.cc:4553)
by 0x55A0DB: main (main.cc:25)
23 bytes in 1 blocks are still reachable in loss record 3 of 88
at 0x4C2B3F8: malloc (in /usr/lib/
by 0x90E42B: my_malloc (my_malloc.c:38)
by 0x90E7E2: my_strdup (my_malloc.c:146)
by 0x908EB8: getopt_
by 0x9090A5: getopt_
by 0x90A9EA: setval (my_getopt.c:897)
by 0x909FBF: handle_options (my_getopt.c:736)
by 0x61F615: test_plugin_
by 0x618E15: plugin_init(int*, char**, int) (sql_plugin.
by 0x5608A1: init_server_
by 0x561B9A: mysqld_main(int, char**) (mysqld.cc:4647)
by 0x55A0DB: main (main.cc:25)
28 bytes in 1 blocks are still reachable in loss record 4 of 88
at 0x4C2B3F8: malloc (in /usr/lib/
by 0x90E42B: my_malloc (my_malloc.c:38)
by 0x90E7E2: my_strdup (my_malloc.c:146)
by 0x908EB8: getopt_
by 0x90905D: getopt_
by 0x90AA62: setval (my_getopt.c:909)
by 0x909FBF: handle_options (my_getopt.c:736)
by 0x61F615: test_plugin_
by 0x618E15: plugin_init(int*, char**, int) (sql_plugin.
by 0x5608A1: init_server_
by 0x561B9A: mysqld_main(int, char**) (mysqld.cc:4647)
by 0x55A0DB: main (main.cc:25)
40 bytes in 1 blocks are still reachable in loss record 27 of 88
at 0x4C2B3F8: malloc (in /usr/lib/
by 0x90E42B: my_malloc (my_malloc.c:38)
by 0x908EA3: getopt_
by 0x9090A5: getopt_
by 0x90A9EA: setval (my_getopt.c:897)
by 0x909FBF: handle_options (my_getopt.c:736)
by 0x564D36: get_options(int*, char***) (mysqld.cc:7495)
by 0x55F331: init_common_
by 0x5619BD: mysqld_main(int, char**) (mysqld.cc:4553)
by 0x55A0DB: main (main.cc:25)
40 bytes in 1 blocks are still reachable in loss record 28 of 88
at 0x4C2B3F8: malloc (in /usr/lib/
by 0x90E42B: my_malloc (my_malloc.c:38)
by 0x908EA3: getopt_
by 0x90905D: getopt_
by 0x90AA62: setval (my_getopt.c:909)
by 0x909FBF: handle_options (my_getopt.c:736)
by 0x564D36: get_options(int*, char***) (mysqld.cc:7495)
by 0x55F331: init_common_
by 0x5619BD: mysqld_main(int, char**) (mysqld.cc:4553)
by 0x55A0DB: main (main.cc:25)
40 bytes in 1 blocks are still reachable in loss record 29 of 88
at 0x4C2B3F8: malloc (in /usr/lib/
by 0x90E42B: my_malloc (my_malloc.c:38)
by 0x908EA3: getopt_
by 0x9090A5: getopt_
by 0x90A9EA: setval (my_getopt.c:897)
by 0x909FBF: handle_options (my_getopt.c:736)
by 0x61F615: test_plugin_
by 0x618E15: plugin_init(int*, char**, int) (sql_plugin.
by 0x5608A1: init_server_
by 0x561B9A: mysqld_main(int, char**) (mysqld.cc:4647)
by 0x55A0DB: main (main.cc:25)
40 bytes in 1 blocks are still reachable in loss record 30 of 88
at 0x4C2B3F8: malloc (in /usr/lib/
by 0x90E42B: my_malloc (my_malloc.c:38)
by 0x908EA3: getopt_
by 0x90905D: getopt_
by 0x90AA62: setval (my_getopt.c:909)
by 0x909FBF: handle_options (my_getopt.c:736)
by 0x61F615: test_plugin_
by 0x618E15: plugin_init(int*, char**, int) (sql_plugin.
by 0x5608A1: init_server_
by 0x561B9A: mysqld_main(int, char**) (mysqld.cc:4647)
by 0x55A0DB: main (main.cc:25)
320 bytes in 1 blocks are still reachable in loss record 65 of 88
at 0x4C2B3F8: malloc (in /usr/lib/
by 0x90E42B: my_malloc (my_malloc.c:38)
by 0x8E3D2C: init_dynamic_array2 (array.c:70)
by 0x8EA0C7: _my_hash_init (hash.c:91)
by 0x908DF3: getopt_
by 0x908E40: getopt_
by 0x9090A5: getopt_
by 0x90A9EA: setval (my_getopt.c:897)
by 0x909FBF: handle_options (my_getopt.c:736)
by 0x564D36: get_options(int*, char***) (mysqld.cc:7495)
by 0x55F331: init_common_
by 0x5619BD: mysqld_main(int, char**) (mysqld.cc:4553)
by 0x55A0DB: 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: 564 bytes in 9 blocks
suppressed: 30,568,904 bytes in 173 blocks
Related branches
- Laurynas Biveinis (community): Approve
-
Diff: 159 lines (+42/-17)4 files modifiedPercona-Server/include/my_getopt.h (+1/-0)
Percona-Server/mysql-test/r/percona_enhanced_options_modifiers.result (+3/-1)
Percona-Server/mysys/my_getopt.c (+37/-16)
Percona-Server/sql/mysqld.cc (+1/-0)
- Laurynas Biveinis (community): Approve
-
Diff: 160 lines (+43/-17)4 files modifiedPercona-Server/include/my_getopt.h (+1/-0)
Percona-Server/mysql-test/r/percona_enhanced_options_modifiers.result (+3/-1)
Percona-Server/mysys_ssl/my_getopt.cc (+37/-16)
Percona-Server/sql/mysqld.cc (+2/-0)
summary: |
- Enhanced option modifiers leak memory + Enhanced option modifiers do not deallocate memory |
tags: | added: ci valgrind |
Seen in 5.6-QA also (getopt_ constraint_ get_min_ value, getopt_ constraint_ find)
8 bytes in 1 blocks are definitely lost in loss record 1 of 524 malloc. c:270) constraint_ get_min_ value (my_getopt.cc:191) variables( ) (mysqld.cc:3841) libc-2. 12.so)
at 0x4A069EE: malloc (vg_replace_
by 0x997CA5: my_malloc (my_malloc.c:38)
by 0x9A8FD1: getopt_
by 0x9A90EC: setval(my_option const*, void const*, char*, int) (my_getopt.cc:986)
by 0x9A9E37: my_handle_options (my_getopt.cc:808)
by 0x62F811: get_options(int*, char***) (mysqld.cc:8933)
by 0x633177: init_common_
by 0x634635: mysqld_main(int, char**) (mysqld.cc:5383)
by 0x3636E1ECDC: (below main) (in /lib64/
16 bytes in 1 blocks are still reachable in loss record 2 of 524 malloc. c:270) constraint_ find(char const*, unsigned long, char) (my_getopt.cc:170) constraint_ get_hidden_ value (my_getopt.cc:221) variables( ) (mysqld.cc:3841) libc-2. 12.so)
at 0x4A069EE: malloc (vg_replace_
by 0x997CA5: my_malloc (my_malloc.c:38)
by 0x997EEB: my_strdup (my_malloc.c:155)
by 0x9A8E53: getopt_
by 0x9A8ECB: getopt_
by 0x9A9394: setval(my_option const*, void const*, char*, int) (my_getopt.cc:1023)
by 0x9A9E37: my_handle_options (my_getopt.cc:808)
by 0x62F811: get_options(int*, char***) (mysqld.cc:8933)
by 0x633177: init_common_
by 0x634635: mysqld_main(int, char**) (mysqld.cc:5383)
by 0x3636E1ECDC: (below main) (in /lib64/
17 bytes in 1 blocks are still reachable in loss record 3 of 524 malloc. c:270) constraint_ find(char const*, unsigned long, char) (my_getopt.cc:170) constraint_ get_min_ value (my_getopt.cc:188) variables( ) (mysqld.cc:3841) libc-2. 12.so)
at 0x4A069EE: malloc (vg_replace_
by 0x997CA5: my_malloc (my_malloc.c:38)
by 0x997EEB: my_strdup (my_malloc.c:155)
by 0x9A8E53: getopt_
by 0x9A8F84: getopt_
by 0x9A90EC: setval(my_option const*, void const*, char*, int) (my_getopt.cc:986)
by 0x9A9E37: my_handle_options (my_getopt.cc:808)
by 0x62F811: get_options(int*, char***) (mysqld.cc:8933)
by 0x633177: init_common_
by 0x634635: mysqld_main(int, char**) (mysqld.cc:5383)
by 0x3636E1ECDC: (below main) (in /lib64/
40 bytes in 1 blocks are still reachable in loss record 177 of 524 malloc. c:270) constraint_ find(char const*, unsigned long, char) (my_getopt.cc:168) constraint_ get_min_ value (my_getopt.cc:188) variables( ) (mysqld.cc:3841) libc-2. 12.so)
at 0x4A069EE: malloc (vg_replace_
by 0x997CA5: my_malloc (my_malloc.c:38)
by 0x9A8E43: getopt_
by 0x9A8F84: getopt_
by 0x9A90EC: setval(my_option const*, void const*, char*, int) (my_getopt.cc:986)
by 0x9A9E37: my_handle_options (my_getopt.cc:808)
by 0x62F811: get_options(int*, char***) (mysqld.cc:8933)
by 0x633177: init_common_
by 0x634635: mysqld_main(int, char**) (mysqld.cc:5383)
by 0x3636E1ECDC: (below main) (in /lib64/