From: Hakan Kuecuekyilmaz Date: September 27 2008 5:36pm Subject: Re: Bug #39574 Falcon asserts after restart in DataPage.cpp line 87 List-Archive: http://lists.mysql.com/falcon/4 Message-Id: <1222537010.4432.125.camel@lu0011> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Do, 2008-09-25 at 23:56 -0500, Kevin Lewis wrote: > Hakan, > > It sounded like you wanted to try to figure this one out. Do you want > me to assign it to you? Or has it become too time consuming? > > If you can repeat this, you might want to try this; > > DataPage.h, line 37; > > struct LineIndex { > - short offset; > - short length; // negative means record has overflow page > + uint16 offset; > + uint16 length; // negative means record has overflow page > }; > > The offset value seems to be the problem in the assert. Not sure if you > ever actually got it stopped in the debugger to see the value there. > But making this variable hold up to 65535 instead of 32767 may do the trick. Yes, that was the problem. I was only able to reproduce this bug with falcon_page_size of 32k in our mysql-6.0-falcon tree. But length should be signed as the comment notes it. So I did this: === modified file 'storage/falcon/DataPage.h' --- storage/falcon/DataPage.h 2008-06-17 17:41:54 +0000 +++ storage/falcon/DataPage.h 2008-09-27 05:37:14 +0000 @@ -35,8 +35,8 @@ struct SectionAnalysis; struct LineIndex { - short offset; - short length; // negative means record has overflow page + uint16 offset; + int16 length; // negative means record has overflow page }; class DataPage : public Page I verified with a printf() just above the assertion and sometimes we got above 32767 DataPage::updateRecord(): 32731 + 37 = 32768 However, after fixing this bug I hit other assertion(s) sql/mysqld(Error::error(char const*, ...)+0xea)[0x8b7438] sql/mysqld(Cache::fetchPage(Dbb*, int, PageType, LockType)+0x2c1)[0x899a71] sql/mysqld(Dbb::fetchPage(int, PageType, LockType)+0x24)[0x8af1c6] sql/mysqld(Dbb::handoffPage(Bdb*, int, PageType, LockType)+0x1f)[0x8af549] sql/mysqld(Section::findNextRecord(int, int, Stream*)+0xec)[0x8ec4c4] sql/mysqld(Section::findNextRecord(int, int, Stream*)+0x2ab)[0x8ec683] sql/mysqld(Section::findNextRecord(int, Stream*)+0x16)[0x8ec6ec] sql/mysqld(Dbb::findNextRecord(Section*, int, Stream*)+0x11)[0x8aea51] sql/mysqld(TableSpaceManager::bootstrap(int)+0x30a)[0x8872ac] sql/mysqld(Database::openDatabase(char const*)+0x25a)[0x8ab516] sql/mysqld(Connection::getDatabase(char const*, char const*, Threads*)+0x109)[0x8a132d] sql/mysqld(Connection::openDatabase(char const*, char const*, char const*, char const*, char const*, Threads*)+0x120)[0x8a28e2] sql/mysqld(StorageDatabase::getOpenConnection()+0x63)[0x87214b] sql/mysqld(StorageHandler::initialize()+0x83)[0x873f15] sql/mysqld(StorageInterface::falcon_init(void*)+0x22a)[0x86c4fc] sql/mysqld(ha_initialize_handlerton(st_plugin_int*)+0x7f)[0x766816] sql/mysqld[0x7fcee7] sql/mysqld(plugin_init(int*, char**, int)+0x88b)[0x7ff34c] sql/mysqld[0x67247c] sql/mysqld(main+0x35a)[0x672de3] /lib/libc.so.6(__libc_start_main+0xe6)[0x7f1c5d37c1a6] sql/mysqld(__gxx_personality_v0+0x269)[0x5b0729] [Falcon] Error: page 102/0 wrong page type, expected 7 got 2 -- Hakan Küçükyılmaz, Senior Software Engineer DBTG/MySQL +49 160 98953296 Sun Microsystems GmbH Sonnenallee 1, DE-85551 Kirchheim-Heimstetten Geschaeftsfuehrer: Thomas Schroeder, Wolfang Engels, Dr. Roland Boemer Vorsitz d. Aufs.rat.: Martin Haering HRB MUC 161028 49.011, 8.376