Bug #40750 crash with show global status and mysql_refresh run concurrently
Submitted: 14 Nov 2008 18:08 Modified: 19 Jan 2011 14:49
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Locking Severity:S2 (Serious)
Version:5.1.29-debug, 5.1.42-debug, 5.5.0 OS:Any (Windows, Mac OS X)
Assigned to: CPU Architecture:Any
Tags: regression

[14 Nov 2008 18:08] Shane Bester
Description:
mysqld-debug.exe!list_add()[list.c:34]
mysqld-debug.exe!thr_lock_init()[thr_lock.c:327]
mysqld-debug.exe!heap_create()[hp_create.c:196]
mysqld-debug.exe!ha_heap::create()[ha_heap.cc:705]
mysqld-debug.exe!ha_heap::open()[ha_heap.cc:100]
mysqld-debug.exe!handler::ha_open()[handler.cc:2025]
mysqld-debug.exe!open_tmp_table()[sql_select.cc:10396]
mysqld-debug.exe!create_tmp_table()[sql_select.cc:10248]
mysqld-debug.exe!create_schema_table()[sql_show.cc:5561]
mysqld-debug.exe!mysql_schema_table()[sql_show.cc:5775]
mysqld-debug.exe!open_tables()[sql_base.cc:4524]
mysqld-debug.exe!open_and_lock_tables_derived()[sql_base.cc:4956]
mysqld-debug.exe!open_and_lock_tables()[mysql_priv.h:1532]
mysqld-debug.exe!execute_sqlcom_select()[sql_parse.cc:4793]
mysqld-debug.exe!mysql_execute_command()[sql_parse.cc:2094]
mysqld-debug.exe!mysql_parse()[sql_parse.cc:5727]
mysqld-debug.exe!dispatch_command()[sql_parse.cc:1152]
mysqld-debug.exe!do_command()[sql_parse.cc:809]
mysqld-debug.exe!handle_one_connection()[sql_connect.cc:1115]
mysqld-debug.exe!pthread_start()[my_winthread.c:85]
mysqld-debug.exe!_threadstart()[thread.c:196]
kernel32.dll!FlsSetValue()
t some variables.
s may be invalid and cause the dump to abort...
t 05CD8F90=/* don't kill */ SHOW /*!50010 GLOBAL*/ STATUS

How to repeat:
tricky
[28 Nov 2008 17:05] MySQL Verification Team
to repeat:

similar to bug #40754 - instead of killing queries you have to run 'show global status'..
[14 Nov 2009 16:12] Valeriy Kravchuk
Modified test case from bug #40750 to provoke this bug

Attachment: bug40754.c (text/plain), 6.79 KiB.

[14 Nov 2009 16:14] Valeriy Kravchuk
Verified just as described using test case uploaded with recent 5.1.42-debug from bzr on Mac OS X. I've got the following stack trace:

0   mysqld                              0x0058b0b6 my_print_stacktrace + 45
1   mysqld                              0x000fdd42 handle_segfault + 882
2   libSystem.B.dylib                   0x940472bb _sigtramp + 43
3   ???                                 0xffffffff 0x0 + 4294967295
4   mysqld                              0x00170fce _Z11open_tablesP3THDPP10TABLE_LISTPjj + 1686
Error: Freeing unallocated data at line 309, 'array.c'
5   mysqld                              0x001715c9 _Z28open_and_lock_tables_derivedP3THDP10TABLE_LISTb + 167
6   mysqld                              0x002267c8 _Z25simple_open_n_lock_tablesP3THDP10TABLE_LIST + 32
7   mysqld                              0x0032fc57 _Z14servers_reloadP3THD + 349
8   mysqld                              0x00114f54 _Z20reload_acl_and_cacheP3THDmP10TABLE_LISTPb + 312
9   mysqld                              0x001227fa _Z16dispatch_command19enum_server_commandP3THDPcj + 5274
10  mysqld                              0x0012338c _Z10do_commandP3THD + 666
11  mysqld                              0x0010db0f handle_one_connection + 385
12  libSystem.B.dylib                   0x9400c095 _pthread_start + 321
13  libSystem.B.dylib                   0x9400bf52 thread_start + 34
[14 Nov 2009 16:24] Valeriy Kravchuk
5.0.88 does NOT look affected, so this is a regression bug.
[14 Nov 2009 16:30] Valeriy Kravchuk
Recent mysql-trunc from bzr is also affected.
[19 Jan 2011 14:37] Dmitry Lenev
Dear Bug Verification Team!

Could you please try re-verifying this bug against most recent 5.1 and 5.5?
A developer has tried to repeat this issue and was unable to do so. So we suspect that this bug was fixed by one of changes introduced since its initial verification, but we want to be sure before closing it as "Can't repeat".
[19 Jan 2011 14:49] Valeriy Kravchuk
I can not repeat it with 5.1.56-debug (current mysql-5.1 tree).
[19 Jan 2011 14:52] Valeriy Kravchuk
Not repeatable with 5.5.9-debug also.