[MDEV-16169] InnoDB: Failing assertion: !space->referenced() Created: 2018-05-14  Updated: 2020-09-03  Resolved: 2018-05-15

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.3
Fix Version/s: 10.3.7

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Attachments: HTML File threads1    
Issue Links:
Problem/Incident
is caused by MDEV-15983 Reduce fil_system.mutex contention fu... Closed

 Description   

https://api.travis-ci.org/v3/job/378419530/log.txt

10.3 15419a558370aeed9521b498c34d50f20a8d47a5

2018-05-13 17:43:28 0x7f08c07ce700  InnoDB: Assertion failure in file /home/travis/src/storage/innobase/fil/fil0fil.cc line 2741
InnoDB: Failing assertion: !space->referenced()
 
Query (0x7f088001fba8): DROP TABLE IF EXISTS trigger124861,  transforms.trigger224861 /* QNO 7660 CON_ID 18 */
Connection ID (thread ID): 18
Status: NOT_KILLED

#5  0x00007f08d6224028 in __GI_abort () at abort.c:89
#6  0x000055692ddc3ceb in ut_dbg_assertion_failed (expr=0x55692e4b3991 "!space->referenced()", file=0x55692e4b2700 "/home/travis/src/storage/innobase/fil/fil0fil.cc", line=2741) at /home/travis/src/storage/innobase/ut/ut0dbg.cc:61
#7  0x000055692debf743 in fil_delete_tablespace (id=3554, drop_ahi=false) at /home/travis/src/storage/innobase/fil/fil0fil.cc:2741
#8  0x000055692dcf53d5 in row_drop_table_for_mysql (name=0x7f08c07ca560 "test/trigger124861", trx=0x7f08c0b57578, drop_db=false, create_failed=0, nonatomic=true) at /home/travis/src/storage/innobase/row/row0mysql.cc:3864
#9  0x000055692dba5f4e in ha_innobase::delete_table (this=0x7f0880020e70, name=0x7f08c07cc140 "./test/trigger124861") at /home/travis/src/storage/innobase/handler/ha_innodb.cc:12992
#10 0x000055692d98e716 in handler::ha_delete_table (this=0x7f0880020e70, name=0x7f08c07cc140 "./test/trigger124861") at /home/travis/src/sql/handler.cc:4520
#11 0x000055692d988779 in ha_delete_table (thd=0x7f088000b2f0, table_type=0x556931157650, path=0x7f08c07cc140 "./test/trigger124861", db=0x7f08c07cbdd0, alias=0x7f088001fd38, generate_warning=true) at /home/travis/src/sql/handler.cc:2528
#12 0x000055692d75b8da in mysql_rm_table_no_locks (thd=0x7f088000b2f0, tables=0x7f088001fd10, if_exists=true, drop_temporary=false, drop_view=false, drop_sequence=false, dont_log_query=false, dont_free_locks=false) at /home/travis/src/sql/sql_table.cc:2514
#13 0x000055692d75a8ee in mysql_rm_table (thd=0x7f088000b2f0, tables=0x7f088001fd10, if_exists=true, drop_temporary=false, drop_sequence=false) at /home/travis/src/sql/sql_table.cc:2128
#14 0x000055692d696449 in mysql_execute_command (thd=0x7f088000b2f0) at /home/travis/src/sql/sql_parse.cc:5051
#15 0x000055692d69f958 in mysql_parse (thd=0x7f088000b2f0, rawbuf=0x7f088001fba8 "DROP TABLE IF EXISTS trigger124861,  transforms.trigger224861 /* QNO 7660 CON_ID 18 */", length=86, parser_state=0x7f08c07cd5f0, is_com_multi=false, is_next_command=false) at /home/travis/src/sql/sql_parse.cc:8019
#16 0x000055692d68cddc in dispatch_command (command=COM_QUERY, thd=0x7f088000b2f0, packet=0x7f08800177a1 "DROP TABLE IF EXISTS trigger124861,  transforms.trigger224861 /* QNO 7660 CON_ID 18 */ ", packet_length=87, is_com_multi=false, is_next_command=false) at /home/travis/src/sql/sql_parse.cc:1846
#17 0x000055692d68b80d in do_command (thd=0x7f088000b2f0) at /home/travis/src/sql/sql_parse.cc:1391
#18 0x000055692d7f1609 in do_handle_one_connection (connect=0x556931d31280) at /home/travis/src/sql/sql_connect.cc:1402
#19 0x000055692d7f138d in handle_one_connection (arg=0x556931d31280) at /home/travis/src/sql/sql_connect.cc:1308
#20 0x00007f08d6ddb184 in start_thread (arg=0x7f08c07ce700) at pthread_create.c:312
#21 0x00007f08d62e803d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

experimental 6c40fc679d99de2a34ba7e3b6ac807b84be5942a

perl /home/travis/rqg/runall-new.pl --duration=350 --threads=6 --seed=1526233097 --reporters=Backtrace,ErrorLog,Deadlock --validators=TransformerNoComparator --transformers=ConvertSubqueriesToViews,ConvertTablesToDerived,Count,DisableOptimizations,Distinct,EnableOptimizations,ExecuteAsCTE,ExecuteAsDeleteReturning,ExecuteAsDerived,ExecuteAsExcept,ExecuteAsExecuteImmediate,ExecuteAsInsertSelect,ExecuteAsIntersect,ExecuteAsSelectItem,ExecuteAsUnion,ExecuteAsUpdateDelete,ExecuteAsView,ExecuteAsWhereSubquery,Having,InlineSubqueries,LimitRowsExamined,OrderBy,StraightJoin,ExecuteAsPreparedTwice,ExecuteAsTrigger,ExecuteAsSPTwice,ExecuteAsFunctionTwice --redefine=conf/mariadb/general-workarounds.yy --mysqld=--log_output=FILE --mysqld=--log_bin_trust_function_creators=1 --mysqld=--log-bin --mysqld=--max-statement-time=30 --mysqld=--loose-debug_assert_on_not_freed_memory=0 --views --redefine=conf/mariadb/versioning.yy --basedir=/home/travis/server --grammar=conf/runtime/information_schema.yy --engine=InnoDB --vardir=/home/travis/logs/vardir1_2

All threads attached as threads1

Also happened once locally, but not easily reproducible.



 Comments   
Comment by Marko Mäkelä [ 2018-05-15 ]

In threads1 there are some INFORMATION_SCHEMA queries that can increment the reference-count of tablespaces that are being dropped. One example is i_s_tablespaces_scrubbing_fill_table(); another is i_s_tablespaces_encryption_fill_table(). Also fil_space_next() is not skipping to-be-dropped tablespaces for the very first tablespace.

This ought to be a regression caused by MDEV-15983, not affecting any release.

Generated at Thu Feb 08 08:26:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.