Bug #9933 Can't lock file (errno: 4009)
Submitted: 15 Apr 2005 14:55 Modified: 24 Sep 2005 15:35
Reporter: Joerg Bruehe Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.4 OS:IBM AIX (AIX 5.2 (64) + IRIX (64))
Assigned to: CPU Architecture:Any

[15 Apr 2005 14:55] Joerg Bruehe
Description:
Release build of 5.0.4, based on ChangeSet
  1.1893 05/04/13 13:17:39 mskold@mysql.com +1 -0
  Fixed failed merge

Problem happens only in "cluster" build, whereas "max" passes the test!

Symptom:
=== quote start ===
ndb_insert                     [ fail ]

Errors are (from /home/mysqldev/aix52-64bit/test/mysql-cluster-5.0.4-beta-ibm-aix5.2.0.0-powerpc-64bit/mysql-test/var/log/mysqltest-time) :
/home/mysqldev/aix52-64bit/test/mysql-cluster-5.0.4-beta-ibm-aix5.2.0.0-powerpc-64bit/bin/mysqltest: At line 447: query 'SELECT COUNT(*) FROM t1' failed: 1015: Can't lock file (errno: 4009)
(the last lines may be the most important ones)

Ending Tests
=== quote end ===

When running '--ps-protocol', it is reported for the "prepare" phase:
/home/mysqldev/aix52-64bit/test/mysql-cluster-5.0.4-beta-ibm-aix5.2.0.0-powerpc-64bit/bin/mysqltest: At line 447: unable to prepare statement 'SELECT COUNT(*) FROM t1': Can't lock file (errno: 4009) (mysql_stmt_errno=1015 returned=1)

Both in the "detault" and in the "PS protocol" runs, on both machines, subsequently the tests "ndb_limit", "ndb_restore", and "ndb_truncate" also fail (errors 4009 or 4028), and I assume these might be related or consequences.

How to repeat:
Build + test.
[24 Sep 2005 15:35] Valeriy Kravchuk
I tried to repeat the described behaviour on 64-bit Linux platform with one of 5.0.14-rc builds, but with no luck:

-bash-2.05b$ cd mysql-test/
-bash-2.05b$ ./mysql-test-run ndb_insert ndb_limit ndb_restore ndb_truncate
Installing Test Databases
Removing Stale Files
Installing Master Databases
running  ../libexec/mysqld --no-defaults --bootstrap --skip-grant-tables     --b
asedir=.. --datadir=mysql-test/var/master-data --skip-innodb --skip-ndbcluster --skip-bdb
Installing Master Databases 1
running  ../libexec/mysqld --no-defaults --bootstrap --skip-grant-tables     --basedir=.. --datadir=mysql-test/var/master-data1 --skip-innodb --skip-ndbcluster
--skip-bdb
Installing Slave Databases
running  ../libexec/mysqld --no-defaults --bootstrap --skip-grant-tables     --basedir=.. --datadir=mysql-test/var/slave-data --skip-innodb --skip-ndbcluster --skip-bdb
Manager disabled, skipping manager start.
Starting ndbcluster
Starting ndbd
Starting ndbd
Waiting for started...
NDBT_ProgramExit: 0 - OK
Connected to Management Server at: localhost:9350
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=1    @127.0.0.1  (Version: 5.0.14, Nodegroup: 0, Master)
id=2    @127.0.0.1  (Version: 5.0.14, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=3    @127.0.0.1  (Version: 5.0.14)

[mysqld(API)]   4 node(s)
id=4 (not connected, accepting connect from any host)
id=5 (not connected, accepting connect from any host)
id=6 (not connected, accepting connect from any host)
id=7 (not connected, accepting connect from any host)

Loading Standard Test Databases
Starting Tests

TEST                            RESULT
-------------------------------------------------------
ndb_insert                     [ pass ]
ndb_limit                      [ pass ]
ndb_restore                    [ pass ]
ndb_truncate                   [ pass ]
-------------------------------------------------------

Ending Tests
Shutting-down MySQL daemon

Master shutdown finished
Slave shutdown finished
All 4 tests were successful.

-bash-2.05b$ uname -a
Linux nocona... 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:46:36 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux

The same results with --ps-protocol:

-bash-2.05b$ ./mysql-test-run --ps-protocol ndb_insert ndb_limit ndb_restore ndb_truncate
Installing Test Databases
Removing Stale Files
Installing Master Databases
running  ../libexec/mysqld --no-defaults --bootstrap --skip-grant-tables     --basedir=.. --datadir=mysql-test/var/master-data --skip-innodb --skip-ndbcluster --skip-bdb
Installing Master Databases 1
running  ../libexec/mysqld --no-defaults --bootstrap --skip-grant-tables     --basedir=.. --datadir=mysql-test/var/master-data1 --skip-innodb --skip-ndbcluster
--skip-bdb
Installing Slave Databases
running  ../libexec/mysqld --no-defaults --bootstrap --skip-grant-tables     --basedir=.. --datadir=mysql-test/var/slave-data --skip-innodb --skip-ndbcluster --skip-bdb
Manager disabled, skipping manager start.
Starting ndbcluster
Starting ndbd
find: /users/vkravchuk/dbs/5.0-nocona/mysql-test/var/ndbcluster-9350/ndb_1_fs/D1
/DBDICT/T4: No such file or directory
Starting ndbd
find: /users/vkravchuk/dbs/5.0-nocona/mysql-test/var/ndbcluster-9350/ndb_1_fs/D4
/DBACC: No such file or directory
find: /users/vkravchuk/dbs/5.0-nocona/mysql-test/var/ndbcluster-9350/ndb_2_fs/D1
/DBDICT/T9: No such file or directory
Waiting for started...
NDBT_ProgramExit: 0 - OK
Connected to Management Server at: localhost:9350
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=1    @127.0.0.1  (Version: 5.0.14, Nodegroup: 0, Master)
id=2    @127.0.0.1  (Version: 5.0.14, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=3    @127.0.0.1  (Version: 5.0.14)

[mysqld(API)]   4 node(s)
id=4 (not connected, accepting connect from any host)
id=5 (not connected, accepting connect from any host)
id=6 (not connected, accepting connect from any host)
id=7 (not connected, accepting connect from any host)

Loading Standard Test Databases
Starting Tests

TEST                            RESULT
-------------------------------------------------------
ndb_insert                     [ pass ]
ndb_limit                      [ pass ]
ndb_restore                    [ pass ]
ndb_truncate                   [ pass ]
-------------------------------------------------------

Ending Tests
Shutting-down MySQL daemon

Master shutdown finished
Slave shutdown finished
All 4 tests were successful.

I used the following configure command to build:

CFLAGS="-O3" CC=gcc CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/users/vkravchuk/dbs/5.0-nocona --with-mysqld-user=vkravchuk --with-charset=utf8 --with-extra-charsets=all  --with-big-tables --with-innodb --with-ndbcluster

Please, try the newer version of MySQL (5.0.12-beta at least) and inform about the results. Do you think the bug is AIX- or IRIX-specific only?