Bug #80669 Failing assert: fil_space_get(table->space) != __null in row0quiesce.cc line 724
Submitted: 9 Mar 2016 9:02 Modified: 19 Apr 2016 17:33
Reporter: Ramesh Sivaraman Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:debug OS:CentOS
Assigned to: CPU Architecture:Any
Tags: 5.7.11

[9 Mar 2016 9:02] Ramesh Sivaraman
Description:
Error info

Version: '5.7.11-debug'  socket: '/dev/shm/1457512173/socket.sock'  port: 37256  MySQL Community Server (GPL)
2016-03-09 08:54:55 0x7fe51b83a700  InnoDB: Assertion failure in thread 140621985851136 in file row0quiesce.cc line 724
InnoDB: Failing assertion: fil_space_get(table->space) != __null

GDB info

#0  0x00007fe51b284771 in pthread_kill () from /lib64/libpthread.so.0
#1  0x000000000180fa8c in my_write_core (sig=6) at /sda/ps57/mysql-server_dbg/mysys/stacktrace.c:247
#2  0x0000000000e6af64 in handle_fatal_signal (sig=6) at /sda/ps57/mysql-server_dbg/sql/signal_handler.cc:220
#3  <signal handler called>
#4  0x00007fe5194105c9 in raise () from /lib64/libc.so.6
#5  0x00007fe519411cd8 in abort () from /lib64/libc.so.6
#6  0x0000000001afc33f in ut_dbg_assertion_failed (expr=0x20cb768 "fil_space_get(table->space) != __null", file=0x20cb1e0 "/sda/ps57/mysql-server_dbg/storage/innobase/row/row0quiesce.cc", line=724) at /sda/ps57/mysql-server_dbg/storage/innobase/ut/ut0dbg.cc:67
#7  0x0000000001a84cc5 in row_quiesce_table_start (table=0x7fe4c2c916a0, trx=0x7fe509c008b0) at /sda/ps57/mysql-server_dbg/storage/innobase/row/row0quiesce.cc:724
#8  0x00000000018e0206 in ha_innobase::external_lock (this=0x7fe4c2caa830, thd=0x7fe4c2c19000, lock_type=0) at /sda/ps57/mysql-server_dbg/storage/innobase/handler/ha_innodb.cc:15254
#9  0x0000000000ef1b3e in handler::ha_external_lock (this=0x7fe4c2caa830, thd=0x7fe4c2c19000, lock_type=0) at /sda/ps57/mysql-server_dbg/sql/handler.cc:7695
#10 0x00000000016980af in lock_external (thd=0x7fe4c2c19000, tables=0x7fe4c2c32538, count=1) at /sda/ps57/mysql-server_dbg/sql/lock.cc:387
#11 0x0000000001697db1 in mysql_lock_tables (thd=0x7fe4c2c19000, tables=0x7fe4c2c2bf60, count=1, flags=4096) at /sda/ps57/mysql-server_dbg/sql/lock.cc:324
#12 0x00000000014685fa in lock_tables (thd=0x7fe4c2c19000, tables=0x7fe4c2c2b9d0, count=1, flags=4096) at /sda/ps57/mysql-server_dbg/sql/sql_base.cc:6559
#13 0x0000000001468090 in open_and_lock_tables (thd=0x7fe4c2c19000, tables=0x7fe4c2c2b9d0, flags=4096, prelocking_strategy=0x7fe51b838380) at /sda/ps57/mysql-server_dbg/sql/sql_base.cc:6376
#14 0x0000000001529af1 in flush_tables_for_export (thd=0x7fe4c2c19000, all_tables=0x7fe4c2c2b9d0) at /sda/ps57/mysql-server_dbg/sql/sql_reload.cc:539
#15 0x00000000014ea63e in mysql_execute_command (thd=0x7fe4c2c19000, first_level=true) at /sda/ps57/mysql-server_dbg/sql/sql_parse.cc:4112
#16 0x00000000014ee081 in mysql_parse (thd=0x7fe4c2c19000, parser_state=0x7fe51b839560) at /sda/ps57/mysql-server_dbg/sql/sql_parse.cc:5518
#17 0x00000000014e393b in dispatch_command (thd=0x7fe4c2c19000, com_data=0x7fe51b839cb0, command=COM_QUERY) at /sda/ps57/mysql-server_dbg/sql/sql_parse.cc:1428
#18 0x00000000014e2805 in do_command (thd=0x7fe4c2c19000) at /sda/ps57/mysql-server_dbg/sql/sql_parse.cc:996
#19 0x000000000160ecc7 in handle_connection (arg=0x7fe4e73dd8c0) at /sda/ps57/mysql-server_dbg/sql/conn_handler/connection_handler_per_thread.cc:301
#20 0x0000000001845888 in pfs_spawn_thread (arg=0x7fe4e6bf4120) at /sda/ps57/mysql-server_dbg/storage/perfschema/pfs.cc:2192
#21 0x00007fe51b27fdf3 in start_thread () from /lib64/libpthread.so.0
#22 0x00007fe5194d11ad in clone () from /lib64/libc.so.6

How to repeat:
Testcase

DROP DATABASE test;CREATE DATABASE test;USE test;
create temporary TABLE t1(a int key)engine=innodb;
CREATE TABLE t1(c1 CHAR (1));
DROP TABLE t1;
ALTER TABLE t1 DISCARD TABLESPACE;
flush tables t1 for export;
[9 Mar 2016 9:46] MySQL Verification Team
Hello Ramesh,

Thank you for the report and test case.
Observed that 5.7.11 debug build is affected.

Thanks,
Umesh
[15 Mar 2016 23:26] Roel Van de Paar
Serious bug - right?
[19 Apr 2016 17:33] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 5.7.13 release, and here's the changelog entry:

An FLUSH TABLES operation on a table with a discarded tablespace raised
an assertion.
[6 Oct 2018 0:45] Roel Van de Paar
See also bug 90545 (Roel)