[MDEV-29760] DROP DATABASE hangs when particular query cache is present Created: 2022-10-11 Updated: 2022-11-25 Resolved: 2022-11-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Locking, Query Cache |
| Affects Version/s: | 10.6.10, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10 |
| Fix Version/s: | 10.11.2, 10.5.19, 10.6.12, 10.7.8, 10.9.5, 10.9.6, 10.10.3 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Neven Ivanov | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
query_cache_type = 1 |
||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Description |
|
Hi, With MariaDB 10.6 ( no matter of the subversion but tested mostly with 10.6.10 ) when particular query cache is present you are unable to drop database. You will need the files all.sql and source_db_schema.sql which are attached to this task. Then just execute from bash console:
In summary if specific query cache is present, you are unable to drop database and it just hangs (MariaDB uses 100% cpu) and no restart ( without "kill -9" ) can be performed . |
| Comments |
| Comment by Elena Stepanova [ 2022-10-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for the report and the test case. Reproducible as described on 10.5+. A reduced and MTR-ed version:
DROP DATABASE db hangs (loops at high CPU), one of stack traces:
The problem was introduced in 10.5.4 by this commit:
(despite the main line, there were "other things" in that commit). | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alex [ 2022-10-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
I can reproduce the deadlock with Nevens example everytime also with the latest MariaDB 10.6.10. Related to | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-11-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Github PR #2346 for review. | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-11-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks NevenIvanov for the test case, and elenst for the reduction/bisect down to commit to blame. Both helped immensely. |