mariadb/storage/innobase/include
Vlad Lesin a474e3278c MDEV-27701 Race on trx->lock.wait_lock between lock_rec_move() and lock_sys_t::cancel()
The initial issue was in assertion failure, which checked the equality
of lock to cancel with trx->lock.wait_lock in lock_sys_t::cancel().

If we analyze lock_sys_t::cancel() code from the perspective of
trx->lock.wait_lock racing, we won't find the error there, except the
cases when we need to reload it after the corresponding latches
acquiring.

So the fix is just to remove the assertion and reload
trx->lock.wait_lock after acquiring necessary latches.

Reviewed by: Marko Mäkelä <marko.makela@mariadb.com>
2023-02-20 20:31:24 +03:00
..
btr0btr.h MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT 2023-01-24 14:09:21 +02:00
btr0btr.inl MDEV-29603 btr_cur_open_at_index_side() is missing some consistency checks 2022-11-17 08:19:01 +02:00
btr0bulk.h MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
btr0cur.h MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT 2023-01-24 14:09:21 +02:00
btr0cur.inl MDEV-29603 btr_cur_open_at_index_side() is missing some consistency checks 2022-11-17 08:19:01 +02:00
btr0defragment.h MDEV-25791: Remove UNIV_INTERN 2021-05-27 13:28:08 +03:00
btr0pcur.h MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT 2023-01-24 14:09:21 +02:00
btr0pcur.inl MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT 2023-01-24 14:09:21 +02:00
btr0sea.h Merge 10.5 into 10.6 2022-12-13 16:58:58 +02:00
btr0sea.inl MDEV-27700 ASAN: Heap_use_after_free in btr_search_drop_page_hash_index() 2022-08-22 16:29:46 +05:30
btr0types.h MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT 2023-01-24 14:09:21 +02:00
buf0block_hint.h MDEV-27058: Reduce the size of buf_block_t and buf_page_t 2021-11-18 17:47:19 +02:00
buf0buddy.h Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
buf0buf.h MDEV-30134 Assertion failed in buf_page_t::unfix() in buf_pool_t::watch_unset() 2023-02-16 08:29:44 +02:00
buf0buf.inl Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
buf0checksum.h MDEV-25105 Remove innodb_checksum_algorithm values none,innodb,... 2021-03-11 12:46:18 +02:00
buf0dblwr.h MDEV-23399 fixup: Use plain pthread_cond 2021-02-07 12:19:24 +02:00
buf0dump.h
buf0flu.h MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT 2023-01-24 14:09:21 +02:00
buf0lru.h MDEV-26826 Duplicated computations of buf_pool.page_hash addresses 2021-10-22 12:33:37 +03:00
buf0rea.h MDEV-26547 Restoring InnoDB buffer pool dump is single-threaded for no reason 2021-09-06 10:14:24 +03:00
buf0types.h MDEV-28845 InnoDB: Failing assertion: bpage->can_relocate() in buf0lru.cc 2022-06-15 17:00:05 +03:00
data0data.h MDEV-26294 Duplicate entries in unique index not detected when changing collation 2022-07-04 16:13:04 +03:00
data0data.inl Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
data0type.h MDEV-26294 Duplicate entries in unique index not detected when changing collation 2022-07-04 16:13:04 +03:00
data0type.inl cleanup: un-inline dtype_get_mblen() 2022-04-13 17:50:00 +02:00
data0types.h
db0err.h Merge 10.5 into 10.6 2022-06-09 13:34:52 +03:00
dict0boot.h MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
dict0crea.h MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
dict0crea.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
dict0defrag_bg.h MDEV-25919 fixup: Acquire MDL also in defragmentation 2021-09-18 14:39:32 +03:00
dict0dict.h MDEV-29504/MDEV-29849 TRUNCATE breaks FOREIGN KEY locking 2022-11-08 17:34:34 +02:00
dict0dict.inl MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
dict0load.h MDEV-29504/MDEV-29849 TRUNCATE breaks FOREIGN KEY locking 2022-11-08 17:34:34 +02:00
dict0mem.h Merge 10.5 into 10.6 2023-01-03 18:13:11 +02:00
dict0mem.inl Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
dict0pagecompress.h MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
dict0pagecompress.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
dict0stats.h Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
dict0stats.inl Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
dict0stats_bg.h Merge 10.5 into 10.6 2022-04-26 15:21:20 +03:00
dict0types.h Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
dyn0buf.h MDEV-29603 btr_cur_open_at_index_side() is missing some consistency checks 2022-11-17 08:19:01 +02:00
dyn0types.h
eval0eval.h MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
eval0eval.inl Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
eval0proc.h MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
eval0proc.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
fil0crypt.h MDEV-13542: Do not crash on decryption failure 2022-06-08 09:48:12 +03:00
fil0crypt.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
fil0fil.h Merge 10.5 into 10.6 2022-12-15 16:18:28 +02:00
fil0pagecompress.h Merge 10.4 into 10.5 2021-08-18 18:22:35 +03:00
fsp0file.h MDEV-27014 InnoDB fails to restore page 0 from the doublewrite buffer 2021-12-12 09:58:54 +05:30
fsp0fsp.h Merge 10.5 into 10.6 2022-12-13 16:58:58 +02:00
fsp0space.h MDEV-25312 Replace fil_space_t::name with fil_space_t::name() 2021-04-07 18:01:13 +03:00
fsp0sysspace.h
fsp0types.h MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
fts0ast.h Merge 10.4 to 10.5 2020-10-22 17:08:49 +03:00
fts0blex.h
fts0fts.h Merge 10.5 into 10.6 2023-01-03 18:13:11 +02:00
fts0opt.h
fts0pars.h
fts0plugin.h
fts0priv.h Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
fts0priv.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
fts0tlex.h
fts0tokenize.h
fts0types.h MDEV-25581 Allow user thread to do InnoDB fts cache sync 2022-06-10 13:39:07 +05:30
fts0types.inl Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
fts0vlc.h MDEV-19522 InnoDB commit fails when FTS_DOC_ID value is greater than 4294967295 2021-10-21 12:56:59 +03:00
fut0lst.h MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
gis0geo.h
gis0rtree.h MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT 2023-01-24 14:09:21 +02:00
gis0rtree.inl MDEV-21098: Assertion failure in rec_get_offsets_func() 2022-08-01 11:25:50 +03:00
gis0type.h MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT 2023-01-24 14:09:21 +02:00
ha0ha.h Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
ha0ha.inl Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
ha0storage.h MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
ha0storage.inl Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
ha_prototypes.h MDEV-29843 Do not use asynchronous log_write_upto() for system THDs 2022-10-25 19:40:44 +02:00
handler0alter.h
hash0hash.h After-merge fixes 2022-03-08 09:04:03 +02:00
ibuf0ibuf.h Merge 10.5 into 10.6 2022-11-14 15:44:55 +02:00
ibuf0ibuf.inl MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT 2023-01-24 14:09:21 +02:00
lock0iter.h
lock0lock.h MDEV-27701 Race on trx->lock.wait_lock between lock_rec_move() and lock_sys_t::cancel() 2023-02-20 20:31:24 +03:00
lock0lock.inl MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
lock0prdt.h MDEV-20612: Partition lock_sys.latch 2021-02-12 17:44:32 +02:00
lock0priv.h After-merge fixes 2022-03-08 09:04:03 +02:00
lock0priv.inl After-merge fixes 2022-03-08 09:04:03 +02:00
lock0types.h MDEV-20612: Partition lock_sys.latch 2021-02-12 17:44:32 +02:00
log0crypt.h MDEV-25791: Remove UNIV_INTERN 2021-05-27 13:28:08 +03:00
log0log.h Merge 10.5 into 10.6 2022-11-14 15:44:55 +02:00
log0log.inl Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
log0recv.h Merge 10.5 into 10.6 2023-02-16 08:17:54 +02:00
log0types.h
mach0data.h Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
mach0data.inl Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
mem0mem.h Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
mem0mem.inl Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
mtr0log.h MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT 2023-01-24 14:09:21 +02:00
mtr0mtr.h MDEV-30638 Deadlock between INSERT and InnoDB non-persistent statistics update 2023-02-16 08:30:20 +02:00
mtr0types.h MDEV-30638 Deadlock between INSERT and InnoDB non-persistent statistics update 2023-02-16 08:30:20 +02:00
os0file.h Apply clang-tidy to remove empty constructors / destructors 2023-02-09 16:09:08 +02:00
os0file.inl MDEV-30132 Crash after recovery, with InnoDB: Tried to read ... 2022-11-30 10:54:03 +02:00
page0cur.h MDEV-29603 btr_cur_open_at_index_side() is missing some consistency checks 2022-11-17 08:19:01 +02:00
page0cur.inl MDEV-29603 btr_cur_open_at_index_side() is missing some consistency checks 2022-11-17 08:19:01 +02:00
page0page.h MDEV-28797 Assertion `page_rec_is_user_rec(rec)' failed in PageBulk::getSplitRec 2022-11-08 15:27:29 +05:30
page0page.inl MDEV-28797 Assertion `page_rec_is_user_rec(rec)' failed in PageBulk::getSplitRec 2022-11-08 15:27:29 +05:30
page0types.h MDEV-27924 page_zip_copy_recs() corrupts ROW_FORMAT=COMPRESSED block descriptor 2022-02-23 11:34:52 +02:00
page0zip.h MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
page0zip.inl Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
pars0grm.h Cleanup: Remove pars_stored_procedure_call() 2021-07-29 15:37:35 +03:00
pars0opt.h
pars0pars.h MDEV-25919 preparation: Various cleanup 2021-08-31 13:54:20 +03:00
pars0sym.h
pars0types.h
que0que.h Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
que0que.inl Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
que0types.h
read0types.h MDEV-24402: InnoDB CHECK TABLE ... EXTENDED 2022-10-21 10:02:54 +03:00
rem0cmp.h Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
rem0cmp.inl Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
rem0rec.h Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
rem0rec.inl MDEV-21098: Assertion failure in rec_get_offsets_func() 2022-08-01 11:25:50 +03:00
rem0types.h
row0ext.h Merge branch '10.3' into 10.4 2022-01-30 09:46:52 +01:00
row0ext.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
row0ftsort.h Cleanup: Replace mysql_cond_t with pthread_cond_t 2021-02-07 13:21:18 +02:00
row0import.h
row0ins.h Merge 10.5 into 10.6 2023-01-03 18:13:11 +02:00
row0log.h MDEV-15250 UPSERT during ALTER TABLE results in 'Duplicate entry' error for alter 2022-04-26 16:22:56 +05:30
row0merge.h MDEV-26294 Duplicate entries in unique index not detected when changing collation 2022-07-04 16:13:04 +03:00
row0mysql.h Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
row0purge.h Simplify purge a little 2022-10-06 13:15:12 +03:00
row0quiesce.h
row0row.h MDEV-29603 btr_cur_open_at_index_side() is missing some consistency checks 2022-11-17 08:19:01 +02:00
row0row.inl Merge branch '10.3' into 10.4 2022-01-30 09:46:52 +01:00
row0sel.h MDEV-24402: InnoDB CHECK TABLE ... EXTENDED 2022-10-21 10:02:54 +03:00
row0types.h
row0uins.h
row0umod.h
row0undo.h
row0upd.h Merge 10.5 into 10.6 2023-01-03 18:13:11 +02:00
row0upd.inl Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
row0vers.h MDEV-24402: InnoDB CHECK TABLE ... EXTENDED 2022-10-21 10:02:54 +03:00
rw_lock.h MDEV-26781 InnoDB hangs when using SUX_LOCK_GENERIC 2022-04-06 12:51:27 +03:00
small_vector.h MDEV-30400 Assertion height == btr_page_get_level(...) on INSERT 2023-01-24 14:09:21 +02:00
srv0mon.h Merge branch '10.5' into 10.6 2022-05-18 10:30:47 +02:00
srv0mon.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
srv0srv.h Merge 10.5 into 10.6 2023-01-03 18:13:11 +02:00
srv0start.h Merge 10.5 into 10.6 2022-09-26 14:34:43 +03:00
srw_lock.h MDEV-26781 InnoDB hangs when using SUX_LOCK_GENERIC 2022-04-06 12:51:27 +03:00
sux_lock.h Cleanup: Remove os0thread 2022-04-19 13:49:52 +03:00
transactional_lock_guard.h MDEV-27956 hardware lock ellision on s390x/ppc64{,le} 2022-03-11 10:42:27 +11:00
trx0i_s.h Merge 10.2 into 10.3 2021-07-27 10:47:17 +03:00
trx0purge.h Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
trx0rec.h MDEV-24402: InnoDB CHECK TABLE ... EXTENDED 2022-10-21 10:02:54 +03:00
trx0roll.h MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
trx0rseg.h MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
trx0sys.h MDEV-29612 ReadViewBase::snapshot() misses an optimization 2022-10-06 13:14:16 +03:00
trx0trx.h MDEV-29853 Assertion `!strstr(table->name.m_name, "/FTS_") || purge_sys.must_wait_FTS()' failed in trx_t::commit 2022-11-08 15:27:29 +05:30
trx0trx.inl Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
trx0types.h MDEV-25062: Reduce trx_rseg_t::mutex contention 2021-06-23 13:42:11 +03:00
trx0undo.h MDEV-22388 Corrupted undo log record leads to server crash 2022-06-22 10:04:28 +03:00
trx0undo.inl MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
trx0xa.h
univ.i MDEV-21452 fixup: Remove PFS_NOT_INSTRUMENTED 2022-11-24 15:04:25 +02:00
ut0byte.h Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
ut0byte.inl Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
ut0counter.h Cleanup: Remove os0thread 2022-04-19 13:49:52 +03:00
ut0crc32.h
ut0dbg.h
ut0list.h MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
ut0list.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
ut0lst.h Do not use C++11 before MariaDB 10.4 2022-10-14 11:54:05 +03:00
ut0mem.h Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
ut0mem.inl Merge branch '10.4' into 10.5 2022-02-01 20:33:04 +01:00
ut0new.h Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
ut0pool.h MDEV-28836: Memory alignment cleanup 2022-06-21 16:59:49 +03:00
ut0rbt.h
ut0rnd.h Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
ut0rnd.inl Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
ut0sort.h
ut0stage.h
ut0ut.h Merge 10.5 into 10.6 2023-02-10 13:03:01 +02:00
ut0ut.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
ut0vec.h MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
ut0vec.inl MDEV-27494 Rename .ic files to .inl 2022-01-17 16:41:51 +01:00
ut0wqueue.h Merge 10.5 into 10.6 2021-10-21 16:06:34 +03:00