Bug #41500 ndb_basic fails sporadically with "lock wait timeout exceeded"
Submitted: 16 Dec 2008 13:05
Reporter: Sven Sandberg Email Updates:
Status: Verified Impact on me:
None 
Category:Tests: Cluster Severity:S7 (Test Cases)
Version:5.1, 6.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: Failure, lock wait timeout, ndb_basic, pushbuild, sporadic

[16 Dec 2008 13:05] Sven Sandberg
Description:
sporadic pushbuild failure:

ndb.ndb_basic                            [ fail ]

CURRENT_TEST: ndb.ndb_basic
mysqltest: At line 623: query 'select * from t1 order by counter' failed: 1205: Lock wait timeout exceeded; try restarting transaction

The result from queries just before the failure was:
< snip >
drop table t1;
create table t1
(a bigint, b bigint, c bigint, d bigint, 
primary key (a)) 
engine=ndb
max_rows=1;
drop table t1;
create table t1
(counter int(64) NOT NULL auto_increment,
datavalue char(40) default 'XXXX',
primary key (counter)
) ENGINE=ndbcluster;
insert into t1 (datavalue) values ('newval');
insert into t1 (datavalue) values ('newval');
select * from t1 order by counter;
counter	datavalue
1	newval
2	newval
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
insert into t1 (datavalue) select datavalue from t1 where counter < 100;

More results from queries before failure can be found in /dev/shm/var-n_mix-120/2/log/ndb_basic.log

Warnings from just before the error:
Warning 1297 Got temporary error 274 'Time-out in NDB, probably caused by deadlock' from NDB 
Warning 1297 Got temporary error 274 'Time-out in NDB, probably caused by deadlock' from NDB 
Error 1205 Lock wait timeout exceeded; try restarting transaction

 - saving '/dev/shm/var-n_mix-120/2/log/ndb.ndb_basic/' to '/dev/shm/var-n_mix-120/log/ndb.ndb_basic/'

Retrying test, attempt(2/3)...

Note: the failure happens on varying lines of the test case. See xref below.

How to repeat:
https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-6.0-rpl&order=89 sapsrv1/n_mix
xref: http://tinyurl.com/6pxs6u
[23 Feb 2010 13:09] Johan Andersson
Hi,

I can reproduce this. 
I get the  "Got temporary error 274 'Time-out in NDB, probably caused by deadlock' from NDB " from a normal SELECT at a customer. There are no other transactions in play, and the SELECT is committed read.

BR
johan