[MDEV-25942] Assertion `!table.n_waiting_or_granted_auto_inc_locks' failed in trx_t::drop_table Created: 2021-06-16 Updated: 2021-06-30 Resolved: 2021-06-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.6 |
| Fix Version/s: | 10.6.3 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | regression | ||
| Description |
|
No obvious immediate problem on a non-debug build.
|
| Comments |
| Comment by Marko Mäkelä [ 2021-06-28 ] | |||||||||||||||||||||||
|
Thank you. I fixed this by removing the assertion. Remaining debug assertions will check that only this transaction is holding locks on the table, and that one of them is an exclusive lock. | |||||||||||||||||||||||
| Comment by Elena Stepanova [ 2021-06-29 ] | |||||||||||||||||||||||
|
The same test case from the description still fails, now on a different assertion.
On the next fixing attempt, whether it's removing another assertion or anything else, please add the test case to the regression suite. | |||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-06-30 ] | |||||||||||||||||||||||
|
Sorry, it indeed looks like I must have forgotten to rerun the test case after removing the assertion. The remaining failing assertion must be relaxed as well, because the current transaction may hold an auto-increment lock on the table in addition to holding an exclusive lock. Initially I did not want to add the test case to the regression suite, because it includes a lock wait timeout and thus increases the regression test run time by a whole second (since in | |||||||||||||||||||||||
| Comment by Elena Stepanova [ 2021-06-30 ] | |||||||||||||||||||||||
|
For the regression suite you can use innodb_lock_wait_timeout= 0 instead. | |||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-06-30 ] | |||||||||||||||||||||||
|
You are right; I wrongly remembered that the value 0 would be infinite, while in fact it is an immediate timeout. Values between 100,000,000 and 1,073,741,824 would be an infinite timeout. On systems with 32-bit time_t, the 99,999,999-second timeout (3 years, 62 days and 9 hours) would become an immediate timeout if the wake-up time would be after some time in the year 2038. |