Bug #12848 Stress test: Server crashes on regular query_cache.test
Submitted: 29 Aug 2005 17:05 Modified: 8 Sep 2005 16:38
Reporter: Alexey Stroganov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0 OS:Linux (Linux)
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[29 Aug 2005 17:05] Alexey Stroganov
Description:
Running query_cache test case from regular mysql-test suite in multithread environment(stress test) for some time  (less than 1-2 min) will lead to crash.

If it needs I can try to minimize set of statements in test case that lead to crash.

backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1115790256 (LWP 1232)]
0x082b1e26 in Query_cache::find_bin (this=0x860c780, size=512) at sql_cache.cc:2643
2643        if (steps[middle].size > size)
(gdb) bt
#0  0x082b1e26 in Query_cache::find_bin (this=0x860c780, size=512) at sql_cache.cc:2643
#1  0x082b138b in Query_cache::get_free_block (this=0x860c780, len=512, not_less=1 '\001',
    min=0) at sql_cache.cc:2435
#2  0x082b11dd in Query_cache::allocate_block (this=0x860c780, len=512, not_less=1 '\001',
    min=0, under_guard=1 '\001') at sql_cache.cc:2410
#3  0x082af974 in Query_cache::write_block_data (this=0x860c780, data_len=61,
    data=0x8c64e70 "select * from t3", header_len=64, type=QUERY, ntab=3,
    under_guard=1 '\001') at sql_cache.cc:1837
#4  0x082ac0b0 in Query_cache::store_query (this=0x860c780, thd=0x4290b110,
    tables_used=0x8c64f70) at sql_cache.cc:853
#5  0x081abcfb in mysql_execute_command (thd=0x4290b110) at sql_parse.cc:2435
#6  0x081b471f in mysql_parse (thd=0x4290b110, inBuf=0x8c64e70 "select * from t3", length=16)
    at sql_parse.cc:5432
#7  0x081a9dd5 in dispatch_command (command=COM_QUERY, thd=0x4290b110,
    packet=0x4290f871 "select * from t3", packet_length=17) at sql_parse.cc:1665
#8  0x081a95a2 in do_command (thd=0x4290b110) at sql_parse.cc:1464
#9  0x081a8682 in handle_one_connection (arg=0x4290b110) at sql_parse.cc:1116
#10 0x4004aaa7 in start_thread () from /lib/tls/libpthread.so.0
#11 0x4017bc2e in clone () from /lib/tls/libc.so.6

How to repeat:
Run stress test with test case above.

Until stress test will be integrated to regular mysql-test suite please contact
me and I will provide all necessary information.
[29 Aug 2005 20:59] Alexey Stroganov
There is possible related issue BUG#12864
[29 Aug 2005 23:25] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/29004
[6 Sep 2005 8:17] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/29348
[7 Sep 2005 5:22] Oleksandr Byelkin
pushed to 4.0.27, 4.1.15, 5.0.13
[8 Sep 2005 16:38] Paul Dubois
Noted in 4.0.27, 4.1.15, 5.0.13 changelogs.