[MDEV-7861] main.innodb_mysql_lock fails sporadically in buildbot Created: 2015-03-27  Updated: 2020-06-19  Resolved: 2020-03-26

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 5.5, 10.0, 10.1, 10.2
Fix Version/s: 10.3.23

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: tests

Issue Links:
Relates
relates to MDEV-22947 main.innodb_mysql_lock fails sporadic... Closed
relates to MDEV-7069 Fix buildbot failures in main server ... Stalled

 Description   

See for example
http://buildbot.askmonty.org/buildbot/builders/kvm-bintar-centos5-amd64/builds/1272/steps/test/logs/stdio

CURRENT_TEST: main.innodb_mysql_lock
mysqltest: At line 51: query 'INSERT INTO t1 VALUES (2)' succeeded - should have failed with errno 1213...
 
The result from queries just before the failure was:
#
# Bug #22876 Four-way deadlock
#
DROP TABLE IF EXISTS t1;
# Connection 1
set @@autocommit=0;
CREATE TABLE t1(s1 INT UNIQUE) ENGINE=innodb;
INSERT INTO t1 VALUES (1);
# Connection 2
set @@autocommit=0;
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (1);
# Connection 3
set @@autocommit=0;
DROP TABLE t1;
# Connection 1
# Connection 1 is now holding the lock.
# Issuing insert from connection 1 while connection 2&3 
# is waiting for the lock should give a deadlock error.
INSERT INTO t1 VALUES (2);

Retry passed.

According to cross-reference, the failure has been happening since 2011, very rarely, several times a year at most, on different builders (deb, bintar, fulltest, windows), debug and release builds, ps-protocol and normal, always on the same statement.



 Comments   
Comment by Alice Sherepa [ 2017-11-06 ]

http://buildbot.askmonty.org/buildbot/builders/kvm-deb-zesty-amd64/builds/894/steps/mtr/logs/stdio

Comment by Alice Sherepa [ 2017-12-01 ]

also on 10.3 http://buildbot.askmonty.org/buildbot/builders/kvm-fulltest/builds/11190/steps/mtr_nm/logs/stdio

Comment by Laurynas Biveinis [ 2018-01-25 ]

https://github.com/mysql/mysql-server/commit/0454f5aba958117a777bab005ed36815a073d3c7

Comment by Michael Widenius [ 2020-03-26 ]

MySQL patch is good and works also for MariaDB. Now porting this to MariaDB

Comment by Michael Widenius [ 2020-03-26 ]

Pushed in 10.2

Generated at Thu Feb 08 07:22:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.