Bug #27762 Falcon: crash during shutdown
Submitted: 11 Apr 2007 17:16 Modified: 6 Jul 2007 20:08
Reporter: Peter Gulutzan Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S2 (Serious)
Version:5.2.4-falcon-alpha-debug OS:Linux (SUSE 10.0 / 64-bit)
Assigned to: Christopher Powers CPU Architecture:Any

[11 Apr 2007 17:16] Peter Gulutzan
Description:
I start with an empty database directory.
I start the server, and start mysql client.
I say 'drop table', 'create table', 'alter table'.
I quit and use mysqladmin to shut down the server.
I restart the server, and restart mysql client.
I say 'drop table', 'create table', 'alter table'.
I quit and use mysqladmin to shut down the server.
Crash.

Bug#25425, Bug#26800, and Bug#27425 also crash mysqld
during shutdown. But their 'how to repeat' descriptions
are significantly different.

ChangeSet@1.2575.1.1, 2007-04-10

How to repeat:
Start with an empty database directory, for example
delete all files on /usr/local/mysql/var and then say
/usr/local/mysql/bin/mysql_install_db.

Start mysqld.

Start mysql, with user=root

Say:

drop table test.t;
create table test.t (s1 int) engine=falcon;
alter table test.t engine=falcon;
quit

Shut down server, for example mysqladmin --user=root shutdown.

Restart mysqld.

Restart mysql, with user=root

Say:

drop table test.t;
create table test.t (s1 int) engine=falcon;
alter table test.t engine=falcon;
quit

Shut down server, for example mysqladmin --user=root shutdown.

Observe that mysqld crashes.
[17 Apr 2007 7:10] Hakan Küçükyılmaz
Verified as described. Backtrace is:

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 1158465888 (LWP 6746)]
0x00002b81e5f942ac in raise () from /lib/libpthread.so.0
(gdb) bt
#0  0x00002b81e5f942ac in raise () from /lib/libpthread.so.0
#1  0x00000000007c2572 in Error::debugBreak () at Error.cpp:93
#2  0x00000000007c266d in Error::error (string=<value optimized out>) at Error.cpp:70
#3  0x000000000081d593 in Cache::fetchPage (this=0x2aaaab021dc0, dbb=0x2aaaab033ae0, pageNumber=0,
    pageType=PAGE_header, lockType=Exclusive) at Cache.cpp:224
#4  0x00000000007bac08 in Dbb::fetchPage (this=0x0, pageNumber=4, pageType=4294967295, lockType=4)
    at Dbb.cpp:201
#5  0x00000000007bb1be in Dbb::shutdown (this=0x1a48, transId=0) at Dbb.cpp:574
#6  0x00000000007b5411 in Database::shutdown (this=0x2aaaaaf372e0) at Database.cpp:1428
#7  0x00000000007aea50 in Connection::shutdownDatabase (this=<value optimized out>)
    at Connection.cpp:1795
#8  0x000000000078fd94 in StorageDatabase::close (this=0x2aaaab05b830) at StorageDatabase.cpp:767
#9  0x0000000000791f10 in StorageHandler::shutdownHandler (this=0x2aaaaae00048) at StorageHandler.cpp:220
#10 0x0000000000789627 in NfsStorageTable::panic (hton=<value optimized out>, flag=6746)
    at ha_falcon.cpp:1630
#11 0x00000000006e55f0 in ha_finalize_handlerton (plugin=0xe0e818) at handler.cc:378
#12 0x0000000000779c5d in plugin_deinitialize (plugin=0xe0e818) at sql_plugin.cc:526
#13 0x000000000077bac0 in plugin_shutdown () at sql_plugin.cc:827
#14 0x0000000000605f12 in clean_up (print_message=true) at mysqld.cc:1233
#15 0x00000000006089ae in unireg_end () at mysqld.cc:1167
#16 0x0000000000609bec in kill_server (sig_ptr=<value optimized out>) at mysqld.cc:1106
#17 0x0000000000609c41 in kill_server_thread (arg=<value optimized out>) at mysqld.cc:1127

(gdb) f 3
#3  0x000000000081d593 in Cache::fetchPage (this=0x2aaaab021dc0, dbb=0x2aaaab033ae0, pageNumber=0,
    pageType=PAGE_header, lockType=Exclusive) at Cache.cpp:224
224                                      bdb->pageNumber, pageType, page->pageType);
(gdb) l
219                     bdb->release();
220                     throw SQLError (DATABASE_CORRUPTION, "page %d wrong page type, expected %d got %d\n",
221                                                     pageNumber, pageType, page->pageType);
222                     ***/
223                     FATAL ("page %d wrong page type, expected %d got %d\n",
224                                      bdb->pageNumber, pageType, page->pageType);
225                     }
226
227             // If buffer has moved out of the upper "fraction" of the LRU queue, move it back up
228
(gdb) p pageType
$1 = PAGE_header
(gdb) p page->pageType
Cannot access memory at address 0x0
(gdb)
[6 Jul 2007 20:08] Christopher Powers
Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.mysql.com/how-to-report.php

If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.