Bug #49493 assertion !table->file || table->file->inited == handler::NONE on DDL workload
Submitted: 7 Dec 2009 9:20 Modified: 7 Dec 2009 11:49
Reporter: Philip Stoev Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Locking Severity:S3 (Non-critical)
Version:6.0-codebase-bugfixing OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[7 Dec 2009 9:20] Philip Stoev
Description:
When executing a DDL-heavy RQG workload, mysqld asserted as follows:

#6  0x000000315a42bec9 in __assert_fail () from /lib64/libc.so.6
#7  0x00000000008cc457 in close_thread_table (thd=0x7f323837c768, table_ptr=0x7f323837c7f8) at sql_base.cc:1529
#8  0x00000000008cd492 in close_open_tables (thd=0x7f323837c768) at sql_base.cc:1261
#9  0x00000000008cdd6c in close_thread_tables (thd=0x7f323837c768) at sql_base.cc:1504
#10 0x0000000000c1432a in sp_lex_keeper::reset_lex_and_exec_core (this=0x7f323856ba00, thd=0x7f323837c768, nextp=0x7f323f7fc508, open_tables=false,
    instr=0x7f323856b9c0) at sp_head.cc:2756
#11 0x0000000000c20f14 in sp_instr_stmt::execute (this=0x7f323856b9c0, thd=0x7f323837c768, nextp=0x7f323f7fc508) at sp_head.cc:2863
#12 0x0000000000c187dc in sp_head::execute (this=0x7f3238569d50, thd=0x7f323837c768) at sp_head.cc:1245
#13 0x0000000000c1b69a in sp_head::execute_trigger (this=0x7f3238569d50, thd=0x7f323837c768, db_name=0x7f32384095d8, table_name=0x7f32384095e8,
    grant_info=0x7f32385f5d18) at sp_head.cc:1554
#14 0x0000000000c3a3b1 in Table_triggers_list::process_triggers (this=0x7f32385f5ba0, thd=0x7f323837c768, event=TRG_EVENT_DELETE,
    time_type=TRG_ACTION_AFTER, old_row_is_record1=false) at sql_trigger.cc:2016
#15 0x00000000009b8328 in multi_delete::send_data (this=0x3c65058, values=@0x7f32385492c0) at sql_delete.cc:789
#16 0x000000000090056b in end_send (join=0x7f3238597240, join_tab=0x3c65ad8, end_of_records=false) at sql_select.cc:17555
#17 0x0000000000919f7c in evaluate_join_record (join=0x7f3238597240, join_tab=0x3c65828, error=0) at sql_select.cc:16783
#18 0x000000000091a8b9 in sub_select (join=0x7f3238597240, join_tab=0x3c65828, end_of_records=false) at sql_select.cc:16531
#19 0x0000000000937a63 in do_select (join=0x7f3238597240, fields=0x7f32385492c0, table=0x0, procedure=0x0) at sql_select.cc:16045
#20 0x000000000096bc5a in JOIN::exec (this=0x7f3238597240) at sql_select.cc:2953
#21 0x00000000009601ed in mysql_select (thd=0x7f323837c768, rref_pointer_array=0x7f32385493a0, tables=0x7f323854a3f8, wild_num=0, fields=@0x7f32385492c0,
    conds=0x7f32384b8308, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=3489925760, result=0x3c65058, unit=0x7f3238548b28,
    select_lex=0x7f32385491b8) at sql_select.cc:3144
#22 0x000000000080be50 in mysql_execute_command (thd=0x7f323837c768) at sql_parse.cc:3427
#23 0x0000000000995275 in Prepared_statement::execute (this=0x7f32385342c8, expanded_query=0x7f323f7fe280, open_cursor=false) at sql_prepare.cc:3768
#24 0x000000000099d72a in Prepared_statement::execute_loop (this=0x7f32385342c8, expanded_query=0x7f323f7fe280, open_cursor=false, packet=0x0,
    packet_end=0x0) at sql_prepare.cc:3401
#25 0x000000000099dcc9 in mysql_sql_stmt_execute (thd=0x7f323837c768) at sql_prepare.cc:2574
#26 0x0000000000804610 in mysql_execute_command (thd=0x7f323837c768) at sql_parse.cc:2166
#27 0x0000000000817b31 in mysql_parse (thd=0x7f323837c768, inBuf=0x3c64620 "EXECUTE st1", length=11, found_semicolon=0x7f323f7ffef0) at sql_parse.cc:5975
#28 0x0000000000819580 in dispatch_command (command=COM_QUERY, thd=0x7f323837c768, packet=0x7f323838b319 " EXECUTE st1 ", packet_length=13)
    at sql_parse.cc:1076
#29 0x000000000081c4e0 in do_command (thd=0x7f323837c768) at sql_parse.cc:758
#30 0x00000000007f307e in handle_one_connection (arg=0x7f323837c768) at sql_connect.cc:1164
#31 0x000000315b0073da in start_thread () from /lib64/libpthread.so.0
#32 0x000000315a4e627d in clone () from /lib64/libc.so.6

(gdb) frame 7
#7  0x00000000008cc457 in close_thread_table (thd=0x7f323837c768, table_ptr=0x7f323837c7f8) at sql_base.cc:1529
1529      DBUG_ASSERT(!table->file || table->file->inited == handler::NONE);
(gdb) print table
$1 = (TABLE *) 0x7f3238683e18
(gdb) print table->file
$2 = (class handler *) 0x7f3238433560
(gdb) print table->file->inited
$3 = handler::RND

seems like no memory is corrupted and all objects are properly formed.

How to repeat:
If this is repeatable, a test case will be provided. The core and the binary will be uploaded shortly.
[7 Dec 2009 9:34] Philip Stoev
Core and binary:

http://mysql-systemqa.s3.amazonaws.com/var-bug49493.zip

source:

revision-id: alik@sun.com-20091203092413-5tsz2k3tqtev6965
date: 2009-12-03 12:24:13 +0300
build-date: 2009-12-07 11:21:35 +0200
revno: 3752
branch-nick: 6.0-codebase-bugfixing
[7 Dec 2009 10:52] Jon Olav Hauglid
Might be related to Bug #48246
[7 Dec 2009 11:49] Philip Stoev
Duplicate of 48246 I did not mean to file the same assertion twice.