crash in do_copy_not_null() in maria-5.3 with semijoin
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| MariaDB |
Fix Released
|
Critical
|
Sergey Petrunia | ||
Bug Description
Attaching test data for reproduction. Sometimes it can take a few times to crash. Already upgraded to beta from a trunk, bug still exists.
Best reproduced with:
set optimizer_
Not sure which flag or combo it is, I'm sorry, I didn't have the time to test every combination.
Stacktrace:
110729 22:29:13 [ERROR] mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.
key_buffer_size=0
read_buffer_
max_used_
max_threads=302
threads_connected=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x7f5281b8fd00
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7f526214ce68 thread_stack 0x48000
./bin/mysqld(
./bin/mysqld(
/lib/libpthread
./bin/mysqld() [0x761870]
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld() [0x6af4a2]
./bin/mysqld(
./bin/mysqld() [0x6af4a2]
./bin/mysqld(
./bin/mysqld() [0x6b2133]
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld() [0x63a619]
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
/lib/libpthread
/lib/libc.
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x3ddcbe8): SELECT * FROM t1 WHERE t1.c1 IN ( SELECT t1.c1 FROM t1 LEFT JOIN t2 ON t2.c1 = t1.c1 WHERE t2.c5 >= '2011-02-01 07:00:00' AND t2.c5 <= '2011-03-01 06:59:59' )
Connection ID (thread ID): 3
Status: NOT_KILLED
The manual page at http://
information that should help you find out what is causing the crash.
Writing a core file
Segmentation fault
| Changed in maria: | |
| assignee: | nobody → Sergey Petrunia (sergefp) |
| milestone: | none → 5.3 |
| importance: | Undecided → Critical |
| Changed in maria: | |
| status: | New → Fix Committed |
| Changed in maria: | |
| status: | Fix Committed → Fix Released |

Requires semijoin=on
explain:
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; Start temporary
1 PRIMARY t1 eq_ref PRIMARY PRIMARY 34 test.t2.c1 1 Using index
1 PRIMARY t1 eq_ref PRIMARY PRIMARY 34 test.t2.c1 1 End temporary
simplified test case:
CREATE TABLE t1 ( c1 varchar(32) NOT NULL , c2 int, PRIMARY KEY (c1)) ; 79436), (112396, 350387) ;
INSERT IGNORE INTO t1 VALUES (24276075,
CREATE TABLE t2 ( c1 varchar(32) NOT NULL , c5 int NOT NULL );
backtrace:
#3 <signal handler called> field:: copy_inner (this=0xc6eb288) at sql_select.h:1328 0xc6eb0c0) at sql_select.cc:15585 records= false) at sql_select.cc:15005 join_record (join=0xc697910, join_tab=0xc6eab90, error=0) at sql_select.cc:15205 records= false) at sql_select.cc:15008 join_record (join=0xc697910, join_tab=0xc6ea878, error=0) at sql_select.cc:15205 records= false) at sql_select.cc:15008 array=0xc5d9ce8 , tables=0xc65cf98, wild_num=1, fields=..., conds=0xc6926d0, og_num=0, options= 2147764736, result=0xc692850, unit=0xc5d95b0, select_ lex=0xc5d9a98) done_option= 0) at sql_select.cc:283 sqlcom_ select (thd=0xc5d7108, all_tables= 0xc65cf98) at sql_parse.cc:5087 command (thd=0xc5d7108) at sql_parse.cc:2231 0xc65cd00 "SELECT * FROM t1 WHERE c1 IN ( SELECT t1 .c1 FROM t1 LEFT JOIN t2 ON t2 .c1 = t1 .c1 WHERE c5 != 0 )", length=110, semicolon= 0x4153bf08) at sql_parse.cc:6088
#4 0x0000000000852d08 in do_copy_not_null (copy=0xc6eb2b0) at field_conv.cc:240
#5 0x0000000000758a18 in store_key_
#6 0x0000000000639410 in store_key::copy (this=0xc6eb288) at sql_select.h:1269
#7 0x000000000071ec4d in cp_buffer_from_ref (thd=0xc5d7108, table=0xc68d0b8, ref=0xc6eb0c0) at sql_select.cc:18490
#8 0x000000000072a623 in cmp_buffer_with_ref (thd=0xc5d7108, table=0xc68d0b8, tab_ref=0xc6eb0c0) at sql_select.cc:18472
#9 0x000000000072a99d in join_read_key2 (thd=0xc5d7108, tab=0xc6eaea8, table=0xc68d0b8, table_ref=
#10 0x000000000072ab7b in join_read_key (tab=0xc6eaea8) at sql_select.cc:15568
#11 0x0000000000735098 in sub_select (join=0xc697910, join_tab=0xc6eaea8, end_of_
#12 0x000000000072bb93 in evaluate_
#13 0x00000000007350e8 in sub_select (join=0xc697910, join_tab=0xc6eab90, end_of_
#14 0x000000000072bb93 in evaluate_
#15 0x00000000007350e8 in sub_select (join=0xc697910, join_tab=0xc6ea878, end_of_
#16 0x00000000007362fb in do_select (join=0xc697910, fields=0xc5d9ba0, table=0x0, procedure=0x0) at sql_select.cc:14673
#17 0x0000000000756044 in JOIN::exec (this=0xc697910) at sql_select.cc:2670
#18 0x000000000074ff5c in mysql_select (thd=0xc5d7108, rref_pointer_
order=0x0, group=0x0, having=0x0, proc_param=0x0, select_
at sql_select.cc:2891
#19 0x0000000000756376 in handle_select (thd=0xc5d7108, lex=0xc5d9510, result=0xc692850, setup_tables_
#20 0x00000000006a3046 in execute_
#21 0x00000000006a4d24 in mysql_execute_
#22 0x00000000006adabd in mysql_parse (thd=0xc5d7108,
rawbuf=
found_
#23 0x00000000006ae955 in dispatch_command (command=COM_QUERY, thd=0xc5d7108, packet=0xc653899 "", packet_length=110) at sql_parse.cc:1...