Bug #56916 main.archive_bitfield fails in valgrind mode
Submitted: 22 Sep 2010 5:47 Modified: 11 Nov 2010 20:59
Reporter: Alexey Kopytov Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Archive storage engine Severity:S3 (Non-critical)
Version:5.1.51 OS:Linux
Assigned to: CPU Architecture:Any

[22 Sep 2010 5:47] Alexey Kopytov
Description:
Found the following failure when running the test suite in the valgrind mode on mysql-5.1-bugteam:

==============================================================================

TEST                                      RESULT   TIME (ms)
------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
main.archive_bitfield                    [ fail ]  Found warnings/errors in server log file!
        Test ended at 2010-09-22 09:38:16
line
==20581== Thread 3:
==20581== Conditional jump or move depends on uninitialised value(s)
==20581==    at 0x5050253: deflate (in /lib/libz.so.1.2.3.3)
==20581==    by 0x8DC8ED: do_flush (azio.c:600)
==20581==    by 0x8DCFE4: azclose (azio.c:812)
==20581==    by 0x8D65BA: ha_archive::free_share() (ha_archive.cc:417)
==20581==    by 0x8D6BE3: ha_archive::close() (ha_archive.cc:580)
==20581==    by 0x6F5226: closefrm(st_table*, bool) (table.cc:1987)
==20581==    by 0x6DAEE8: intern_close_table(st_table*) (sql_base.cc:782)
==20581==    by 0x6DAF9F: free_cache_entry(st_table*) (sql_base.cc:804)
==20581==    by 0xA533DC: my_hash_delete (hash.c:546)
==20581==    by 0x6ECEB4: remove_table_from_cache(THD*, char const*, char const*, unsigned int) (sql_base.cc:8595)
==20581==    by 0x674407: lock_table_name(THD*, TABLE_LIST*, bool) (lock.cc:1054)
==20581==    by 0x67467C: lock_table_names(THD*, TABLE_LIST*) (lock.cc:1137)
==20581==    by 0x674728: lock_table_names_exclusively(THD*, TABLE_LIST*) (lock.cc:1175)
==20581==    by 0x804DC6: mysql_rm_table_part2(THD*, TABLE_LIST*, bool, bool, bool, bool) (sql_table.cc:1936)
==20581==    by 0x804A50: mysql_rm_table(THD*, TABLE_LIST*, char, char) (sql_table.cc:1850)
==20581==    by 0x693068: mysql_execute_command(THD*) (sql_parse.cc:3450)

How to repeat:
Linux/x86_64, compile-pentium-valgrind-max-no-ndb

./mtr --mem --valgrind main.archive_bitfield
[22 Sep 2010 6:18] Alexey Kopytov
partition_archive fails as well with the following backtrace:

main.partition_archive                   w3 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2010-09-22 09:59:28
line
==23556== Thread 3:
==23556== Conditional jump or move depends on uninitialised value(s)
==23556==    at 0x5050253: deflate (in /lib/libz.so.1.2.3.3)
==23556==    by 0x8DC8ED: do_flush (azio.c:600)
==23556==    by 0x8DCFE4: azclose (azio.c:812)
==23556==    by 0x8D65BA: ha_archive::free_share() (ha_archive.cc:417)
==23556==    by 0x8D6BE3: ha_archive::close() (ha_archive.cc:580)
==23556==    by 0x7EF5FB: ha_partition::close() (ha_partition.cc:2688)
==23556==    by 0x6F5226: closefrm(st_table*, bool) (table.cc:1987)
==23556==    by 0x6DAEE8: intern_close_table(st_table*) (sql_base.cc:782)
==23556==    by 0x6DAF9F: free_cache_entry(st_table*) (sql_base.cc:804)
==23556==    by 0xA533DC: my_hash_delete (hash.c:546)
==23556==    by 0x6DC2D9: close_thread_table(THD*, st_table**) (sql_base.cc:1396)
==23556==    by 0x6DBC9F: close_open_tables(THD*) (sql_base.cc:1199)
==23556==    by 0x6DC0BA: close_thread_tables(THD*) (sql_base.cc:1357)
==23556==    by 0x68E424: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1672)
==23556==    by 0x68C165: do_command(THD*) (sql_parse.cc:888)
==23556==    by 0x689EBC: handle_one_connection (sql_connect.cc:1136)
==23556== Syscall param write(buf) points to uninitialised byte(s)
==23556==    at 0x4E3C8DD: ??? (syscall-template.S:82)
==23556==    by 0xA3BE09: my_write (my_write.c:38)
==23556==    by 0x8DC878: do_flush (azio.c:590)
==23556==    by 0x8DCAB2: azflush (azio.c:644)
==23556==    by 0x8D98AB: ha_archive::info(unsigned int) (ha_archive.cc:1478)
==23556==    by 0x7F44F5: ha_partition::info(unsigned int) (ha_partition.cc:5072)
==23556==    by 0x7066CC: make_join_statistics(JOIN*, TABLE_LIST*, Item*, st_dynamic_array*) (sql_select.cc:2652)
==23556==    by 0x700388: JOIN::optimize() (sql_select.cc:1020)
==23556==    by 0x705F85: 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:2512)
==23556==    by 0x6FDE6D: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:269)
==23556==    by 0x698A0F: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5127)
==23556==    by 0x68F91E: mysql_execute_command(THD*) (sql_parse.cc:2292)
==23556==    by 0x69AEE3: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6051)
==23556==    by 0x68D198: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1260)
==23556==    by 0x68C165: do_command(THD*) (sql_parse.cc:888)
==23556==    by 0x689EBC: handle_one_connection (sql_connect.cc:1136)
==23556==  Address 0x61eff1a is 33,786 bytes inside a block of size 50,840 alloc'd
==23556==    at 0x4C284A8: malloc (vg_replace_malloc.c:236)
==23556==    by 0xA42579: my_malloc (my_malloc.c:35)
==23556==    by 0xA435DD: my_multi_malloc (mulalloc.c:50)
==23556==    by 0x8D6043: ha_archive::get_share(char const*, int*) (ha_archive.cc:325)
==23556==    by 0x8D6950: ha_archive::open(char const*, int, unsigned int) (ha_archive.cc:501)
==23556==    by 0x7E0A2D: handler::ha_open(st_table*, char const*, int, int) (handler.cc:2094)
==23556==    by 0x7EEEB7: ha_partition::open(char const*, int, unsigned int) (ha_partition.cc:2545)
==23556==    by 0x7E0A2D: handler::ha_open(st_table*, char const*, int, int) (handler.cc:2094)
==23556==    by 0x6F4EA7: open_table_from_share(THD*, st_table_share*, char const*, unsigned int, unsigned int, unsigned int, st_table*, bool) (table.cc:1897)
==23556==    by 0x6E256C: open_unireg_entry(THD*, st_table*, TABLE_LIST*, char const*, char*, unsigned int, st_mem_root*, unsigned int) (sql_base.cc:3934)
==23556==    by 0x6DFEFA: open_table(THD*, TABLE_LIST*, st_mem_root*, bool*, unsigned int) (sql_base.cc:2931)
==23556==    by 0x6E3972: open_tables(THD*, TABLE_LIST**, unsigned int*, unsigned int) (sql_base.cc:4621)
==23556==    by 0x6E4772: open_and_lock_tables_derived(THD*, TABLE_LIST*, bool) (sql_base.cc:5039)
==23556==    by 0x69FC21: open_and_lock_tables(THD*, TABLE_LIST*) (mysql_priv.h:1522)
==23556==    by 0x730D6C: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:627)
==23556==    by 0x6924FF: mysql_execute_command(THD*) (sql_parse.cc:3249)
[22 Sep 2010 7:35] Valeriy Kravchuk
Not repeatable for me with current 5.1.52 (mysql-5.1 tree from bzr) on 32-bit Linux.
[22 Sep 2010 8:25] Alexey Kopytov
Valeriy,

mysql-5.1 (5.5.52) fails for me too. Perhaps it is only repeatable on x86_64?
[22 Sep 2010 8:27] Alexey Kopytov
I was talking about 5.1.52 of course.
[22 Sep 2010 12:10] Sveta Smirnova
I can not repeat it on x86_64 Linux too. Which exact version of Linux and valgrind do you use?
[22 Sep 2010 12:18] Alexey Kopytov
Ubuntu 10.04, valgrind-3.6.0.SVN-Debian
[28 Sep 2010 17:00] MySQL Verification Team
I couldn't repeat on FC 13 X86_64 too:

==============================================================================

TEST                                      RESULT   TIME (ms)
------------------------------------------------------------

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
main.archive_bitfield                    [ pass ]   3014
------------------------------------------------------------
The servers were restarted 0 times
Spent 3.014 of 19 seconds executing testcases

Completed: All 1 tests were successful.

[miguel@tikal mysql-test]$ cat /etc/issue
Fedora release 13 (Goddard)
Kernel \r on an \m (\l)
[11 Oct 2010 20:59] Sveta Smirnova
Thank you for the feedback.

I still can not repeat described behavior on 64-bit Redhat box and get mysqltest errors on 32-bit Debian which are not related to the described problem. Please try with current version and inform us if problem still exists.
[12 Nov 2010 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".