Bug #48884 | Assertion failed in int join_read_key2(JOIN_TAB*, TABLE*, TABLE_REF*) | ||
---|---|---|---|
Submitted: | 18 Nov 2009 21:14 | Modified: | 9 Feb 2010 8:47 |
Reporter: | Patrick Crews | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 5.0+ | OS: | Any |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | assertion, crashing bug |
[18 Nov 2009 21:14]
Patrick Crews
[18 Nov 2009 21:33]
Patrick Crews
Full MTR crash output: Trying 'gdb' to get a backtrace Core generated by '<path>/mysql-6.0/sql/mysqld' Output from gdb follows. The first stack trace is from the failing thread. The following stack traces are from all threads (so the failing one is duplicated). -------------------------- warning: Can't read pathname for load map: Input/output error. Core was generated by `<path>/mysql-6.0/sql/mysqld --defaults-group-suffi'. Program terminated with signal 6, Aborted. [New process 27551] [New process 27541] [New process 27539] #0 0xb7f56430 in __kernel_vsyscall () #0 0xb7f56430 in __kernel_vsyscall () #1 0xb7f2e1c8 in pthread_kill () from /lib/tls/i686/cmov/libpthread.so.0 #2 0x090dfb8a in my_write_core (sig=6) at stacktrace.c:309 #3 0x084b0e6a in handle_segfault (sig=6) at mysqld.cc:2765 #4 <signal handler called> #5 0xb7f56430 in __kernel_vsyscall () #6 0xb7c776d0 in raise () from /lib/tls/i686/cmov/libc.so.6 #7 0xb7c79098 in abort () from /lib/tls/i686/cmov/libc.so.6 #8 0xb7c705ce in __assert_fail () from /lib/tls/i686/cmov/libc.so.6 #9 0x0865ae0f in join_read_key2 (tab=0xacb5900, table=0xabbbd20, table_ref=0xacb5a34) at sql_select.cc:17126 #10 0x0865af3a in join_read_key (tab=0xacb5900) at sql_select.cc:17076 #11 0x0866275b in sub_select (join=0xacaf438, join_tab=0xacb5900, end_of_records=false) at sql_select.cc:16460 #12 0x0868743b in do_select (join=0xacaf438, fields=0xabdf2ac, table=0x0, procedure=0x0) at sql_select.cc:16023 #13 0x086c8396 in JOIN::exec (this=0xacaf438) at sql_select.cc:2949 #14 0x083d05b6 in subselect_single_select_engine::exec (this=0xabdfef8) at item_subselect.cc:2316 #15 0x083dc577 in Item_subselect::exec (this=0xabdfe30) at item_subselect.cc:283 #16 0x083dca29 in Item_in_subselect::exec (this=0xabdfe30) at item_subselect.cc:333 #17 0x083c818e in Item_in_subselect::val_bool (this=0xabdfe30) at item_subselect.cc:928 #18 0x0828bc93 in Item::val_bool_result (this=0xabdfe30) at ../item.h:760 #19 0x08316872 in Item_in_optimizer::val_int (this=0xabe01e8) at item_cmpfunc.cc:1658 #20 0x08312783 in Item_cond_xor::val_int (this=0xabdffa8) at item_cmpfunc.cc:5030 #21 0x08661af7 in evaluate_join_record (join=0xacaa5d8, join_tab=0xacb4ea8, error=0) at sql_select.cc:16645 #22 0x08662bd1 in sub_select (join=0xacaa5d8, join_tab=0xacb4ea8, end_of_records=false) at sql_select.cc:16495 #23 0x0868743b in do_select (join=0xacaa5d8, fields=0xac336dc, table=0x0, procedure=0x0) at sql_select.cc:16023 #24 0x086c8396 in JOIN::exec (this=0xacaa5d8) at sql_select.cc:2949 #25 0x086b9313 in mysql_select (thd=0xac321e8, rref_pointer_array=0xac3374c, tables=0xabdebe8, wild_num=0, fields=@0xac336dc, conds=0xabdffa8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748352, result=0xabe00b0, unit=0xac33190, select_lex=0xac33648) at sql_select.cc:3140 #26 0x086c8a1c in handle_select (thd=0xac321e8, lex=0xac33134, result=0xabe00b0, setup_tables_done_option=0) at sql_select.cc:308 #27 0x084e4456 in execute_sqlcom_select (thd=0xac321e8, all_tables=0xabdebe8) at sql_parse.cc:4961 #28 0x084e8ebd in mysql_execute_command (thd=0xac321e8) at sql_parse.cc:2156 #29 0x08505a9a in mysql_parse (thd=0xac321e8, inBuf=0xabde9a8 "SELECT `date_key` \nFROM C \nWHERE ( `int_key` , `int_key` ) IN ( \nSELECT `int_key` , `pk` \nFROM CC ) XOR '2001-03-28'", length=126, found_semicolon=0xb7334984) at sql_parse.cc:5975 #30 0x08507f37 in dispatch_command (command=COM_QUERY, thd=0xac321e8, packet=0xabb6cc9 "", packet_length=128) at sql_parse.cc:1076 #31 0x0850c36e in do_command (thd=0xac321e8) at sql_parse.cc:758 #32 0x084d236f in handle_one_connection (arg=0xac321e8) at sql_connect.cc:1164 #33 0xb7f294ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #34 0xb7d3049e in clone () from /lib/tls/i686/cmov/libc.so.6 Thread 3 (process 27539): #0 0xb7f56430 in __kernel_vsyscall () #1 0xb7d287b1 in select () from /lib/tls/i686/cmov/libc.so.6 #2 0x084b2846 in handle_connections_sockets () at mysqld.cc:5362 #3 0x084c1987 in main (argc=8, argv=0xbfa70134) at mysqld.cc:4855 Thread 2 (process 27541): #0 0xb7f56430 in __kernel_vsyscall () #1 0xb7f31300 in sigwait () from /lib/tls/i686/cmov/libpthread.so.0 #2 0x084ae04d in signal_hand (arg=0x0) at mysqld.cc:2967 #3 0xb7f294ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #4 0xb7d3049e in clone () from /lib/tls/i686/cmov/libc.so.6 Thread 1 (process 27551): #0 0xb7f56430 in __kernel_vsyscall () #1 0xb7f2e1c8 in pthread_kill () from /lib/tls/i686/cmov/libpthread.so.0 #2 0x090dfb8a in my_write_core (sig=6) at stacktrace.c:309 #3 0x084b0e6a in handle_segfault (sig=6) at mysqld.cc:2765 #4 <signal handler called> #5 0xb7f56430 in __kernel_vsyscall () #6 0xb7c776d0 in raise () from /lib/tls/i686/cmov/libc.so.6 #7 0xb7c79098 in abort () from /lib/tls/i686/cmov/libc.so.6 #8 0xb7c705ce in __assert_fail () from /lib/tls/i686/cmov/libc.so.6 #9 0x0865ae0f in join_read_key2 (tab=0xacb5900, table=0xabbbd20, table_ref=0xacb5a34) at sql_select.cc:17126 #10 0x0865af3a in join_read_key (tab=0xacb5900) at sql_select.cc:17076 #11 0x0866275b in sub_select (join=0xacaf438, join_tab=0xacb5900, end_of_records=false) at sql_select.cc:16460 #12 0x0868743b in do_select (join=0xacaf438, fields=0xabdf2ac, table=0x0, procedure=0x0) at sql_select.cc:16023 #13 0x086c8396 in JOIN::exec (this=0xacaf438) at sql_select.cc:2949 #14 0x083d05b6 in subselect_single_select_engine::exec (this=0xabdfef8) at item_subselect.cc:2316 #15 0x083dc577 in Item_subselect::exec (this=0xabdfe30) at item_subselect.cc:283 #16 0x083dca29 in Item_in_subselect::exec (this=0xabdfe30) at item_subselect.cc:333 #17 0x083c818e in Item_in_subselect::val_bool (this=0xabdfe30) at item_subselect.cc:928 #18 0x0828bc93 in Item::val_bool_result (this=0xabdfe30) at ../item.h:760 #19 0x08316872 in Item_in_optimizer::val_int (this=0xabe01e8) at item_cmpfunc.cc:1658 #20 0x08312783 in Item_cond_xor::val_int (this=0xabdffa8) at item_cmpfunc.cc:5030 #21 0x08661af7 in evaluate_join_record (join=0xacaa5d8, join_tab=0xacb4ea8, error=0) at sql_select.cc:16645 #22 0x08662bd1 in sub_select (join=0xacaa5d8, join_tab=0xacb4ea8, end_of_records=false) at sql_select.cc:16495 #23 0x0868743b in do_select (join=0xacaa5d8, fields=0xac336dc, table=0x0, procedure=0x0) at sql_select.cc:16023 #24 0x086c8396 in JOIN::exec (this=0xacaa5d8) at sql_select.cc:2949 #25 0x086b9313 in mysql_select (thd=0xac321e8, rref_pointer_array=0xac3374c, tables=0xabdebe8, wild_num=0, fields=@0xac336dc, conds=0xabdffa8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748352, result=0xabe00b0, unit=0xac33190, select_lex=0xac33648) at sql_select.cc:3140 #26 0x086c8a1c in handle_select (thd=0xac321e8, lex=0xac33134, result=0xabe00b0, setup_tables_done_option=0) at sql_select.cc:308 #27 0x084e4456 in execute_sqlcom_select (thd=0xac321e8, all_tables=0xabdebe8) at sql_parse.cc:4961 #28 0x084e8ebd in mysql_execute_command (thd=0xac321e8) at sql_parse.cc:2156 #29 0x08505a9a in mysql_parse (thd=0xac321e8, inBuf=0xabde9a8 "SELECT `date_key` \nFROM C \nWHERE ( `int_key` , `int_key` ) IN ( \nSELECT `int_key` , `pk` \nFROM CC ) XOR '2001-03-28'", length=126, found_semicolon=0xb7334984) at sql_parse.cc:5975 #30 0x08507f37 in dispatch_command (command=COM_QUERY, thd=0xac321e8, packet=0xabb6cc9 "", packet_length=128) at sql_parse.cc:1076 #31 0x0850c36e in do_command (thd=0xac321e8) at sql_parse.cc:758 #32 0x084d236f in handle_one_connection (arg=0xac321e8) at sql_connect.cc:1164 #33 0xb7f294ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #34 0xb7d3049e in clone () from /lib/tls/i686/cmov/libc.so.6
[19 Nov 2009 13:20]
Philip Stoev
I can not reproduce this with 5.1.30 , next-mr-bugfixing and 6.0-codebase-bugfixing. Patrick, does the MTR test case work for you, or just the RQG test case? If it is the RQG test only, then maybe a sequence of queries is required to trigger the problem, not just the final query.
[19 Nov 2009 13:36]
Patrick Crews
The test case works for me with servers (all versions) built using compile-pentium-gcov and compile-pentium-debug-max. From a similar bug - Bug#48709 Assertion failed in sql_select.cc:11782: int join_read_key(JOIN_TAB*), Kostja has said that it shouldn't affect production (makes me think it is limited to -debug builds)
[9 Feb 2010 8:47]
Sergei Glukhov
fixed in Joro's patch for bug#48709, duplicated.