[MDEV-31442] Assertion ‘n & PENDING’ failed in fil_space_t::set_needs_flush() Created: 2023-06-09 Updated: 2023-07-26 Resolved: 2023-06-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.5, 10.6, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2 |
| Fix Version/s: | 10.5.22, 10.6.15, 10.9.8, 10.10.6, 10.11.5, 11.0.3, 11.1.2, 11.2.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Thirunarayanan Balathandayuthapani | Assignee: | Thirunarayanan Balathandayuthapani |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | hang, race | ||
| Description |
|
This debug assertion failure was observed while testing The scenario is as follows:
The following patch fixes this so that the tablespace reference will be incremented even though the flags are set.
The impact of this for non-debug builds should be that the reference count wraps around (from 0 to 536,870,911) and the 3 flags are "decremented". I believe that this should lead to InnoDB hanging at some point, and possibly a missed fdatasync() or fsync() call (which should not matter much, because the file is typically going to be deleted anyway). |
| Comments |
| Comment by Marko Mäkelä [ 2023-06-09 ] |
|
Thank you. I suggested this patch. Once it has been tested, please push it to 10.5. |
| Comment by Vladislav Lesin [ 2023-06-14 ] |
|
The fix 199f0d6ccc1900af3efc32b5892261872fc1fea0 looks good to me. |