Percona Server with XtraDB

Enhanced option modifiers do not deallocate memory | Valgrind: getopt_constraint_get_min_value and getopt_constraint_find definitely lost / still reachable

Reported by Laurynas Biveinis on 2013-04-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server
Status tracked in 5.6
5.1
Undecided
Unassigned
5.5
Medium
George Ormond Lorch III
5.6
Medium
George Ormond Lorch III

Bug Description

$ ./mysql-test-run --mem percona_enhanced_options_modifiers --valgrind-mysqld

11 bytes in 1 blocks are still reachable in loss record 1 of 88
   at 0x4C2B3F8: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x90E42B: my_malloc (my_malloc.c:38)
   by 0x90E7E2: my_strdup (my_malloc.c:146)
   by 0x908EB8: getopt_constraint_find (my_getopt.c:166)
   by 0x90905D: getopt_constraint_get_hidden_value (my_getopt.c:216)
   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_variables() (mysqld.cc:3228)
   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/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x90E42B: my_malloc (my_malloc.c:38)
   by 0x90E7E2: my_strdup (my_malloc.c:146)
   by 0x908EB8: getopt_constraint_find (my_getopt.c:166)
   by 0x9090A5: getopt_constraint_get_readonly_value (my_getopt.c:229)
   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_variables() (mysqld.cc:3228)
   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/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x90E42B: my_malloc (my_malloc.c:38)
   by 0x90E7E2: my_strdup (my_malloc.c:146)
   by 0x908EB8: getopt_constraint_find (my_getopt.c:166)
   by 0x9090A5: getopt_constraint_get_readonly_value (my_getopt.c:229)
   by 0x90A9EA: setval (my_getopt.c:897)
   by 0x909FBF: handle_options (my_getopt.c:736)
   by 0x61F615: test_plugin_options(st_mem_root*, st_plugin_int*, int*, char**) (sql_plugin.cc:3609)
   by 0x618E15: plugin_init(int*, char**, int) (sql_plugin.cc:1325)
   by 0x5608A1: init_server_components() (mysqld.cc:3921)
   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/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x90E42B: my_malloc (my_malloc.c:38)
   by 0x90E7E2: my_strdup (my_malloc.c:146)
   by 0x908EB8: getopt_constraint_find (my_getopt.c:166)
   by 0x90905D: getopt_constraint_get_hidden_value (my_getopt.c:216)
   by 0x90AA62: setval (my_getopt.c:909)
   by 0x909FBF: handle_options (my_getopt.c:736)
   by 0x61F615: test_plugin_options(st_mem_root*, st_plugin_int*, int*, char**) (sql_plugin.cc:3609)
   by 0x618E15: plugin_init(int*, char**, int) (sql_plugin.cc:1325)
   by 0x5608A1: init_server_components() (mysqld.cc:3921)
   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/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x90E42B: my_malloc (my_malloc.c:38)
   by 0x908EA3: getopt_constraint_find (my_getopt.c:162)
   by 0x9090A5: getopt_constraint_get_readonly_value (my_getopt.c:229)
   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_variables() (mysqld.cc:3228)
   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/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x90E42B: my_malloc (my_malloc.c:38)
   by 0x908EA3: getopt_constraint_find (my_getopt.c:162)
   by 0x90905D: getopt_constraint_get_hidden_value (my_getopt.c:216)
   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_variables() (mysqld.cc:3228)
   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/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x90E42B: my_malloc (my_malloc.c:38)
   by 0x908EA3: getopt_constraint_find (my_getopt.c:162)
   by 0x9090A5: getopt_constraint_get_readonly_value (my_getopt.c:229)
   by 0x90A9EA: setval (my_getopt.c:897)
   by 0x909FBF: handle_options (my_getopt.c:736)
   by 0x61F615: test_plugin_options(st_mem_root*, st_plugin_int*, int*, char**) (sql_plugin.cc:3609)
   by 0x618E15: plugin_init(int*, char**, int) (sql_plugin.cc:1325)
   by 0x5608A1: init_server_components() (mysqld.cc:3921)
   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/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x90E42B: my_malloc (my_malloc.c:38)
   by 0x908EA3: getopt_constraint_find (my_getopt.c:162)
   by 0x90905D: getopt_constraint_get_hidden_value (my_getopt.c:216)
   by 0x90AA62: setval (my_getopt.c:909)
   by 0x909FBF: handle_options (my_getopt.c:736)
   by 0x61F615: test_plugin_options(st_mem_root*, st_plugin_int*, int*, char**) (sql_plugin.cc:3609)
   by 0x618E15: plugin_init(int*, char**, int) (sql_plugin.cc:1325)
   by 0x5608A1: init_server_components() (mysqld.cc:3921)
   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/valgrind/vgpreload_memcheck-amd64-linux.so)
   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_constraint_init (my_getopt.c:127)
   by 0x908E40: getopt_constraint_find (my_getopt.c:148)
   by 0x9090A5: getopt_constraint_get_readonly_value (my_getopt.c:229)
   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_variables() (mysqld.cc:3228)
   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

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
   at 0x4A069EE: malloc (vg_replace_malloc.c:270)
   by 0x997CA5: my_malloc (my_malloc.c:38)
   by 0x9A8FD1: getopt_constraint_get_min_value (my_getopt.cc:191)
   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_variables() (mysqld.cc:3841)
   by 0x634635: mysqld_main(int, char**) (mysqld.cc:5383)
   by 0x3636E1ECDC: (below main) (in /lib64/libc-2.12.so)

16 bytes in 1 blocks are still reachable in loss record 2 of 524
   at 0x4A069EE: malloc (vg_replace_malloc.c:270)
   by 0x997CA5: my_malloc (my_malloc.c:38)
   by 0x997EEB: my_strdup (my_malloc.c:155)
   by 0x9A8E53: getopt_constraint_find(char const*, unsigned long, char) (my_getopt.cc:170)
   by 0x9A8ECB: getopt_constraint_get_hidden_value (my_getopt.cc:221)
   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_variables() (mysqld.cc:3841)
   by 0x634635: mysqld_main(int, char**) (mysqld.cc:5383)
   by 0x3636E1ECDC: (below main) (in /lib64/libc-2.12.so)

17 bytes in 1 blocks are still reachable in loss record 3 of 524
   at 0x4A069EE: malloc (vg_replace_malloc.c:270)
   by 0x997CA5: my_malloc (my_malloc.c:38)
   by 0x997EEB: my_strdup (my_malloc.c:155)
   by 0x9A8E53: getopt_constraint_find(char const*, unsigned long, char) (my_getopt.cc:170)
   by 0x9A8F84: getopt_constraint_get_min_value (my_getopt.cc:188)
   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_variables() (mysqld.cc:3841)
   by 0x634635: mysqld_main(int, char**) (mysqld.cc:5383)
   by 0x3636E1ECDC: (below main) (in /lib64/libc-2.12.so)

40 bytes in 1 blocks are still reachable in loss record 177 of 524
   at 0x4A069EE: malloc (vg_replace_malloc.c:270)
   by 0x997CA5: my_malloc (my_malloc.c:38)
   by 0x9A8E43: getopt_constraint_find(char const*, unsigned long, char) (my_getopt.cc:168)
   by 0x9A8F84: getopt_constraint_get_min_value (my_getopt.cc:188)
   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_variables() (mysqld.cc:3841)
   by 0x634635: mysqld_main(int, char**) (mysqld.cc:5383)
   by 0x3636E1ECDC: (below main) (in /lib64/libc-2.12.so)

summary: - Enhanced option modifiers do not deallocate memory
+ Enhanced option modifiers do not deallocate memory | Valgrind:
+ getopt_constraint_get_min_value and getopt_constraint_find definitely
+ lost / still reachable
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers