Bug #27908 Server crashes when obtaining data from Falcon's information_schema tables
Submitted: 18 Apr 2007 0:46 Modified: 7 Oct 2008 12:10
Reporter: Alexey Stroganov Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S1 (Critical)
Version:6.0.0-alpha-pb507 OS:Any
Assigned to: CPU Architecture:Any
Tags: F_UNKNOWN

[18 Apr 2007 0:46] Alexey Stroganov
Description:
In my testing of Falcon engine with dbt2 test I observe crashes when during the test trying to get information from Falcon's information_schema tables. Crash happens randomly and doesn't depend on the table.

backtrace:

(gdb) bt
#0  0x00002b3f600dd3d3 in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000005e1756 in handle_segfault (sig=11) at mysqld.cc:2287
#2  <signal handler called>
#3  Database::getIOInfo (this=0x0, infoTable=0x4003ec10) at JString.h:142
#4  0x0000000000749bbf in StorageHandler::getIOInfo (this=<value optimized out>, infoTable=0x4003ec10)
    at StorageHandler.cpp:804
#5  0x0000000000742506 in NfsPluginHandler::call_fillDatabaseIOTable (thd=<value optimized out>,
    tables=<value optimized out>, cond=<value optimized out>) at ha_falcon.cpp:2414
#6  0x00000000006d85b7 in get_schema_tables_result (join=0x136b810, executed_place=PROCESSED_BY_JOIN_EXEC)
    at sql_show.cc:5128
#7  0x00000000006554d9 in JOIN::exec (this=0x136b810) at sql_select.cc:1603
#8  0x0000000000656ec8 in mysql_select (thd=0xed2ee0, rref_pointer_array=0xed49f0, tables=0xf00400, 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=0xf00f38, unit=0xed4448, select_lex=0xed4808) at sql_select.cc:2191
#9  0x00000000006577b7 in handle_select (thd=0xed2ee0, lex=0xed43a8, result=0xf00f38,
    setup_tables_done_option=0) at sql_select.cc:257
#10 0x00000000005ec644 in execute_sqlcom_select (thd=0xed2ee0, all_tables=0xf00400) at sql_parse.cc:4459
#11 0x00000000005f0cdd in mysql_execute_command (thd=0xed2ee0) at sql_parse.cc:1842
#12 0x00000000005f711c in mysql_parse (thd=0xed2ee0, inBuf=0xf00220 "select * from FALCON_DATABASE_IO",
    length=32) at sql_parse.cc:5274
#13 0x00000000005f75ac in dispatch_command (command=COM_QUERY, thd=0xed2ee0, packet=<value optimized out>,
    packet_length=33) at sql_parse.cc:896
#14 0x00000000005f88b3 in do_command (thd=0xed2ee0) at sql_parse.cc:662
#15 0x00000000005e9fa9 in handle_one_connection (arg=0xed2ee0) at sql_connect.cc:1089
#16 0x00002b3f600d809e in start_thread () from /lib64/libpthread.so.0
#17 0x00002b3f60c644cd in clone () from /lib64/libc.so.6
#18 0x0000000000000000 in ?? ()

How to repeat:
run dbt2 test and try to select data from Falcon's information_schema tables.
[1 May 2007 21:25] Hakan Küçükyılmaz
Ranger, please verify the fix.

Best regards,

Hakan
[27 May 2007 19:31] Hakan Küçükyılmaz
Still failing.

(gdb) f 0
#0  0x00000000008cf9e4 in MemMgr::analyze (this=0xfc5660, mask=0, stream=0x0, summaryTable=0x45312fd0,
    detailTable=0x0) at MemMgr.cpp:990
990                             for (MemFreeBlock *twin = blk->nextTwin; twin != blk; twin = twin->nextTwin)
(gdb) p twin
$4 = (MemFreeBlock *) 0xcccccccccccccccc

Full Backtrace is:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1160862048 (LWP 16159)]
0x00000000008cf9e4 in MemMgr::analyze (this=0xfc5660, mask=0, stream=0x0, summaryTable=0x45312fd0,
    detailTable=0x0) at MemMgr.cpp:990
990                             for (MemFreeBlock *twin = blk->nextTwin; twin != blk; twin = twin->nextTwin)
(gdb) bt
#0  0x00000000008cf9e4 in MemMgr::analyze (this=0xfc5660, mask=0, stream=0x0, summaryTable=0x45312fd0,
    detailTable=0x0) at MemMgr.cpp:990
#1  0x00000000008cfd8f in MemMgrAnalyze (what=MemMgrRecordSummary, infoTable=0x45312fd0) at MemMgr.cpp:190
#2  0x0000000000862a90 in StorageHandler::getRecordCacheSummaryInfo (this=0x2aaaaae02048,
    infoTable=0x45312fd0) at StorageHandler.cpp:823
#3  0x00000000008577a7 in NfsPluginHandler::call_fillRecordCacheSummaryTable (thd=0x1157bf8,
    tables=0x1140848, cond=0x0) at ha_falcon.cpp:2472
#4  0x00000000007b8cae in get_schema_tables_result (join=0x11623c8, executed_place=PROCESSED_BY_JOIN_EXEC)
    at sql_show.cc:5215
#5  0x00000000006fbe6a in JOIN::exec (this=0x11623c8) at sql_select.cc:1676
#6  0x00000000006f9040 in mysql_select (thd=0x1157bf8, rref_pointer_array=0x1159778, tables=0x11404f8,
    wild_num=0, fields=@0x1159698, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0,
    select_options=2684635648, result=0x1141988, unit=0x11591d0, select_lex=0x1159590) at sql_select.cc:2264
#7  0x00000000006fdae3 in handle_select (thd=0x1157bf8, lex=0x1159140, result=0x1141988,
    setup_tables_done_option=0) at sql_select.cc:258
#8  0x0000000000678c08 in execute_sqlcom_select (thd=0x1157bf8, all_tables=0x11404f8) at sql_parse.cc:4444
#9  0x000000000067a474 in mysql_execute_command (thd=0x1157bf8) at sql_parse.cc:1843
#10 0x00000000006828af in mysql_parse (thd=0x1157bf8,
    inBuf=0x113fde8 "SELECT a.TOTAL_SPACE, a.FREE_SPACE, b.TOTAL_SPACE, b.FREE_SPACE FROM INFORMATION_SCHEMA.FALCON_SYSTEM_MEMORY_SUMMARY AS a, INFORMATION_SCHEMA.FALCON_RECORD_CACHE_SUMMARY AS b", length=174,
    found_semicolon=0x45314fa0) at sql_parse.cc:5355
#11 0x00000000006835e0 in dispatch_command (command=COM_QUERY, thd=0x1157bf8,
    packet=0x11360e9 "SELECT a.TOTAL_SPACE, a.FREE_SPACE, b.TOTAL_SPACE, b.FREE_SPACE FROM INFORMATION_SCHEMA.FALCON_SYSTEM_MEMORY_SUMMARY AS a, INFORMATION_SCHEMA.FALCON_RECORD_CACHE_SUMMARY AS b", packet_length=175)
    at sql_parse.cc:906
#12 0x00000000006849b0 in do_command (thd=0x1157bf8) at sql_parse.cc:667
[31 May 2007 7:18] Hakan Küçükyılmaz
Ranger,

during a six hour DBT2 I issued a statement obtaining data from Falcon's information_schema without crash.

while (true); do     echo "SELECT a.TOTAL_SPACE, a.FREE_SPACE, b.TOTAL_SPACE, b.FREE_SPACE FROM INFORMATION_SCHEMA.FALCON_SYSTEM_MEMORY_SUMMARY AS a, INFORMATION_SCHEMA.FALCON_RECORD_CACHE_SUMMARY AS b" | mysql -uroot;     sleep 10; done 

Can you confirm this please?

Best regards,

Hakan
[1 Jul 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".