[MDEV-29233] Assertion `lock_table_has(trx, index->table, LOCK_IX)' failed at lock0lock.cc:4972 Created: 2022-08-03 Updated: 2023-09-04 Resolved: 2022-08-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Locking |
| Affects Version/s: | 10.8.3 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Zuming Jiang | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | crash | ||
| Environment: |
Ubuntu 20.04 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
I used my fuzzing tool to test MariaDB and found a transaction-related bug that make the crashes. Mariadb installation Setup the environment Reproduce bug /usr/local/mysql/bin/mysql -uroot -Dtestdb # set up connection conn_0 conn_1> START TRANSACTION; conn_2> START TRANSACTION; conn_0> START TRANSACTION; conn_1> update t_wmmbvd set wkey = 64; conn_2> insert into t_gj1wgb (wkey, pkey, c_a7cvid) values conn_0> delete from t_gj1wgb; --- This Delete is blocked conn_1> insert into t_wmmbvd (wkey, pkey, c_wnzys, c_gmrl1c, c_rajdu) values conn_2> COMMIT; --- This COMMIT will unblock the above DELETE (in conn_0) conn_0> update t_wmmbvd set wkey = 42; --- this UPDATE should be putted in conn_0 as soon as possible after the above COMMIT (in conn_2) is executed, and it will make the above INSERT (in conn_1) crash the maridb server conn_0> COMMIT; conn_1> COMMIT; I have simplified the content of the test case, and I hope this report can help you reproduce and fix the bug. In addition, I attached the failure report (which has its stack trace). |