Bug #43095 Falcon: crash after two shutdowns
Submitted: 22 Feb 2009 23:19 Modified: 5 Mar 2009 13:22
Reporter: Peter Gulutzan Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.11-alpha-debug OS:Linux (SUSE 10.0 / 32-bit)
Assigned to: Vladislav Vaintroub CPU Architecture:Any
Tags: F_RECOVERY

[22 Feb 2009 23:19] Peter Gulutzan
Description:
I create an empty Falcon table.
I stop and restart the server.
I select from a nonexistent table.
I stop and restart the server.
I select from the table twice.
Crash.

How to repeat:
Begin with a fresh installation,
right after mysql_install_db.

Start server.

On a client, say:
use test
create table a (a int) engine=falcon;
quit

Stop server, e.g. with mysqladmin shutdown.
Start server.

On a client, say:
use test
select * from *;
quit

Stop server, e.g. with mysqladmin shutdown.
Start server.

use test
select * from a;
select * from a;

At this point the server should go down.

Example run (this show only the client,
you must remember to restart the server
after each 'quit' + mysqladmin shutdown
on client):

pgulutzan@linux:~> /usr/local/mysql/bin/mysql --user=root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 6.0.11-alpha-debug Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use test
Database changed
mysql> create table a (a int) engine=falcon;
Query OK, 0 rows affected (0.13 sec)

mysql> quit
Bye
pgulutzan@linux:~> /usr/local/mysql/bin/mysqladmin --user=root shutdown
pgulutzan@linux:~> /usr/local/mysql/bin/mysql --user=root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 6.0.11-alpha-debug Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select * from *;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*' at line 1
mysql> quit
Bye
pgulutzan@linux:~> /usr/local/mysql/bin/mysqladmin --user=root shutdown
pgulutzan@linux:~> /usr/local/mysql/bin/mysql --user=root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 6.0.11-alpha-debug Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select * from a;
Empty set (0.00 sec)

mysql> select * from a;
ERROR 2013 (HY000): Lost connection to MySQL server during query
[23 Feb 2009 12:10] Valeriy Kravchuk
Thank you for the bug report. Verified just as described with recent 6.0.11 from bzr. 

Stack trace is:

stack_bottom = 0x575c0028 thread_stack 0x30c00
/home2/openxs/dbs/6.0/libexec/mysqld(unsigned long+0x39) [0x8806c9a]
/home2/openxs/dbs/6.0/libexec/mysqld(unsigned char+0x392) [0x82ada7c]
[0xffffe420]
/home2/openxs/dbs/6.0/libexec/mysqld(Dbb::findSection(int)+0x85) [0x856e139]
/home2/openxs/dbs/6.0/libexec/mysqld(Table::fetchNext(int)+0x2e5) [0x8532a5f]
/home2/openxs/dbs/6.0/libexec/mysqld(StorageDatabase::nextRow(StorageTable*, int, bool)+0x9a) [0x85206d0]
/home2/openxs/dbs/6.0/libexec/mysqld(StorageTable::next(int, bool)+0x2e) [0x8525468]
/home2/openxs/dbs/6.0/libexec/mysqld(StorageInterface::rnd_next(unsigned char*)+0x82) [0x85196ae]
/home2/openxs/dbs/6.0/libexec/mysqld(rr_sequential(READ_RECORD*)+0x21) [0x83c4d7f]
/home2/openxs/dbs/6.0/libexec/mysqld(join_init_read_record(st_join_table*)+0x5b) [0x831afa9]
/home2/openxs/dbs/6.0/libexec/mysqld(sub_select(JOIN*, st_join_table*, bool)+0x2df) [0x831ebf1]
/home2/openxs/dbs/6.0/libexec/mysqld [0x832b6cd]
/home2/openxs/dbs/6.0/libexec/mysqld(JOIN::exec()+0x11ae) [0x8343d04]
/home2/openxs/dbs/6.0/libexec/mysqld(mysql_select(THD*, Item***, TABLE_LIST*, unsigned, List<Item>&, Item*, unsigned, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*)+0xb6) [0x833f412]
/home2/openxs/dbs/6.0/libexec/mysqld(handle_select(THD*, LEX*, select_result*, unsigned long)+0x1b5) [0x8344e53]
/home2/openxs/dbs/6.0/libexec/mysqld [0x82bc1ad]
/home2/openxs/dbs/6.0/libexec/mysqld(mysql_execute_command(THD*)+0x682) [0x82bcd80]
/home2/openxs/dbs/6.0/libexec/mysqld(mysql_parse(THD*, char const*, unsigned, char const**)+0x2bc) [0x82c4728]
/home2/openxs/dbs/6.0/libexec/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned)+0xf93) [0x82c5cfd]
/home2/openxs/dbs/6.0/libexec/mysqld(do_command(THD*)+0xc7) [0x82c6909]
/home2/openxs/dbs/6.0/libexec/mysqld(unsigned char+0x183) [0x82b5b37]
/lib/tls/libpthread.so.0 [0x40050aa7]
/lib/tls/libc.so.6(__clone+0x5e) [0x40204c2e]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x98a69e0 = select * from a
thd->thread_id=1
thd->killed=NOT_KILLED
[23 Feb 2009 12:33] Valeriy Kravchuk
Same crash happens for me even without "select from nonexistant table". Just restart server two times with SELECT * from a in between...
[26 Feb 2009 12:30] Hakan Küçükyılmaz
Can't repeat with latest code from mysql-6.0-falcon tree. I tried debug and non-debug build on 64-bit Linux.
[5 Mar 2009 13:22] Vladislav Vaintroub
tried on different oses with release and debug version on latest mysql-6.0-falcon-team and main.

Please reopen if if still see this.