Bug #69969 Failing assertion: prebuilt->trx->conc_state == 1 from subselect
| Submitted: | 9 Aug 2013 5:47 | Modified: | 7 Feb 2014 2:14 |
|---|---|---|---|
| Reporter: | Raghavendra Prabhu | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
| Version: | 5.5.33 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | crash, subselect | ||
[9 Aug 2013 5:47]
Raghavendra Prabhu
[9 Aug 2013 5:49]
Raghavendra Prabhu
RQG Grammar
Attachment: subselect.yy (application/octet-stream, text), 3.00 KiB.
[9 Aug 2013 5:49]
Raghavendra Prabhu
Gendata file
Attachment: data.zz (application/octet-stream, text), 1.17 KiB.
[9 Aug 2013 5:50]
Raghavendra Prabhu
Full backtrace of the crash.
Attachment: full-bt-of-crash (application/octet-stream, text), 326.99 KiB.
[9 Aug 2013 5:53]
Raghavendra Prabhu
The binaries were built from bzr source upto rev. 4412
[13 Aug 2013 10:17]
Raghavendra Prabhu
One more thing, you need the debug (UNIV_DEBUG) build of mysql for this.
[13 Aug 2013 14:36]
MySQL Verification Team
Sorry, we need to know the exact version of RQG that you have used. Thank you in advance !!!!
[13 Aug 2013 18:32]
Shane Bester
InnoDB: Assertion failure in thread 9048 in file ha_innodb.cc line 5642 InnoDB: Failing assertion: prebuilt->trx->conc_state == 1 mysqld-debug.exe!my_sigabrt_handler()[my_thr_init.c:501] mysqld-debug.exe!raise()[winsig.c:590] mysqld-debug.exe!abort()[abort.c:71] mysqld-debug.exe!ha_innobase::unlock_row()[ha_innodb.cc:5642] mysqld-debug.exe!ha_partition::unlock_row()[ha_partition.cc:3190] mysqld-debug.exe!find_all_keys()[filesort.cc:651] mysqld-debug.exe!filesort()[filesort.cc:246] mysqld-debug.exe!mysql_delete()[sql_delete.cc:247] mysqld-debug.exe!mysql_execute_command()[sql_parse.cc:3039] mysqld-debug.exe!mysql_parse()[sql_parse.cc:5632] mysqld-debug.exe!dispatch_command()[sql_parse.cc:1037] mysqld-debug.exe!do_command()[sql_parse.cc:773] mysqld-debug.exe!do_handle_one_connection()[sql_connect.cc:853] mysqld-debug.exe!handle_one_connection()[sql_connect.cc:772] mysqld-debug.exe!pthread_start()[my_winthread.c:61] mysqld-debug.exe!_callthreadstartex()[threadex.c:348] mysqld-debug.exe!_threadstartex()[threadex.c:331]
[13 Aug 2013 18:46]
Shane Bester
a pseudo-random testcase for the RQG-impaired :)
Attachment: bug69969.c (text/plain), 6.98 KiB.
[13 Aug 2013 18:50]
Shane Bester
-----
init:
-----
drop table if exists t1,t2;
create table t1(a char(255) primary key,b char(255),key(b) )engine=innodb partition by key(a) partitions 5;
create table t2(c char(255) primary key,d char(255),key(d) )engine=innodb partition by key(c) partitions 5;
-----
Testcase randomly runs the statements:
----
start transaction;
insert ignore into t1(a,b) values ('?','1'); # random tinyint
insert ignore into t2(c,d) values ('?','2'); # random tinyint
replace into t1 select * from t2;
replace into t2 select * from t1;
delete from t1 where b not in ( select c from t2 ) order by a desc,b asc;
commit;
----
[13 Aug 2013 21:27]
Raghavendra Prabhu
@Sinisa, The lp:randgen HEAD from launchpad should do (with .yy and .zz files I have provided). @Shane, Thanks for verifying and the test case.
[4 Sep 2013 20:53]
Roel Van de Paar
This is seen as: 130824 10:46:46 InnoDB: Assertion failure in thread 140702210119424 in file ha_innodb.cc line 6589 InnoDB: Failing assertion: prebuilt->trx->state == 1 In the server.
[4 Sep 2013 20:57]
Roel Van de Paar
error log
Attachment: master_6_050913-0654.err (application/octet-stream, text), 69.54 KiB.
[4 Sep 2013 21:10]
Roel Van de Paar
thread apply all bt on core
Attachment: gdb_6_050913-0654_STD.txt (text/plain), 87.68 KiB.
[4 Sep 2013 21:11]
Roel Van de Paar
thread apply all bt FULL on core
Attachment: gdb_6_050913-0654_FULL.txt (text/plain), 573.69 KiB.
[4 Sep 2013 21:14]
Roel Van de Paar
Can someone at oracle please update the bug tile to "Failing assertion: prebuilt->trx->conc_state == 1 from subselect | Failing assertion: prebuilt->trx->state == 1" so that it is easier to find via Google on that assertion text? Thanks.
[16 Sep 2013 17:52]
MySQL Verification Team
Roel, You would like to add a string : "| Failing assertion: prebuilt->trx->state == 1" to the title ??? We can't. It is too long. We can only replace one assertion with another. What say you ???
[17 Sep 2013 0:28]
Roel Van de Paar
Ok, how about Failing assertion: prebuilt->trx->conc_state == 1 | prebuilt->trx->state == 1 That will at least make both searchable in Google
[7 Feb 2014 2:14]
Paul DuBois
Noted in 5.5.37, 5.6.17, 5.7.4 changelog. A deadlock error occurring during subquery execution could cause an assertion to be raised.
[7 Feb 2014 22:09]
Roel Van de Paar
Pleeeeaaasse update the title
[27 Mar 2014 13:43]
Laurynas Biveinis
5.5$ bzr log -r 4577
------------------------------------------------------------
revno: 4577
committer: mithun <mithun.c.y@oracle.com>
branch nick: mysql-5.5
timestamp: Thu 2014-01-09 11:17:51 +0530
message:
Bug #17307201 : FAILING ASSERTION: PREBUILT->TRX->CONC_STATE == 1
FROM SUBSELECT
ISSUE : In function find_all_keys.
If selected row do not satisfy condition
then we call unlock_row to release the locked
row. Suppose if we have subquery in condition
and we have an innodb error during its execution.
Then we should not call the unlock_row. If the error
is because of deadlock, innodb will rollback the
transaction. And calling unlock_row without
transaction is an invalid case hence an assertion
failure.
SOLUTION : We call unlock_row only if only there is no
error occurred previously.
The solution is back ported from 5.6
defect number 14226481
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.