[MDEV-27017] Assertion failure 'table->get_ref_count() == 0' on DDL that involves FULLTEXT INDEX Created: 2021-11-10  Updated: 2022-01-27  Resolved: 2022-01-05

Status: Closed
Project: MariaDB Server
Component/s: Full-text Search, Storage Engine - InnoDB
Affects Version/s: 10.6.3, 10.6.4, 10.6.5, 10.7.1
Fix Version/s: 10.6.6, 10.7.2

Type: Bug Priority: Critical
Reporter: Marko Mäkelä Assignee: Thirunarayanan Balathandayuthapani
Resolution: Fixed Votes: 0
Labels: crash, regression-10.6, rr-profile-analyzed

Issue Links:
Problem/Incident
is caused by MDEV-25506 Atomic DDL: .frm file is removed and ... Closed
Relates
relates to MDEV-25936 Crash during DDL that involves FULLTE... Closed

 Description   

MDEV-25506 introduced a race condition that was inadequately fixed by MDEV-25936.
Here is an example stack trace:

10.6

#2  0x000056397eb3ce0b in ut_dbg_assertion_failed (
    expr=0x56397ff9f440 "table->get_ref_count() == 0", 
    file=0x56397ff9f700 "/data/Server/bb-10.6-markoO/storage/innobase/dict/dict0dict.cc", line=1824)
    at /data/Server/bb-10.6-markoO/storage/innobase/ut/ut0dbg.cc:60
#3  0x000056397ec887aa in dict_sys_t::remove (this=0x563980edd580 <dict_sys>, 
    table=0x618000274908, lru=false, keep=false)
    at /data/Server/bb-10.6-markoO/storage/innobase/dict/dict0dict.cc:1824
#4  0x000056397ed045b3 in trx_t::commit (this=0x4f4764645068, 
    deleted=std::vector of length 9, capacity 16 = {...})
    at /data/Server/bb-10.6-markoO/storage/innobase/dict/drop.cc:249
#5  0x000056397e66b546 in ha_innobase::delete_table (this=0x62b000217be0, 
    name=0x1aa33317c300 "./test/#sql-backup-68681-24")
    at /data/Server/bb-10.6-markoO/storage/innobase/handler/ha_innodb.cc:13626

The assertion would fail on an internal table whose name starts with FTS_. The reason is that the call purge_sys.stop_FTS() does not actually wait that purge operations for all the FTS tables (related to the current operation) have ceased.



 Comments   
Comment by Thirunarayanan Balathandayuthapani [ 2021-12-30 ]

Patch is in bb-10.6-MDEV-27017

Comment by Matthias Leich [ 2022-01-05 ]

origin/bb-10.6-MDEV-27017 ad20bafbe27eb43a02e867c93c87007e1a34e4c0 2022-01-03T18:53:14+05:30
behaved well when running the RQG test battery for broad range coverage.

Comment by Marko Mäkelä [ 2022-01-05 ]

OK to push.

Generated at Thu Feb 08 09:49:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.