Bug #81614 Race condition between fil_ibd_create() and SELECT * FROM I_S.FILES
Submitted: 26 May 2016 12:49 Modified: 1 Sep 2016 13:45
Reporter: Shipra Jain Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Information schema Severity:S3 (Non-critical)
Version:5.7.8 OS:Any
Assigned to: CPU Architecture:Any

[26 May 2016 12:49] Shipra Jain
Description:

This is seen on for wl6599

git branch
* mysql-trunk-wl6599-1

with latest commit
ommit e9f0249c169e3b7c5137666790dd325d4b55c1d9
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Tue May 24 17:58:23 2016 +0530

    WL#6599 New Data Dictionary and I_S integration

Crashing Query :
SELECT * FROM INFORMATION_SCHEMA.FILES

(gdb) bt
#0  0x00007f4553b9b69c in pthread_kill () from /lib64/libpthread.so.0
#1  0x0000000001d22fba in my_write_core (sig=6) at /log/RQG/shipjain/SourceMysql/mysys/stacktrace.cc:251
#2  0x0000000001502d09 in handle_fatal_signal (sig=6) at /log/RQG/shipjain/SourceMysql/sql/signal_handler.cc:219
#3  <signal handler called>
#4  0x00007f455284b8a5 in raise () from /lib64/libc.so.6
#5  0x00007f455284d085 in abort () from /lib64/libc.so.6
#6  0x0000000001f7f95e in ut_dbg_assertion_failed (expr=0x26df861 "node != __null", file=0x26dca20 "/log/RQG/shipjain/SourceMysql/storage/innobase/fil/fil0fil.cc", 
    line=5976) at /log/RQG/shipjain/SourceMysql/storage/innobase/ut/ut0dbg.cc:59
#7  0x0000000002082415 in fil_node_next (prev_node=0x7f44b80b2008) at /log/RQG/shipjain/SourceMysql/storage/innobase/fil/fil0fil.cc:5976
#8  0x0000000001dc4a0b in i_s_files_table_fill (thd=0x7f44d8019780, tables=0x7f44d800e788) at /log/RQG/shipjain/SourceMysql/storage/innobase/handler/i_s.cc:8808
#9  0x0000000001d52d3c in innobase_fill_i_s_table (thd=0x7f44d8019780, tables=0x7f44d800e788, idx=SCH_FILES)
    at /log/RQG/shipjain/SourceMysql/storage/innobase/handler/ha_innodb.cc:1469
#10 0x0000000001310900 in run_hton_fill_schema_table (thd=0x7f44d8019780, plugin=0x7f4548552e38, arg=0x7f4548552ec0)
    at /log/RQG/shipjain/SourceMysql/sql/sql_show.cc:7265
#11 0x00000000012c9837 in plugin_foreach_with_mask (thd=0x7f44d8019780, func=0x1310877 <run_hton_fill_schema_table(THD*, plugin_ref, void*)>, type=1, 
    state_mask=4294967287, arg=0x7f4548552ec0) at /log/RQG/shipjain/SourceMysql/sql/sql_plugin.cc:2530
#12 0x0000000001310973 in hton_fill_schema_table (thd=0x7f44d8019780, tables=0x7f44d800e788, cond=0x0) at /log/RQG/shipjain/SourceMysql/sql/sql_show.cc:7278
#13 0x0000000001310434 in do_fill_table (thd=0x7f44d8019780, table_list=0x7f44d800e788, qep_tab=0x7f44d8dd60f8) at /log/RQG/shipjain/SourceMysql/sql/sql_show.cc:7136
#14 0x000000000131081a in get_schema_tables_result (join=0x7f44d8dd5960, executed_place=PROCESSED_BY_JOIN_EXEC) at /log/RQG/shipjain/SourceMysql/sql/sql_show.cc:7238
#15 0x00000000012eba9d in JOIN::prepare_result (this=0x7f44d8dd5960) at /log/RQG/shipjain/SourceMysql/sql/sql_select.cc:928
#16 0x0000000001276b3e in JOIN::exec (this=0x7f44d8dd5960) at /log/RQG/shipjain/SourceMysql/sql/sql_executor.cc:139
#17 0x00000000012ea689 in handle_query (thd=0x7f44d8019780, lex=0x7f44d801ba38, result=0x7f44d8a1dab8, added_options=0, removed_options=0)
    at /log/RQG/shipjain/SourceMysql/sql/sql_select.cc:194
#18 0x00000000012ab893 in execute_sqlcom_select (thd=0x7f44d8019780, all_tables=0x7f44d800e788) at /log/RQG/shipjain/SourceMysql/sql/sql_parse.cc:5817
#19 0x00000000012a5386 in mysql_execute_command (thd=0x7f44d8019780, first_level=true) at /log/RQG/shipjain/SourceMysql/sql/sql_parse.cc:3478
#20 0x00000000012ac707 in mysql_parse (thd=0x7f44d8019780, parser_state=0x7f4548554620) at /log/RQG/shipjain/SourceMysql/sql/sql_parse.cc:6230
#21 0x000000000129e3cd in dispatch_command (thd=0x7f44d8019780, com_data=0x7f4548554d70, command=COM_QUERY) at /log/RQG/shipjain/SourceMysql/sql/sql_parse.cc:1444
#22 0x000000000129d347 in do_command (thd=0x7f44d8019780) at /log/RQG/shipjain/SourceMysql/sql/sql_parse.cc:1009
#23 0x00000000014f1487 in handle_connection (arg=0x3eb08b0) at /log/RQG/shipjain/SourceMysql/sql/conn_handler/connection_handler_per_thread.cc:302
#24 0x0000000002199d44 in pfs_spawn_thread (arg=0x41b7a00) at /log/RQG/shipjain/SourceMysql/storage/perfschema/pfs.cc:2228
#25 0x00007f4553b96851 in start_thread () from /lib64/libpthread.so.0
#26 0x00007f455290067d in clone () from /lib64/libc.so.6

How to repeat:
gdb /log/RQG/shipjain/rqg/storage/1464264173/7log/log/RQG/shipjain/SourceMysql/sql/mysqld /log/RQG/shipjain/rqg/storage/1464264173/7log/dev/shm/vardir/1464264173/5/1/data/core.6889

on vitro94.no.oracle.com
[9 Jun 2016 11:37] Marko Mäkelä
Posted by developer:
 
This looks like a regression introduced by WL#7943 which implemented I_S.FILES for InnoDB.
[18 Jun 2016 21:38] Omer Barnir
Posted by developer:
 
Reported version value updated to reflect release name change from 5.8 to 8.0
[1 Sep 2016 13:45] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 5.7.16, 8.0.1 release, and here's the changelog entry:

An INFORMATION_SCHEMA.FILES query resulted in a server exit due to a race
condition with a concurrent tablespace creation operation.
[28 Sep 2016 12:11] Daniel Price
Posted by developer:
 
Changelog entry moved to 5.7.17, 8.0.1 releases.