| Bug #26296 | falcon tablespace becomes corrupted after "mysqladmin shutdown" | ||
|---|---|---|---|
| Submitted: | 12 Feb 2007 21:50 | Modified: | 2 Jul 2007 4:53 | 
| Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Falcon storage engine | Severity: | S2 (Serious) | 
| Version: | 5.2.3-falcon-alpha-debug | OS: | Linux (suse9.3 x86) | 
| Assigned to: | CPU Architecture: | Any | |
| Tags: | crash, tablespace corruption | ||
   [12 Feb 2007 21:50]
   Shane Bester        
  
 
   [13 Feb 2007 10:35]
   MySQL Verification Team        
  simply have many inserts/update to a table, and then issue "mysqladmin shutdown" so that the server has a clean shutdown will cause a problem. when you start the server again, SHOW TABLE STATUS will crash it.
   [13 Feb 2007 11:09]
   MySQL Verification Team        
  run the testcase in but #26298 for a few seconds (to cause db traffic), then control-c it, and issue "mysqladmin shutdown" then, run mysqld_safe again, and quickly run a SHOW TABLE STATUS. will crash immediately. a clean shutdown of the database causes entire falcon tablespace to be corrupted to the extent you have to rm -rf the datadir..
   [13 Feb 2007 14:18]
   Hakan Küçükyılmaz        
  I could reproduce this as described. I used the test program with following parameters 
--queryfile=falcon.query --threads=15 --duration=1800 --shuffle-queries=1 -generate-queryfile=0
I did a mysqladmin shutdown after > 30 seconds then restarted mysqld and issued a SHOW TABLE STATUS.
We hit following assertion:
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0x40182541 in raise () from /lib/tls/libc.so.6
#2  0x08457822 in Error::debugBreak () at Error.cpp:93
#3  0x0845787f in Error::error (
    string=0x8764598 "assertion failed at line %d in file %s\n")
    at Error.cpp:70
#4  0x0845790f in Error::assertionFailed (fileName=0x876ed59 "BDB.cpp",
    line=72) at Error.cpp:77
#5  0x084d238e in Bdb::mark (this=0x417901d0, transId=0) at BDB.cpp:72
#6  0x0846b21d in IndexRootPage::indexMerge (dbb=0x404fab3c, indexId=45,
    logRecord=0x4175a8f4, transId=0) at IndexRootPage.cpp:921
#7  0x084bd0b6 in SRLUpdateIndex::execute (this=0x4175a8f4)
    at SRLUpdateIndex.cpp:155
#8  0x084bd199 in SRLUpdateIndex::redo (this=0x4175a8f4)
    at SRLUpdateIndex.cpp:127
#9  0x084a4338 in SerialLog::recover (this=0x41795614) at SerialLog.cpp:354
#10 0x0844a3de in Database::openDatabase (this=0x4175e028,
    filename=0x4175ab80 "/data/mysql-sap/test.fts") at Database.cpp:603
#11 0x0843ef55 in Connection::getDatabase (this=0x404fa9dc,
    dbName=0x404fa7dc "test",
    dbFileName=0x4175ab80 "/data/mysql-sap/test.fts", threads=0x404fa820)
    at Connection.cpp:1643
Regards, Hakan
 
   [18 Apr 2007 0:31]
   Hakan Küçükyılmaz        
  With latest Falcon we are hitting different assertion:
[Switching to Thread 1082665312 (LWP 16916)]
0x00002b07c45fd2ac in raise () from /lib/libpthread.so.0
(gdb) bt
#0  0x00002b07c45fd2ac in raise () from /lib/libpthread.so.0
#1  0x00000000007c31f2 in Error::debugBreak () at Error.cpp:93
#2  0x00000000007c32ed in Error::error (string=<value optimized out>) at Error.cpp:70
#3  0x00000000007c334c in Error::assertionFailed (fileName=0x4 <Address 0x4 out of bounds>, line=16916)
    at Error.cpp:77
#4  0x00000000007d1183 in IndexRootPage::findInsertionLeaf (dbb=0x2aaaab0337b8, indexId=40,
    indexKey=0x4087e0c0, recordNumber=2663, transId=<value optimized out>) at IndexRootPage.cpp:305
#5  0x00000000007d24f6 in IndexRootPage::indexMerge (dbb=0x2aaaab0337b8, indexId=40, logRecord=0x4087f1a8,
    transId=0) at IndexRootPage.cpp:872
#6  0x000000000080de19 in SRLUpdateIndex::execute (this=0x4087f1a8) at SRLUpdateIndex.cpp:162
#7  0x000000000080de37 in SRLUpdateIndex::redo (this=0x420e) at SRLUpdateIndex.cpp:133
#8  0x00000000007fd289 in SerialLog::recover (this=0x2aaaaafa3928) at SerialLog.cpp:321
#9  0x00000000007b718b in Database::openDatabase (this=0x2aaaaaf372e0,
    filename=0x4087f3f0 "/data/mysql-sap/test.fts") at Database.cpp:607
#10 0x00000000007afd7d in Connection::getDatabase (this=0x2aaaab007e50, dbName=0x2aaaab03288c "TEST",
    dbFileName=0x4087f3f0 "/data/mysql-sap/test.fts", threads=0x2aaaab00a1b8) at Connection.cpp:1645
#11 0x00000000007b0a41 in Connection::openDatabase (this=0x2aaaab007e50, dbName=0x2aaaab03288c "TEST",
    filename=<value optimized out>, account=0x9d6cfc "mysql", password=0x9d6cfc "mysql", address=0x0,
    parent=0x2aaaab00a1b8) at Connection.cpp:925
#12 0x0000000000791233 in StorageDatabase::getOpenConnection (this=0x2aaaab033030)
    at StorageDatabase.cpp:158
#13 0x000000000078fa47 in StorageConnection::connect (this=0x2aaaab02fd18) at StorageConnection.cpp:138
#14 0x0000000000793772 in StorageHandler::getStorageConnection (this=0x2aaaaae00048,
    tableShare=0x2aaaab0011c8, mySqlThread=0xe4e088, mySqlThdId=1, createFlag=OpenDatabase)
 
   [26 Jun 2007 18:42]
   Jim Starkey        
  I don't have any idea how to reproduce this. Are the sources of the test program available somewhere?
   [26 Jun 2007 21:25]
   Hakan Küçükyılmaz        
  Ran test case ./testcase_26298 --queryfile=falcon.query --threads=15 --duration=1800 --shuffle-queries=1 --generate-queryfile=0 issued shutdown after 30 seconds and restarted mysqld. However mysqladmin -uroot shutdown did not shutdown properly due to Bug#29133. Therefore I had to kill mysqld. --> No crash anymore. Best regards, Hakan
   [2 Jul 2007 4:53]
   MC Brown        
  A note has been added to the 6.0.1 changelog: Under certain situations, shutting down MySQL using mysqladmin could cause Falcon to corrupt the database tables and fail to restart properly. (Bug#26296)

