[MDEV-24985] Shutdown fails to abort current InnoDB lock waits Created: 2021-02-25 Updated: 2021-06-05 Resolved: 2021-06-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.6 |
| Fix Version/s: | 10.6.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | regression-10.6 | ||
| Issue Links: |
|
||||||||
| Description |
|
After
The time difference is explained by the following:
then it would complete 48 seconds sooner (5782ms for my attempt). I determined that the time is being spent in the main thread, in close_connections():
During this time, the lock_wait() for the following is being waited for:
Only after the lock wait times out, the close_connections() will proceed to actually invoke innobase_end(). So, until that time, InnoDB is not given any signal that a shutdown has been requested. If InnoDB knew about the shutdown, it could abort the lock wait earlier. I initially suspected that this bug is not really caused by
the test before Before
wlad, can you help with this? You solved similar problems in |
| Comments |
| Comment by Marko Mäkelä [ 2021-02-25 ] | ||||||||||||||||||||||
|
The following patch to the test suggests that shutdown is missing something that would properly emulate the execution of KILL CONNECTION on every active connection:
With this patch, the test will complete in 3536ms for me. Without the patch, an additional innodb_lock_wait_timeout will be consumed. |