Bug #43565 Falcon: Access to any Falcon data after second restart of server causes crash
Submitted: 11 Mar 2009 15:51 Modified: 11 Mar 2009 20:21
Reporter: Alexey Stroganov Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S1 (Critical)
Version:6.0.10-release OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: F_RECOVERY

[11 Mar 2009 15:51] Alexey Stroganov
Description:
Falcon crashes when I tried to access Falcon data after second restart of server. See below for exact sequence of commands that leads to crash.

1. I start server first time on clean database(just after ./scripts/mysql_install_db)

./bin/mysqld-debug --no-defaults --basedir=. --datadir=data/ --user=root --core --skip-innodb

2. I create 1 table and insert 1 row

mysql -uroot test
mysql>create table t1 (a int) engine=Falcon; insert into t1 values (1);

3. I shutdown server 1st time

mysqladmin shut -uroot

4. I start server again

./bin/mysqld-debug --no-defaults --basedir=. --datadir=data/ --user=root --core 
--skip-innodb

5. I do select from created table

mysql -uroot test

mysql> select * from t1;
+------+
| a    |
+------+
|    1 |
+------+
1 row in set (0.00 sec)

6. I shutdown server 2nd time

mysqladmin shut -uroot

7. I start server again 
./bin/mysqld-debug --no-defaults --basedir=. --datadir=data/ --user=root --core 
--skip-innodb

8. I'm trying to select data from table again and got crash.
mysql> select * from t1;
ERROR 2013 (HY000): Lost connection to MySQL server during query

bt:
#4  0x00002ad41783bfed in raise () from /lib64/libpthread.so.0
#5  0x0000000000851ff8 in Error::debugBreak () at Error.cpp:94
#6  0x00000000008520e8 in Error::error (string=<value optimized out>) at Error.cpp:71
#7  0x000000000085214b in Error::assertionFailed (text=<value optimized out>, fileName=<value optimized out>, line=6) at Error.cpp:78
#8  0x00000000008dad6f in Section::getSectionPage (dbb=0x2aaaab5812c0, root=2, sequence=0, requestedLockType=Shared, transId=0) at Section.cpp:208
#9  0x00000000008dc0a0 in Section::getSectionRoot (this=0x2aaaab62a658) at Section.cpp:1238
#10 0x00000000008dc51b in Section (this=0x2aaaab62a658, pDbb=0x2aaaab5812c0, id=0, transId=<value optimized out>) at Section.cpp:85
#11 0x0000000000892683 in Dbb::findSection (this=0x2aaaab5812c0, sectionId=0) at Dbb.cpp:379
#12 0x0000000000863b5b in Table::findSections (this=0x2aaaab5aa028) at Table.cpp:3716
#13 0x00000000008666ec in Table::fetchNext (this=0x2047, start=0) at Table.cpp:503
#14 0x0000000000858abb in StorageDatabase::nextRow (this=<value optimized out>, storageTable=0x2aaaab5a4608, recordNumber=0, lockForUpdate=false) at StorageDatabase.cpp:282
#15 0x000000000085d0f9 in StorageTable::next (this=0x0, recordNumber=<value optimized out>, lockForUpdate=255) at StorageTable.cpp:158
#16 0x000000000084fb27 in StorageInterface::rnd_next (this=0x1c142b8, buf=0x1c14590 "�") at ha_falcon.cpp:636
#17 0x000000000073b0b6 in rr_sequential (info=0x1c06ee0) at records.cc:390
#18 0x00000000006a0d9a in join_init_read_record (tab=0x1c06e58) at sql_select.cc:17028
#19 0x00000000006b7945 in sub_select (join=0x1c1c478, join_tab=0x1c06e58, end_of_records=6) at sql_select.cc:16222
#20 0x00000000006b911a in do_select (join=0x1c1c478, fields=0x2aaabedb1390, table=0x0, procedure=0x0) at sql_select.cc:15786
#21 0x00000000006c7f9d in JOIN::exec (this=0x1c1c478) at sql_select.cc:2881
#22 0x00000000006c2db2 in mysql_select (thd=0x2aaabedaf3c0, rref_pointer_array=0x2aaabedb1470, tables=<value optimized out>, wild_num=1, fields=<value optimized out>, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0x1c067f8, unit=0x2aaabedb0e20, select_lex=0x2aaabedb1288) at sql_select.cc:3062
#23 0x00000000006c81bf in handle_select (thd=0x2aaabedaf3c0, lex=0x2aaabedb0d80, result=0x1c067f8, setup_tables_done_option=0) at sql_select.cc:314
#24 0x000000000064bc8e in execute_sqlcom_select (thd=0x2aaabedaf3c0, all_tables=0x1c061a0) at sql_parse.cc:4757
#25 0x000000000064cc6b in mysql_execute_command (thd=0x2aaabedaf3c0) at sql_parse.cc:2063
#26 0x0000000000653fd2 in mysql_parse (thd=0x2aaabedaf3c0, inBuf=0x1c05fd8 "select * from t1", length=16, found_semicolon=0x4708f0c8) at sql_parse.cc:5752
#27 0x0000000000654887 in dispatch_command (command=COM_QUERY, thd=0x2aaabedaf3c0, packet=0x2aaabf2cd161 "", packet_length=16) at sql_parse.cc:1009
#28 0x000000000065578e in do_command (thd=0x2aaabedaf3c0) at sql_parse.cc:691
#29 0x0000000000646d75 in handle_one_connection (arg=<value optimized out>) at sql_connect.cc:1146
#30 0x00002ad417835193 in start_thread () from /lib64/libpthread.so.0
#31 0x00002ad4180ad45d in clone () from /lib64/libc.so.6

(gdb) l
203                     {
204                     LockType lockType = (level < 0) ? requestedLockType : lockTypes[level];
205                     Bdb *bdb = dbb->fetchPage(root, PAGE_any, lockType);
206                     BDB_HISTORY(bdb);
207                     SectionPage *page = (SectionPage*) bdb->buffer;
208                     ASSERT(page->pageType == PAGE_sections || page->pageType == 0);
209                     level = page->level;

(gdb) p *bdb->buffer
$7 = {pageType = -13108, checksum = 52428, pageNumber = -858993460, pageUnused = -858993460}

How to repeat:
See Description
[11 Mar 2009 20:21] Vladislav Vaintroub
Duplicate of Bug#43095. Has not been seen in -falcon-team nor in recent 6.0-main. Not sure what to do about clone-off, it looks like time for it was quite unfortunate.