Mysql server take 10 minutes to stop without message after time drift
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
|||
mariadb-10.3 (Debian) |
New
|
Undecided
|
Unassigned | ||
mysql-5.7 (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Eoan |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hello,
I figure out an issue and it took time to understand what happened:
* hardware clock is 2 hours in future
* during system boot: mysql start at the same time than ntp
* ntp fix clock which does a drift of 2 hours in past
Now, stopping mysql with “service mysql stop”:
* take 10 minutes
* provides no no information of what's happening to the user
* process is killed by the way (no clean stop)
To solve this issue, mysql should be started after ntp.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
Here are the logs:
root@xenial:~# LANG=C journalctl -u mysql.service
-- Logs begin at Fri 2016-07-08 14:33:07 CEST, end at Fri 2016-07-08 11:46:00 CEST. --
Jul 08 14:34:11 xenial systemd[1]: Starting MySQL Community Server...
Jul 08 14:34:12 xenial systemd[1]: Started MySQL Community Server.
Jul 08 11:36:00 xenial systemd[1]: Stopping MySQL Community Server...
Jul 08 11:46:00 xenial systemd[1]: mysql.service: State 'stop-sigterm' timed out. Killing.
Jul 08 11:46:00 xenial systemd[1]: mysql.service: Main process exited, code=killed, status=9/KILL
Jul 08 11:46:00 xenial systemd[1]: Stopped MySQL Community Server.
Jul 08 11:46:00 xenial systemd[1]: mysql.service: Unit entered failed state.
Jul 08 11:46:00 xenial systemd[1]: mysql.service: Failed with result 'signal'.
root@xenial:~# cat /var/log/
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
2016-07-
Changed in mysql-5.7 (Ubuntu): | |
assignee: | nobody → Norvald H. Ryeng (nryeng) |
I _think_ adding After=ntp.service would be safe (does not imply Requires), but need to learn more about the ordering and dependency system in systemd first.