Bug #19382 ndb_basic.test crashes/fails w. "Table definition has changed, please retry..."
Submitted: 26 Apr 2006 19:01 Modified: 4 May 2006 21:50
Reporter: Sergey Petrunya Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.1-bk OS:
Assigned to: CPU Architecture:Any

[26 Apr 2006 19:01] Sergey Petrunya
Description:
When I run ./mysql-test-run.pl --mysqld=--binlog-format=statement I have  ndb_basic.test to either crash or fail with an "Table definition has changed, please retry transaction" error.

When I run ndb_basic.test alone it seems to always pass. Couple of tries with --star-from={several-tests-before-ndb_basic.test} also succeeded.

I was able to repeat the failure on two x86/Linux machines, both multi-CPU.

How to repeat:
Compile 5.1 tree with compile-pentium-debug-max, run
./mysql-test-run.pl --mysqld=--binlog-format=statement

and get this:

ndb_basic                      [ fail ]

Errors are (from /home/psergey/mysql-5.1-merge2/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 38: query 'UPDATE t1 SET pk1=pk1 + 1' failed: 2013: Lost connection to MySQL server
 during query
(the last lines may be the most important ones)
Result from queries before failure can be found in r/ndb_basic.log

Aborting: ndb_basic failed in default mode. To continue, re-run with '--force'.
Ending Tests

----------------------------------------------
or this: 

ndb_basic                      [ fail ]

Errors are (from /data/users/spetrunia/mysql-5.1-merge2-clean/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 53: query 'UPDATE t1 SET attr1 = 9998 WHERE pk1 < 1000' failed: 1412: Table definition has changed, please retry transaction
(the last lines may be the most important ones)
Result from queries before failure can be found in r/ndb_basic.log

Aborting: ndb_basic failed in default mode. To continue, re-run with '--force'.
Ending Tests
Shutting-down MySQL daemon
[26 Apr 2006 19:03] Sergey Petrunya
The stacktrace from the core file: (I'll keep the tree+core file for some time, can look up more info if required)

#0  0xb7d343e1 in kill () from /lib/libc.so.6
(gdb) wher
#0  0xb7d343e1 in kill () from /lib/libc.so.6
#1  0xb7e92131 in pthread_kill () from /lib/libpthread.so.0
#2  0x08393ab9 in write_core (sig=6) at stacktrace.c:220
#3  0x0823a3c4 in handle_segfault (sig=6) at mysqld.cc:2148
#4  0xb7e94e55 in __pthread_sighandler () from /lib/libpthread.so.0
#5  <signal handler called>
#6  0xb7d343e1 in kill () from /lib/libc.so.6
#7  0xb7e92131 in pthread_kill () from /lib/libpthread.so.0
#8  0xb7e924ab in raise () from /lib/libpthread.so.0
#9  0xb7d34174 in raise () from /lib/libc.so.6
#10 0xb7d3564d in abort () from /lib/libc.so.6
#11 0xb7d2d59f in __assert_fail () from /lib/libc.so.6
#12 0x085ba893 in Ndb::check_send_timeout (this=0x8b26048) at Ndbif.cpp:1060
#13 0x085ba6fb in Ndb::pollCompleted (this=0x8b26048, aCopyArray=0xb7d09034) at Ndbif.cpp:1036
#14 0x085bb0f9 in Ndb::poll_trans (this=0x8b26048, aMillisecondNumber=360000, minNoOfEventsToWakeup=1, 
    pg=0xb7d0a054) at Ndbif.cpp:1330
#15 0x085bb06b in Ndb::sendPollNdb (this=0x8b26048, aMillisecondNumber=360000, minNoOfEventsToWakeup=1, 
    forceSend=1) at Ndbif.cpp:1314
#16 0x085be7cf in NdbTransaction::executeNoBlobs (this=0x8b3bb18, aTypeOfExec=NoCommit, abortOption=AbortOnError, 
    forceSend=1) at NdbTransaction.cpp:442
#17 0x085be269 in NdbTransaction::execute (this=0x8b3bb18, aTypeOfExec=NoCommit, abortOption=AbortOnError, 
    forceSend=1) at NdbTransaction.cpp:273
#18 0x0840c228 in execute_no_commit (h=0x8b72300, trans=0x8b3bb18) at ha_ndbcluster.cc:269
#19 0x083f0042 in ha_ndbcluster::complemented_read (this=0x8b72300, old_data=0x8b731e0 "", new_data=0x8b731c0 "", 
    old_part_id=0) at ha_ndbcluster.cc:1836
#20 0x083f2a48 in ha_ndbcluster::update_row (this=0x8b72300, old_data=0x8b731e0 "", new_data=0x8b731c0 "")
    at ha_ndbcluster.cc:2758
#21 0x0832fbf7 in handler::ha_update_row (this=0x8b72300, old_data=0x8b731e0 "", new_data=0x8b731c0 "")
    at handler.cc:3319
#22 0x082cc57f in mysql_update (thd=0xb51c7950, table_list=0x8b33fd8, fields=@0xb51c7c58, values=@0xb51c7e34, 
    conds=0x0, order_num=0, order=0x0, limit=18446744073709551614, handle_duplicates=DUP_ERROR, ignore=false)
    at sql_update.cc:537
#23 0x08257689 in mysql_execute_command (thd=0xb51c7950) at sql_parse.cc:3230
#24 0x0825f0cd in mysql_parse (thd=0xb51c7950, inBuf=0x8b33f58 "UPDATE t1 SET pk1=pk1 + 1", length=25)
    at sql_parse.cc:5861
#25 0x082536f3 in dispatch_command (command=COM_QUERY, thd=0xb51c7950, 
    packet=0xb51d8919 "UPDATE t1 SET pk1=pk1 + 1", packet_length=26) at sql_parse.cc:1736
#26 0x08252ed8 in do_command (thd=0xb51c7950) at sql_parse.cc:1532
#27 0x08251f4d in handle_one_connection (arg=0xb51c7950) at sql_parse.cc:1174
#28 0xb7e8f13d in pthread_start_thread () from /lib/libpthread.so.0
#29 0xb7dc11ba in clone () from /lib/libc.so.6
[27 Apr 2006 14:57] Valeriy Kravchuk
The test passed OK for me on today's BK build:

openxs@suse:~/dbs/5.1/mysql-test> ./mysql-test-run.pl --mysqld=--binlog-format=statement ndb_basic

...

TEST                           RESULT         TIME (ms)
-------------------------------------------------------

ndb_basic                      [ pass ]          80178
-------------------------------------------------------
...

Will it fail for you when run alone?
[28 Apr 2006 7:03] Sergey Petrunya
Valeriy, it will pass when run alone.

Quoting the bug description:

>>>> When I run ndb_basic.test alone it seems to always pass. Couple of tries with
>>>> --star-from={several-tests-before-ndb_basic.test} also succeeded.
[28 Apr 2006 14:17] Jim Winstead
I've seen the same test failure, too. I also get a failure of ndb_lock when I run the test suite with --force, but not when it is run alone.
[28 Apr 2006 16:02] Valeriy Kravchuk
Yes, when run amond all other tests, ndb_basic failed for me also:

...
ndb_basic                      [ fail ]

Errors are (from /home/openxs/dbs/5.1/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 53: query 'UPDATE t1 SET attr1 = 9998 WHERE pk1 < 1000' failed: 1412: Table definition has changed, please retry transaction
(the last lines may be the most important ones)
Result from queries before failure can be found in r/ndb_basic.log

Killing Possible Leftover Processes
mysql-test-run: WARNING: can't kill old mysqld holding port 9310
Restoring snapshot of databases
Resuming Tests

On today's ChangeSet@1.2371, 2006-04-28 09:29:40+02:00, built using --with-debug=full.
[4 May 2006 21:50] Tomas Ulin
bug 16445