Bug #33496 Crash when reading from Falcon table into variable
Submitted: 24 Dec 2007 8:22 Modified: 26 Dec 2008 12:13
Reporter: Philip Stoev Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S1 (Critical)
Version:6.0.4 OS:Any
Assigned to: Philip Stoev CPU Architecture:Any
Tags: simpler_testcase_needed

[24 Dec 2007 8:22] Philip Stoev
Description:
The iuds2 system test crashes after running for several hours. The query the crash happened on is:

SELECT ROUND(RAND() * MAX(i1)), MAX(i1), MIN(i1), CONNECTION_ID()
INTO @next_val, @max_val, @min_val, @connection_id
FROM systest1.tb1_eng1;

Backtrace is:

0x824a171 handle_segfault + 441
0x81e36dc _Z11update_hashP14user_var_entrybPvj11Item_resultP15charset_info_st10Derivationb + 104
0x81e06a0 _ZN22Item_func_set_user_var11update_hashEPvj11Item_resultP15charset_info_st10Derivationb + 92
0x81e0af7 _ZN22Item_func_set_user_var6updateEv + 51
0x823ff56 _ZN14select_dumpvar9send_dataER4ListI4ItemE + 394
0x829d99b _Z14end_send_groupP4JOINP13st_join_tableb + 907
0x829d1d4 _Z10sub_selectP4JOINP13st_join_tableb + 336
0x82a8554 _Z9do_selectP4JOINP4ListI4ItemEP8st_tableP9Procedure + 568
0x829636a _ZN4JOIN4execEv + 4566
0x8296d83 _Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select + 339
0x829209b _Z13handle_selectP3THDP6st_lexP13select_resultm + 307
0x825df6d _Z21execute_sqlcom_selectP3THDP10TABLE_LIST + 149
0x825542b _Z21mysql_execute_commandP3THD + 747
0x825b59d _Z11mysql_parseP3THDPKcjPS2_ + 269
0x82540b5 _Z16dispatch_command19enum_server_commandP3THDPcj + 909
0x8253cf8 _Z10do_commandP3THD + 176
0x8252547 handle_one_connection + 287

After server is manually restarted, it is impossible to SELECT on the table, run REPAIR or even run "use systest1". The thread executing this command hangs in "Opening tables" and it is impossible to kill it. Server is then unable to shut down properly.

The logs show no messages of interest before or after the manual restart and nothing on Falcon, or Falcon recovery taking place.

I am filing this as a Falcon bug because the Falcon becomes inaccessible after the crash. Please let me know this bug should be split in a Falcon and non-Falcon part.

How to repeat:
Please let me know if a simlified test case is needed and I will work to provide it.

Suggested fix:
Falcon recovery should work regardless of the reason the server terminated.
[24 Dec 2007 15:24] Kevin Lewis
Philip, The backtraces provided are not in the Falcon engine, so either the server group should look at it or you should try to provide a simpler test case.
[24 Dec 2007 15:54] Philip Stoev
Yes I realize the server crashes outside of Falcon, however I felt compelled to bring this bug to your attention, given that Falcon is unable to recover after the crash.

I will work on providing a simpler test case.
[25 Dec 2007 10:31] Philip Stoev
It was determined that the Falcon engine was not involved in this.
[16 Feb 2008 10:24] Philip Stoev
After the most recent Falcon changes, Falcon recovery now works just fine when this crash happens. This removes all Falcon involvement in this bug. I am setting this to Verified and assigning to Optimizer.

I will try to deliver a simpler test case, however this is not guaranteed, so can you please take a look at the available information and see if anything can be made out of it?
[17 Feb 2008 12:12] Philip Stoev
Removing myself from this bug, leaving it to be assigned to a developer.
[11 Mar 2008 10:47] Alexey Kopytov
Yes, a simpler test case is needed. I have failed to reproduce the crash after running the iuds2 test on 6.0 for 5+ hours.
[11 Mar 2008 11:07] Philip Stoev
Ok I will work on providing one.
[26 Dec 2008 12:13] Philip Stoev
This has not been observed for the past several dozen test runs.