Bug #29014 Falcon: accessing INFORMATION_SCHEMA.FALCON_SYSTEM_MEMORY_SUMMARY crashes mysqld
Submitted: 11 Jun 2007 7:54 Modified: 24 Aug 2007 10:28
Reporter: Hakan Küçükyılmaz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S2 (Serious)
Version:6.0.1-alpha-debug OS:Linux
Assigned to: CPU Architecture:Any

[11 Jun 2007 7:54] Hakan Küçükyılmaz
Description:
Accessing INFORMATION_SCHEMA.FALCON_SYSTEM_MEMORY_SUMMARY crashes mysqld when InnoDB is enabled and Falcon is disabled.

How to repeat:
Start mysqld with Falcon disabled:

mysqld_safe --skip-falcon &

[09:42] root@(none)>SELECT * FROM INFORMATION_SCHEMA.FALCON_SYSTEM_MEMORY_SUMMARY;

-- Crash.

Backtrace
Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 2733]
0x0000000000797d29 in NfsPluginHandler::call_fillSystemMemorySummaryTable (thd=<value optimized out>,
    tables=<value optimized out>, cond=<value optimized out>) at ha_falcon.cpp:2413
2413            storageHandler->getMemorySummaryInfo(&infoTable);

(gdb) bt
#0  0x0000000000797d29 in NfsPluginHandler::call_fillSystemMemorySummaryTable (thd=<value optimized out>,
    tables=<value optimized out>, cond=<value optimized out>) at ha_falcon.cpp:2413
#1  0x0000000000714df2 in get_schema_tables_result (join=0x18e6988, executed_place=PROCESSED_BY_JOIN_EXEC)
    at sql_show.cc:5217
#2  0x0000000000683dcd in JOIN::exec (this=0x18e6988) at sql_select.cc:1676
#3  0x0000000000686162 in mysql_select (thd=0x18860b8, rref_pointer_array=0x1887ca0, tables=0x18e0b18,
    wild_num=1, fields=<value optimized out>, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0,
    proc_param=0x0, select_options=2684635648, result=0x18e1568, unit=0x18876f0, select_lex=0x1887ab8)
    at sql_select.cc:2275
#4  0x0000000000686664 in handle_select (thd=0x18860b8, lex=0x1887650, result=0x18e1568,
    setup_tables_done_option=0) at sql_select.cc:258
#5  0x00000000006180d8 in execute_sqlcom_select (thd=0x18860b8, all_tables=0x18e0b18) at sql_parse.cc:4485
#6  0x000000000061b514 in mysql_execute_command (thd=0x18860b8) at sql_parse.cc:1835
#7  0x000000000062141a in mysql_parse (thd=0x18860b8,
    inBuf=0x18e08f8 "select * from information_schema.falcon_system_memory_summary", length=61,
    found_semicolon=0x43887ff0) at sql_parse.cc:5381
#8  0x00000000006220ac in dispatch_command (command=COM_QUERY, thd=0x18860b8, packet=<value optimized out>,
    packet_length=62) at sql_parse.cc:907
#9  0x0000000000622f60 in do_command (thd=0x18860b8) at sql_parse.cc:669
#10 0x0000000000614d34 in handle_one_connection (arg=<value optimized out>) at sql_connect.cc:1091
#11 0x00002b57796ff225 in ?? ()
#12 0x0000000000000000 in ?? ()
[11 Jun 2007 11:23] MySQL Verification Team
Thank you for the bug report. Verified as described:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 6.0.1-alpha-debug Source distribution

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

mysql> SELECT * FROM INFORMATION_SCHEMA.FALCON_SYSTEM_MEMORY_SUMMARY;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
[13 Jun 2007 9:53] Hakan Küçükyılmaz
There are some considerations on how to fix this bug.

1) Workaround
Whenever --skip-falcon is set, then manually set --skip-falcon-system-memory-detail --skip-falcon-system-memory-summary --skip-falcon-record-cache-detail --skip-falcon-record-cache-summary --skip-falcon-transactions --skip-falcon-transaction-summary --skip-falcon-syncobjects --skip-falcon-serial-log --skip-falcon-database-io, too.

This is of course not convenient.

2) Implement plugin dependencies like described in WL#3295

3) The init functions for all those info schema plugins could report failure if the falcon plugin is not initialized. As the plugin initialization is not ordered, there is a slight problem.

Best regards,

Hakan
[13 Jun 2007 9:57] Hakan Küçükyılmaz
Reclassified as workaround exists.
[15 Jun 2007 15:52] Jim Starkey
Server should have checked for uninitialized handler, but it's easy enough for use to check.
[16 Aug 2007 10:58] Hakan Küçükyılmaz
Bug is fixed.

Best regards,

Hakan
[24 Aug 2007 10:28] MC Brown
A note has been added to the 6.0.1 changelog: 

Accessing an INFORMATION_SCHEMA table generated by Falcon, when Falcon has not been enabled would cause mysqld to crash.