Bug #36430 Falcon: server crashes during plain insert operation
Submitted: 30 Apr 2008 15:26 Modified: 29 Aug 2008 1:34
Reporter: Alexey Stroganov Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S1 (Critical)
Version:6.0.5-release OS:Any
Assigned to: Hakan Küçükyılmaz CPU Architecture:Any

[30 Apr 2008 15:26] Alexey Stroganov
Description:
While inserting data for testing Falcon with sysbench atomic test I got a crash.

Table structure:

CREATE TABLE `phptest` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL DEFAULT '',
  `email` varchar(64) NOT NULL DEFAULT '',
  `password` varchar(64) NOT NULL DEFAULT '',
  `dob` date DEFAULT NULL,
  `address` varchar(128) NOT NULL DEFAULT '',
  `city` varchar(64) NOT NULL DEFAULT '',
  `state_id` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `zip` varchar(8) NOT NULL DEFAULT '',
  `country_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `email` (`email`),
  KEY `country_id` (`country_id`,`state_id`,`city`)
) ENGINE=Falcon;

Insert statements attached.

Backtrace:
(gdb) bt
#0  0x00002ba59a8654c5 in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000007f49fc in write_core (sig=11) at stacktrace.c:305
#2  0x000000000067a803 in handle_segfault (sig=11) at mysqld.cc:2624
#3  <signal handler called>
#4  0x00002ba59ae4a1ff in memcpy () from /lib64/libc.so.6
#5  0x0000000040080cf8 in ?? ()
#6  0x00000000008c6948 in IndexKey (this=0x40080ce0) at IndexKey.h:47
#7  0x000000000095d4b8 in IndexPage::addNode (this=0x2aaae22fc000, dbb=0x2aaaab51eb80, indexKey=0x40086240, recordNumber=-2)
    at IndexPage.cpp:69
#8  0x00000000008ccb12 in IndexRootPage::splitIndexPage (dbb=0x2aaaab51eb80, indexId=4, bdb=0x2aaab03664a0, transId=0,
    addResult=SplitMiddle, indexKey=0x40093700, recordNumber=378) at IndexRootPage.cpp:551
#9  0x00000000008ccea2 in IndexRootPage::splitIndexPage (dbb=0x2aaaab51eb80, indexId=4, bdb=0x2aaab03664a0, transId=0,
    addResult=SplitMiddle, indexKey=0x400a0c50, recordNumber=4920) at IndexRootPage.cpp:622
#10 0x00000000008cd697 in IndexRootPage::addIndexEntry (dbb=0x2aaaab51eb80, indexId=4, key=0x400a0c50, recordNumber=4920,
    transId=0) at IndexRootPage.cpp:189
#11 0x00000000008cdb91 in IndexRootPage::indexMerge (dbb=0x2aaaab51eb80, indexId=4, logRecord=0x400a3df0, transId=0)
    at IndexRootPage.cpp:1004
#12 0x000000000093452a in SRLUpdateIndex::execute (this=0x400a3df0) at SRLUpdateIndex.cpp:179
#13 0x00000000009345bb in SRLUpdateIndex::commit (this=0x400a3df0) at SRLUpdateIndex.cpp:157
#14 0x000000000091aa46 in SerialLogTransaction::commit (this=0x2aaaab546310) at SerialLogTransaction.cpp:91
#15 0x000000000091ab58 in SerialLogTransaction::doAction (this=0x2aaaab546310) at SerialLogTransaction.cpp:157
#16 0x00000000009556f0 in Gopher::gopherThread (this=0x2aaaab4e4370) at Gopher.cpp:69
#17 0x000000000095584f in Gopher::gopherThread (arg=0x2aaaab4e4370) at Gopher.cpp:37
#18 0x0000000000876cb5 in Thread::thread (this=0x2aaaab4eea68) at Thread.cpp:161
#19 0x0000000000876ed3 in Thread::thread (parameter=0x2aaaab4eea68) at Thread.cpp:140
#20 0x00002ba59a861193 in start_thread () from /lib64/libpthread.so.0
#21 0x00002ba59ae9445d in clone () from /lib64/libc.so.6
#22 0x0000000000000000 in ?? ()

How to repeat:
- Download attached sql file
- Unzip it - gzip -d bug.sql.gz
- Start mysqld
- mysql -uroot test -S /tmp/mysql.sock < bug.sql
[30 Apr 2008 15:27] Alexey Stroganov
SQL file for issue

Attachment: bug.sql.gz (application/gzip, text), 411.27 KiB.

[30 Apr 2008 15:45] Alexey Stroganov
UPDATE: Just tried to reproduce issue with the latest binary from PB '6.0.6-alpha-pb295' (mysql-6.0-falcon-team tree) and it works ok. 

I will check it a bit more and will update issue accordingly.
[5 May 2008 19:39] Alexey Stroganov
Rechecked with the latest changes in mysql-6.0-falcon-team tree - all work ok so the issue was fixed after the 6.0.5 release. 

It should be decided how critical the issue is for 6.0.5 release.
[21 May 2008 14:30] Vladislav Vaintroub
Tried, but could not reproduce the issue with current 6.0-falcon-team code