Bug #41792 [Falcon] Error: page 9/1 wrong page type, expected 4 got 5
Submitted: 30 Dec 2008 7:12 Modified: 26 May 2010 17:50
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.8-debug, 6.0.11 OS:Microsoft Windows
Assigned to: CPU Architecture:Any
Triage: Needs Triage: D1 (Critical)

[30 Dec 2008 7:12] Shane Bester
Description:
after a few server crashes (thanks to bug #32124), falcon failed like this at one startup:

081230  9:00:38  InnoDB: Started; log sequence number 0 103718238
Serial Log possible gap: 64709 - 61039
[Falcon] Error: page 9/1 wrong page type, expected 4 got 5

081230  9:00:39 - mysqld got exception 0x80000003 ;

mysqld-debug.exe!Error::debugBreak()[error.cpp:92]
mysqld-debug.exe!Error::error()[error.cpp:73]
mysqld-debug.exe!Cache::fetchPage()[cache.cpp:306]
mysqld-debug.exe!Dbb::fetchPage()[dbb.cpp:222]
mysqld-debug.exe!Section::deleteSectionLevel()[section.cpp:973]
mysqld-debug.exe!Section::deleteSection()[section.cpp:948]
mysqld-debug.exe!Dbb::deleteSection()[dbb.cpp:625]
mysqld-debug.exe!SRLDropTable::redo()[srldroptable.cpp:87]
mysqld-debug.exe!SerialLog::recover()[seriallog.cpp:363]
mysqld-debug.exe!Database::openDatabase()[database.cpp:733]
mysqld-debug.exe!Connection::getDatabase()[connection.cpp:1652]
mysqld-debug.exe!Connection::openDatabase()[connection.cpp:934]
mysqld-debug.exe!StorageDatabase::getOpenConnection()[storagedatabase.cpp:137]
mysqld-debug.exe!StorageHandler::initialize()[storagehandler.cpp:994]
mysqld-debug.exe!StorageInterface::falcon_init()[ha_falcon.cpp:237]
mysqld-debug.exe!ha_initialize_handlerton()[handler.cc:440]
mysqld-debug.exe!plugin_initialize()[sql_plugin.cc:1006]
mysqld-debug.exe!plugin_init()[sql_plugin.cc:1213]
mysqld-debug.exe!init_server_components()[mysqld.cc:4103]
mysqld-debug.exe!win_main()[mysqld.cc:4583]
mysqld-debug.exe!mysql_service()[mysqld.cc:4749]
mysqld-debug.exe!main()[mysqld.cc:4922]
mysqld-debug.exe!mainCRTStartup()[crt0.c:259]
kernel32.dll!BaseProcessInitPostImport()
age at http://dev.mysql.com/doc/mysql/en/crashing.html contains
that should help you find out what is causing the crash.

page	0x08f1a000 {pageType=5 checksum=0 pageNumber=9 ...}	Page *
 pageType	5	short
 checksum	0	unsigned short
pageNumber	9	int
pageType	PAGE_record_locator	PageType
lockType	Exclusive	LockType

pageNumber	9	int
pageUnused	0	int

How to repeat:
not deterministic. run some queries that crash server, restart server, run some falcon queries.  I had always used a single thread to run the queries.
[29 Dec 2009 12:41] Sveta Smirnova
Thank you for the report.

I can not repeat crash immediately after start, just following errors are in the error log:

Serial Log possible gap: 64709 - 61039
bumpPageIncarnation; page 0
bumpPageIncarnation; page 0
bumpPageIncarnation; page 0
bumpPageIncarnation; page 0
bumpPageIncarnation; page 0
bumpPageIncarnation; page 0
...

But if I do following queries I can repeat crash:

mysql> use test
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql> create table t1(f1 int, f2 text) engine=falcon;
ERROR 1005 (HY000): Can't create table 'test.t1' (errno: 156)

mysql> create database db1;
Query OK, 1 row affected (0.02 sec)

mysql> use db1
Database changed
mysql> create table t1(f1 int, f2 text) engine=falcon;
Query OK, 0 rows affected (0.00 sec)

mysql> \q
Bye

$./bin/mysqladmin -uroot -S /tmp/mysql_ssmirnova.sock  shutdown

$mv data/db1/t1.frm data/test/

Start server, then select from t1:

mysql> select * from t1;
ERROR 2013 (HY000): Lost connection to MySQL server during query
[29 Dec 2009 12:41] Sveta Smirnova
Backtrace:

thd: 0x986fab0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x4e6580f8 thread_stack 0x20000
./bin/mysqld-debug(my_print_stacktrace+0x29) [0xa9b06c]
./bin/mysqld-debug(handle_segfault+0x25c) [0x6421d9]
/lib64/libpthread.so.0 [0x3429e0dd40]
/lib64/libpthread.so.0(raise+0x2d) [0x3429e0dc1d]
./bin/mysqld-debug(Error::debugBreak()+0xe) [0x85ba30]
./bin/mysqld-debug(Error::error(char const*, ...)+0xea) [0x85bb20]
./bin/mysqld-debug(Section::findNextRecord(int, int, Stream*)+0x76) [0x8e3bc6]
./bin/mysqld-debug(Section::findNextRecord(int, Stream*)+0x16) [0x8e3e72]
./bin/mysqld-debug(Dbb::findNextRecord(Section*, int, Stream*)+0x11) [0x89da8b]
./bin/mysqld-debug(Table::fetchNext(int)+0x292) [0x87464c]
./bin/mysqld-debug(StorageDatabase::nextRow(StorageTable*, int, bool)+0x5e) [0x862c5e]
./bin/mysqld-debug(StorageTable::next(int, bool)+0x1f) [0x8673f9]
./bin/mysqld-debug(StorageInterface::rnd_next(unsigned char*)+0x5f) [0x859c67]
./bin/mysqld-debug(rr_sequential(READ_RECORD*)+0x6e) [0x740476]
./bin/mysqld-debug(join_init_read_record(st_join_table*)+0x79) [0x6a4fda]
./bin/mysqld-debug(sub_select(JOIN*, st_join_table*, bool)+0xf8) [0x6bc9b5]
./bin/mysqld-debug [0x6be18a]
./bin/mysqld-debug(JOIN::exec()+0x209d) [0x6cc29d]
./bin/mysqld-debug(mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*)+0x741) [0x6c70b2]
./bin/mysqld-debug(handle_select(THD*, LEX*, select_result*, unsigned long)+0x1f3) [0x6cc4bf]
./bin/mysqld-debug [0x64f296]
./bin/mysqld-debug(mysql_execute_command(THD*)+0x714) [0x65023d]
./bin/mysqld-debug(mysql_parse(THD*, char const*, unsigned int, char const**)+0x183) [0x6576af]
./bin/mysqld-debug(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x768) [0x657f80]
./bin/mysqld-debug(do_command(THD*)+0x204) [0x658f90]
./bin/mysqld-debug(handle_one_connection+0x103) [0x64a215]
/lib64/libpthread.so.0 [0x3429e061b5]
/lib64/libc.so.6(clone+0x6d) [0x34292cd39d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x97801c8 = select * from t1
thd->thread_id=1
thd->killed=NOT_KILLED