ntpdate can cause mysqld to shut down
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-dfsg-5.0 (Ubuntu) |
Invalid
|
Low
|
Unassigned |
Bug Description
This is documented at http://
If ntpdate causes a substantial time step (in my case approximately -8.8 seconds) during a transaction, this can cause an I/O error which causes mysqld to shut down. It shuts down cleanly, but it just shuts down. This server has been up and running these services for more than a year, and this is the first time that a MySQL transaction of sufficient complexity happened to coincide with an ntpdate update of sufficient size, but it could potentially happen again and again with no warning.
I have worked around this by modifying my ntpdate cron job to look like
#!/bin/sh
service mysql stop
ntpdate time.ucsb.edu
service mysql start
Relevant logs:
Email from cron:
/etc/cron.
/var/log/
Feb 11 06:34:19 fez mysqld[2399]: 100211 6:34:19 [Note] /usr/sbin/mysqld: Normal shutdown
Feb 11 06:34:19 fez mysqld[2399]:
Feb 11 06:34:21 fez mysqld[2399]: 100211 6:34:21 InnoDB: Starting shutdown...
Feb 11 06:34:23 fez mysqld[2399]: 100211 6:34:23 InnoDB: Shutdown completed; log sequence number 0 603514990
Feb 11 06:34:23 fez mysqld[2399]: 100211 6:34:23 [Note] /usr/sbin/mysqld: Shutdown complete
Feb 11 06:34:23 fez mysqld[2399]:
Feb 11 06:34:23 fez mysqld_safe[32034]: ended
description: | updated |
Is there a reason you're using ntpdate instead of ntpd ? In general ntpdate should only be run on boot as many applications can be confused by large or negative changes in time.