Bug #92036 InnoDB: Assertion failure: api0api.cc:3163:!sdi_delete_failed

Submitted: 16 Aug 2018 7:49 Modified: 17 Aug 2018 11:52
Reporter: Roel Van de Paar Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:8.0.12 OS:Any
Assigned to: CPU Architecture:Any
Tags: debug

[16 Aug 2018 7:49] Roel Van de Paar
Description:
2018-08-16T05:07:15.904537Z 0 [System] [MY-010931] [Server] /sda/MS300718-mysql-8.0.12-linux-x86_64-debug/bin/mysqld: ready for connections. Version: '8.0.12-debug'  socket: '/sda/MS300718-mysql-8.0.12-linux-x86_64-debug/socket.sock'  port: 10029  MySQL Community Server (GPL).
2018-08-16T06:00:40.203301Z 9 [Warning] [MY-013037] [InnoDB] InnoDB: Cannot find a free slot for an undo log. Do you have too many active transactions running concurrently?
2018-08-16T06:00:40.218814Z 9 [Warning] [MY-013037] [InnoDB] InnoDB: Cannot find a free slot for an undo log. Do you have too many active transactions running concurrently?
2018-08-16T06:00:40.220002Z 9 [Warning] [MY-011837] [InnoDB] InnoDB: sdi_delete failed: tablespace_id: 2 Key: 1 332 Error returned: 47
2018-08-16T06:00:40.220206Z 9 [ERROR] [MY-000000] [InnoDB] InnoDB: Assertion failure: api0api.cc:3163:!sdi_delete_failed
InnoDB: thread 140518357796608

#0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
#1  0x0000561ae266a78d in my_write_core (sig=6) at /git/MS-8.0.12_dbg/mysys/stacktrace.cc:278
#2  0x0000561ae13bed94 in handle_fatal_signal (sig=6) at /git/MS-8.0.12_dbg/sql/signal_handler.cc:249
#3  <signal handler called>
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#5  0x00007fccfad11801 in __GI_abort () at abort.c:79
#6  0x0000561ae2a54239 in ut_dbg_assertion_failed (expr=0x561ae3cd5f03 "!sdi_delete_failed",
    file=0x561ae3cd5630 "/git/MS-8.0.12_dbg/storage/innobase/api/api0api.cc", line=3163)
    at /git/MS-8.0.12_dbg/storage/innobase/ut/ut0dbg.cc:90
#7  0x0000561ae2a74df6 in ib_sdi_delete (tablespace_id=2, ib_sdi_key=0x7fccfacc70c0, trx=0x7fcce4c008d0)
    at /git/MS-8.0.12_dbg/storage/innobase/api/api0api.cc:3163
#8  0x0000561ae2b84b87 in dict_sdi_delete (tablespace=..., table=0x7fcccc84eaf8, sdi_key=0x7fccfacc8400)
    at /git/MS-8.0.12_dbg/storage/innobase/dict/dict0sdi.cc:468
#9  0x0000561ae25ae38b in dd::sdi_tablespace::<lambda(const dd::Tablespace&)>::operator()(const dd::Tablespace &) const (
    __closure=0x7fccfacc8410, tblspc=...) at /git/MS-8.0.12_dbg/sql/dd/impl/sdi_tablespace.cc:204
#10 0x0000561ae25aeb14 in (anonymous namespace)::<lambda(dd::Object_id)>::operator()(dd::Object_id) const (__closure=0x7fccfacc7480,
    tsid=7) at /git/MS-8.0.12_dbg/sql/dd/impl/sdi_tablespace.cc:139
#11 0x0000561ae25af2b7 in (anonymous namespace)::Apply_to_tsid::operator()<dd::Index, (anonymous namespace)::apply_to_tablespaces(THD*, const dd::Table&, CLOSURE_TYPE&&) [with CLOSURE_TYPE = dd::sdi_tablespace::drop_tbl_sdi(THD*, const handlerton&, const dd::Table&, const dd::Schema&)::<lambda(const dd::Tablespace&)>]::<lambda(dd::Object_id)> >(const dd::Index &, (anonymous namespace)::<lambda(dd::Object_id)> &&) (this=0x7fccfacc745f, t=..., clos=...) at /git/MS-8.0.12_dbg/sql/dd/impl/sdi_tablespace.cc:62
#12 0x0000561ae25aefc7 in (anonymous namespace)::apply_to_table_graph<(anonymous namespace)::Apply_to_tsid, (anonymous namespace)::apply_to_tablespaces(THD*, const dd::Table&, CLOSURE_TYPE&&) [with CLOSURE_TYPE = dd::sdi_tablespace::drop_tbl_sdi(THD*, const handlerton&, const dd::Table&, const dd::Schema&)::<lambda(const dd::Tablespace&)>]::<lambda(dd::Object_id)> >(const dd::Table &, (anonymous namespace)::Apply_to_tsid &&, (anonymous namespace)::<lambda(dd::Object_id)> &&) (table=..., ftor=..., clos=...)
    at /git/MS-8.0.12_dbg/sql/dd/impl/sdi_tablespace.cc:74
#13 0x0000561ae25aebf8 in (anonymous namespace)::apply_to_tablespaces<dd::sdi_tablespace::drop_tbl_sdi(THD*, const handlerton&, const dd::Table&, const dd::Schema&)::<lambda(const dd::Tablespace&)> >(THD *, const dd::Table &, dd::sdi_tablespace::<lambda(const dd::Tablespace&)> &&) (thd=0x7fcccc854000, table=..., clos=...) at /git/MS-8.0.12_dbg/sql/dd/impl/sdi_tablespace.cc:140
#14 0x0000561ae25ae56a in dd::sdi_tablespace::drop_tbl_sdi (thd=0x7fcccc854000, hton=..., table=..., schema=...)
    at /git/MS-8.0.12_dbg/sql/dd/impl/sdi_tablespace.cc:208
#15 0x0000561ae25a6885 in dd::sdi::<lambda(const dd::Schema&)>::operator()(const dd::Schema &) const (__closure=0x7fccfacc9420, s=...)
    at /git/MS-8.0.12_dbg/sql/dd/impl/sdi.cc:584
#16 0x0000561ae25a6f72 in dd::(anonymous namespace)::with_schema<long long unsigned int, dd::sdi::drop(THD*, const dd::Table*)::<lambda(const dd::Schema&)> >(THD *, const unsigned long long &, dd::sdi::<lambda(const dd::Schema&)> &&) (thd=0x7fcccc854000, 
    key=@0x7fccfacc9408: 5, clos=...) at /git/MS-8.0.12_dbg/sql/dd/impl/sdi.cc:487
#17 0x0000561ae25a6971 in dd::sdi::drop (thd=0x7fcccc854000, tp=0x7fcccc84eaf8) at /git/MS-8.0.12_dbg/sql/dd/impl/sdi.cc:586
#18 0x0000561ae24b9743 in dd::cache::Storage_adapter::drop<dd::Table> (thd=0x7fcccc854000, object=0x7fcccc84eaf8)
    at /git/MS-8.0.12_dbg/sql/dd/impl/cache/storage_adapter.cc:235
#19 0x0000561ae23b131f in dd::cache::Dictionary_client::drop<dd::Table> (this=0x7fcccc87a000, object=0x7fcccc84eaf8)
    at /git/MS-8.0.12_dbg/sql/dd/impl/cache/dictionary_client.cc:2365
#20 0x0000561ae12c60fb in mysql_inplace_alter_table (thd=0x7fcccc854000, schema=..., new_schema=..., table_def=0x7fcccc84eaf8, 
    altered_table_def=0x7fcccc84fc78, table_list=0x7fcccc8a0f10, table=0x0, altered_table=0x7fcccc8fb820, 
    ha_alter_info=0x7fccfaccaee0, inplace_supported=HA_ALTER_INPLACE_INSTANT, target_mdl_request=0x7fccfaccbff0, 
    alter_ctx=0x7fccfaccc900, columns=std::set with 0 elements, fk_key_info=0x7fcccc9df710, fk_key_count=0, 
    fk_invalidator=0x7fccfacc9f70) at /git/MS-8.0.12_dbg/sql/sql_table.cc:10714
#21 0x0000561ae12cf9c0 in mysql_alter_table (thd=0x7fcccc854000, new_db=0x7fcccc8a1498 "test", new_name=0x0, 
    create_info=0x7fccfaccd8b0, table_list=0x7fcccc8a0f10, alter_info=0x7fccfaccd9a0) at /git/MS-8.0.12_dbg/sql/sql_table.cc:13760
#22 0x0000561ae179ce7a in Sql_cmd_alter_table::execute (this=0x7fcccc8a1578, thd=0x7fcccc854000)
    at /git/MS-8.0.12_dbg/sql/sql_alter.cc:330
#23 0x0000561ae1215a19 in mysql_execute_command (thd=0x7fcccc854000, first_level=true) at /git/MS-8.0.12_dbg/sql/sql_parse.cc:4210
#24 0x0000561ae1217f94 in mysql_parse (thd=0x7fcccc854000, parser_state=0x7fccfaccf330) at /git/MS-8.0.12_dbg/sql/sql_parse.cc:4925
#25 0x0000561ae120daeb in dispatch_command (thd=0x7fcccc854000, com_data=0x7fccfaccfc90, command=COM_QUERY)
    at /git/MS-8.0.12_dbg/sql/sql_parse.cc:1607
#26 0x0000561ae120c3c6 in do_command (thd=0x7fcccc854000) at /git/MS-8.0.12_dbg/sql/sql_parse.cc:1232
#27 0x0000561ae13ac678 in handle_connection (arg=0x7fcce87a5480)
    at /git/MS-8.0.12_dbg/sql/conn_handler/connection_handler_per_thread.cc:308
#28 0x0000561ae2d1b422 in pfs_spawn_thread (arg=0x7fccee7e7720) at /git/MS-8.0.12_dbg/storage/perfschema/pfs.cc:2836
#29 0x00007fccfc6fd6db in start_thread (arg=0x7fccfacd0700) at pthread_create.c:463
#30 0x00007fccfadf288f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

How to repeat:
CREATE DATABASE test;
USE test;
create TABLE t1(a int key,b text);
set global innodb_trx_rseg_n_slots_debug=1;
ALTER TABLE t1 ADD COLUMN c55 INT COMMENT'';
[16 Aug 2018 7:53] MySQL Verification Team
Hello Roel,

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

regards,
Umesh
[17 Aug 2018 11:51] Roel Van de Paar
Another testcase

CREATE DATABASE test;
USE test;
CREATE TABLE t1(c01 char,c02 char,c03 char,c04 char,c05 char,c06 char,c07 char,c08 char,c09 char,c10 char)ROW_FORMAT=compact;
set global innodb_trx_rseg_n_slots_debug=1;
alter table t1 rename to t1,add column d int;

And another 

CREATE DATABASE test;
USE test;
set global innodb_file_per_table=off;
create TABLE t1(a int,primary key (a),b int,rand_value double);
set global innodb_trx_rseg_n_slots_debug=1;
DROP TABLE t1;

Note that the last one is DROP TABLE.
[17 Aug 2018 11:52] Roel Van de Paar
Also ref bug 88354

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.056 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.