[MDEV-25023] MariaDB 10.5 - DROP DATABASE locked Created: 2021-03-01 Updated: 2022-11-25 Resolved: 2022-11-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Query Cache |
| Affects Version/s: | 10.5.9, 10.5.12, 10.6.5 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Fabien CLERC | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 3 |
| Labels: | None | ||
| Environment: |
CPU: 2 [root]# uname -a [root]$ yum list installed | grep -i mariadb [root] cat /etc/my.cnf.d/ik.cnf [mysqld] #innodb_force_recovery=6 sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
[mysqldump] [mysqld_safe] |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
Hello,
The workflow works since years on MariaDB 5.5 but we are facing issues with a part of servers in MariaDB 10.5.
When we kill the process, the workflow continues with CREATE DATABASE which is also locked for hours, until we kill it.
Once done, impossible to stop MariaDB (sysctemctl stop mariadb ) and we have to "kill -9" the process We can reproduce (each time) the issue on several servers in MariaDB 10.5 The servers are configured the same way (via Ansible) We didn't identify differencies between the servers. For information, nearly all tables are in innodb. When we run the following command
We did not identified any problems
We tried activating performance_schema
but we didn't identified any locked request Do you have any idea to solve the issue ? Thanks and Regards |
| Comments |
| Comment by Daniel Black [ 2021-03-02 ] | |||||||||||||||||||||||||||||
|
It doesn't look like a filesystem issue however I had trouble parsing `face the issue on EXT4 ... AND do not reproduce on EXT4`. Can you attempt to capture a full backtrace at the point it is stalled? If you have a table name in that backtrace can you include the `show create table tablename` for it. If sensitive just replace the field/index names. | |||||||||||||||||||||||||||||
| Comment by Fabien CLERC [ 2021-03-02 ] | |||||||||||||||||||||||||||||
|
Hello.
About full backtrace, I'm not comfortable with gdb but I run both commands.
However, the DROP DATABASE still running
| |||||||||||||||||||||||||||||
| Comment by Fabien CLERC [ 2021-03-02 ] | |||||||||||||||||||||||||||||
|
To complete, when DROP DATABASE is blocked, the CPU is used at 100% | |||||||||||||||||||||||||||||
| Comment by Fabien CLERC [ 2021-03-02 ] | |||||||||||||||||||||||||||||
|
Another information to complete: | |||||||||||||||||||||||||||||
| Comment by Jonny Wylie [ 2021-07-06 ] | |||||||||||||||||||||||||||||
|
Fabien did you ever get this to work. It still seems to fail in the latest version of MariaDB too, I found the problem was introduced after 10.5.2, it might fail in 10.5.3 but the dockerhub image for that version seems broken so I couldn't test it. | |||||||||||||||||||||||||||||
| Comment by Fabien CLERC [ 2021-07-06 ] | |||||||||||||||||||||||||||||
|
Hello, Regards. | |||||||||||||||||||||||||||||
| Comment by Jonny Wylie [ 2021-07-06 ] | |||||||||||||||||||||||||||||
|
Fabien, no we don't have any anti virus software on the server, so that's definately not the cause for us. I'm sure it's something in MAriaDB, because 10.5.2 works fine, but 10.5.4 does not. | |||||||||||||||||||||||||||||
| Comment by Jonny Wylie [ 2021-07-07 ] | |||||||||||||||||||||||||||||
|
Fabien I found a work around, if you execute query `FLUSH TABLES` before dropping the database, then it seems to work properly. | |||||||||||||||||||||||||||||
| Comment by Alex [ 2021-08-04 ] | |||||||||||||||||||||||||||||
|
Same error here, deadlock when dropping a small 8 MB database with 33 tables. | |||||||||||||||||||||||||||||
| Comment by Rémi Augier [ 2022-01-11 ] | |||||||||||||||||||||||||||||
|
Same issue here in 10.5.12 and 10.6.5 | |||||||||||||||||||||||||||||
| Comment by Neven Ivanov [ 2022-10-10 ] | |||||||||||||||||||||||||||||
|
I was able to reproduce the problem on 100% of the times with MariaDB 10.5/10.6 ( no matter of the subversion but tested mostly with 10.6.10 ) 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). | |||||||||||||||||||||||||||||
| Comment by Alex [ 2022-10-28 ] | |||||||||||||||||||||||||||||
|
I can reproduce the deadlock with Nevens example everytime also with the latest MariaDB 10.6.10. As written already last year, please add 10.6 to affected versions! | |||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-11-25 ] | |||||||||||||||||||||||||||||
|
continuing in |