Description:
Multiple Valgrind errors with archive.test in mysql-next-mr tree
Total 3 different types of failures of which (1) "conditional jump" on deflate
azlib is the most occuring..
This is because of http://www.zlib.net/zlib_faq.html#faq36
Also see:
http://www.mail-archive.com/maria-developers@lists.launchpad.net/msg00248.html
The reason for 2 & 3 has to be investigated.
1)
==28166== Conditional jump or move depends on uninitialised value(s)
==28166== at 0x4063F04: deflate (in /lib/libz.so.1.2.3.3)
==28166== by 0x84275FC: do_flush (azio.c:600)
==28166== by 0x8427DDF: azclose (azio.c:812)
==28166== by 0x84258F5: ha_archive::optimize(THD*, st_ha_check_opt*) (ha_archive.cc:1426)
==28166== by 0x830170A: handler::ha_optimize(THD*, st_ha_check_opt*) (handler.cc:3217)
==28166== by 0x823F837: mysql_admin_table(THD*, TABLE_LIST*, st_ha_check_opt*, char const*, thr_lock_type, bool, bool, unsigned int, int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), int (handler::*)(THD*, st_ha_check_opt*), int (*)(THD*, TABLE_LIST*)) (sql_table.cc:4892)
==28166== by 0x8240A19: mysql_optimize_table(THD*, TABLE_LIST*, st_ha_check_opt*) (sql_table.cc:5171)
==28166== by 0x81CE244: mysql_execute_command(THD*) (sql_parse.cc:2828)
==28166== by 0x81D38AC: mysql_parse(THD*, char const*, unsigned int, char const**) (sql_parse.cc:5581)
==28166== by 0x81D42AB: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1023)
==28166== by 0x81D5566: do_command(THD*) (sql_parse.cc:709)
==28166== by 0x8285A09: do_handle_one_connection(THD*) (sql_connect.cc:1174)
==28166== by 0x8285AC7: handle_one_connection (sql_connect.cc:1113)
==28166== by 0x8421395: pfs_spawn_thread(void*) (pfs.cc:1011)
==28166== by 0x404B4FE: start_thread (in /lib/tls/i686/cmov/libpthread-2.9.so)
==28166== by 0x41BF49D: clone (in /lib/tls/i686/cmov/libc-2.9.so)
2)
Address 0x94c9f49 is 33,569 bytes inside a block of size 50,616 alloc'd
==28166== at 0x4026FDE: malloc (vg_replace_malloc.c:207)
==28166== by 0x8580B3E: my_malloc (my_malloc.c:34)
==28166== by 0x8577048: my_multi_malloc (mulalloc.c:50)
==28166== by 0x8424FBC: ha_archive::get_share(char const*, int*) (ha_archive.cc:353)
==28166== by 0x8425271: ha_archive::open(char const*, int, unsigned int) (ha_archive.cc:527)
==28166== by 0x8303F61: handler::ha_open(TABLE*, char const*, int, int) (handler.cc:2093)
==28166== by 0x825EC80: open_table_from_share(THD*, TABLE_SHARE*, char const*, unsigned int, unsigned int, unsigned int, TABLE*, bool) (table.cc:1916)
==28166== by 0x8193875: open_table(THD*, TABLE_LIST*, st_mem_root*, Open_table_context*, unsigned int) (sql_base.cc:2875)
==28166== by 0x81942C5: open_and_process_table(THD*, LEX*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*, st_mem_root*) (sql_base.cc:4202)
==28166== by 0x819481B: open_tables(THD*, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) (sql_base.cc:4524)
==28166== by 0x8194BD1: open_and_lock_tables_derived(THD*, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5124)
==28166== by 0x8187AE7: open_and_lock_tables_derived(THD*, TABLE_LIST*, bool, unsigned int) (mysql_priv.h:1574)
==28166== by 0x8187B4E: open_and_lock_tables(THD*, TABLE_LIST*) (mysql_priv.h:1584)
==28166== by 0x81CA329: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4513)
==28166== by 0x81CC3E4: mysql_execute_command(THD*) (sql_parse.cc:2060)
==28166== by 0x81D38AC: mysql_parse(THD*, char const*, unsigned int, char const**) (sql_parse.cc:5581)
3)
==28166== Syscall param write(buf) points to uninitialised byte(s)
==28166== at 0x40007F2: (within /lib/ld-2.9.so)
==28166== by 0x842757F: do_flush (azio.c:590)
==28166== by 0x84277EA: azflush (azio.c:644)
==28166== by 0x84235AF: ha_archive::info(unsigned int) (ha_archive.cc:1522)
==28166== by 0x82086D5: make_join_statistics(JOIN*, TABLE_LIST*, Item*, st_dynamic_array*) (sql_select.cc:2606)
==28166== by 0x820AA4C: JOIN::optimize() (sql_select.cc:995)
==28166== by 0x820DEF0: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:2466)
==28166== by 0x8213063: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:271)
==28166== by 0x81CA610: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4548)
==28166== by 0x81CC3E4: mysql_execute_command(THD*) (sql_parse.cc:2060)
==28166== by 0x81D38AC: mysql_parse(THD*, char const*, unsigned int, char const**) (sql_parse.cc:5581)
==28166== by 0x81D42AB: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1023)
==28166== by 0x81D5566: do_command(THD*) (sql_parse.cc:709)
==28166== by 0x8285A09: do_handle_one_connection(THD*) (sql_connect.cc:1174)
==28166== by 0x8285AC7: handle_one_connection (sql_connect.cc:1113)
==28166== by 0x8421395: pfs_spawn_thread(void*) (pfs.cc:1011)
How to repeat:
Use mysql-next-mr
./BUILD/compile-pentium-valgrind-max
./mtr archive.test --valgrind
You will able to reproduce only when zlib version is >= 1.2.x.
See http://www.zlib.net/zlib_faq.html#faq36