[MDEV-29187] Deadlock output in InnoDB status always shows transaction (0) Created: 2022-07-28 Updated: 2022-07-28 Resolved: 2022-07-28 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.6, 10.7, 10.8, 10.9, 10.10 |
| Fix Version/s: | 10.6.9, 10.7.5, 10.8.4, 10.9.2, 10.10.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Agustin | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The deadlock section in SHOW ENGINE INNODB STATUS is always showing transaction 0 as being rolled back:
How to reproduce: Use MariaDB 10.8 and generate a deadlock, then check SHOW ENGINE INNODB STATUS\G in the LATEST DETECTED DEADLOCK section.
– deadlock will be detected here. Check with:
As we can see there, there is no TRANSACTION listed with ID 0 in there.
Let me know if there is anything else I should provide here.
Thanks! |
| Comments |
| Comment by Marko Mäkelä [ 2022-07-28 ] |
|
The deadlock detector was rewritten in Before that rewrite, the deadlock detector would always display (1) or (2) and report only 2 transactions, which would be very confusing if a deadlock involves more than 2 transactions. |
| Comment by Marko Mäkelä [ 2022-07-28 ] |
|
It looks like the position is off by one; the involved transactions are listed as starting from (1). |
| Comment by Marko Mäkelä [ 2022-07-28 ] |
|
danblack, thank you for analyzing and fixing this. The position would actually always be reported as (0), because I forgot to increment the counter. |
| Comment by Daniel Black [ 2022-07-28 ] |
|
Thanks guliandro for the bug report and test cases. This will be fixed in the next release (sometime in the next week). |
| Comment by Agustin [ 2022-07-28 ] |
|
Hi Marko and Daniel, First, thanks both for the fast turnaround on this! Really amazing. Regarding: Indeed, sorry for not being clear enough on this. Thanks again! |