[MDEV-32247] mysqld.exe has been unable to stop. Created: 2023-09-26 Updated: 2023-12-04 Resolved: 2023-12-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform Windows, Storage Engine - InnoDB |
| Affects Version/s: | 10.5.22 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | kennyliao | Assignee: | Marko Mäkelä |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
Stop the database instance using mysqladmin shutdown,More than 24 hours without stopping. Msyqld has been unable to stop and runs until "InnoDB: FTS optimize thread exiting” 2023-09-22 9:16:30 0 [Note] C:\Server\mysql\bin\mysqld.exe (initiated by: sysdba[sysdba] @ [127.0.0.1]): Normal shutdown The information seen by ProcessMonitor has been undergoing flushbufferfile and readfile operations |
| Comments |
| Comment by Daniel Black [ 2023-09-26 ] | |||||||||||
|
What are your config options my_print_defaults --mysqld? | |||||||||||
| Comment by kennyliao [ 2023-09-26 ] | |||||||||||
|
Daniel Black ,my config options as follows: C:\Server\mysql\bin>my_print_defaults.exe --defaults-file=.\..\etc\my.ini mysqld | |||||||||||
| Comment by Vladislav Vaintroub [ 2023-09-26 ] | |||||||||||
|
kennyliao, it would be good to get a stacktrace corresponding to one of the mentioned events in the procmon. Otherwise my guess is that this very slow shutdown comes from non-default "innodb-fast-shutdown=0" in your options, and by long time spent merging change buffer. I noticed buffer pool is tiny by todays standards, and this can influence that. If this is the case, maybe one thing Innodb does wrong is being silent for a very long time during shutdown. marko, what do you think? Maybe it can tell "merging change buffer" at least? | |||||||||||
| Comment by Marko Mäkelä [ 2023-09-26 ] | |||||||||||
|
There used to be an innodb_fast_shutdown=0 shutdown hang when the change buffer is corrupted. It was supposed to be fixed by | |||||||||||
| Comment by Vladislav Vaintroub [ 2023-09-26 ] | |||||||||||
|
I understood it is "doing something", from kennyliao description, so maybe it is not a hang. Whether slow shutdown can take 24+ hours, I do not know, never seen, but if it is that slow, it is worth an Innodb-side announcement. Do not know if "FTS optimize thread exiting" could take all this time | |||||||||||
| Comment by kennyliao [ 2023-09-27 ] | |||||||||||
|
I tried to kill the mysqld process later, but the mysqld.exe started and then stopped, but it still couldn't stop | |||||||||||
| Comment by Marko Mäkelä [ 2023-09-27 ] | |||||||||||
|
We really need some stack traces. The file accesses mentioned in ProcessMonitor.png | |||||||||||
| Comment by Marko Mäkelä [ 2023-09-27 ] | |||||||||||
|
There already was a bug fix related to this: Specific to 10.6 (not sure if it could affect 10.5), while debugging We still need some stack traces to understand what exactly is going on here. | |||||||||||
| Comment by Marko Mäkelä [ 2023-09-27 ] | |||||||||||
|
For the record, with the bench.sh inside adaptive_purge.tar.gz of
This was with 12GiB of data in a 40GiB buffer pool but a tiny redo log compared to the workload (innodb_log_file_size=10g). As you can see, there was a message about the purge, but no further progress report for almost 6 minutes. This reported case could also be due to a change buffer merge. At least here we always get a message about the purge of history. | |||||||||||
| Comment by Marko Mäkelä [ 2023-09-28 ] | |||||||||||
|
The missing "to purge" messages should be a 10.6+ only problem. As far as I can tell, that was caused by the merge of | |||||||||||
| Comment by Vladislav Vaintroub [ 2023-11-04 ] | |||||||||||
|
kennyliao, can you provide some stacktraces, as described in https://jira.mariadb.org/browse/MDEV-32247?focusedCommentId=270421&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-270421? | |||||||||||
| Comment by Vladislav Vaintroub [ 2023-11-04 ] | |||||||||||
|
Reassigned to marko, I'm not sure how I can help further. |