[Bug 520615] [NEW] ntpdate can cause mysqld to shut down

Justin Force justin.force at gmail.com
Thu Feb 11 18:54:34 GMT 2010


Public bug reported:

This is documented at http://bugs.mysql.com/bug.php?id=6263 as MySQL bug
#6263, but a developer, Heikki Tuuri, says that this is a Linux bug and
should be reported to the distribution maintainers. It doesn't look like
it's specifically an ntpdate bug, or a Linux kernel bug, so I'm
reporting it as a mysql-server bug.

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.daily/ntpdate: 11 Feb 06:34:19 ntpdate[32101]: step time server 10.0.0.1 offset -8.389688 sec

/var/log/daemon.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

** Affects: mysql-dfsg-5.0 (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  This is documented at http://bugs.mysql.com/bug.php?id=6263 as MySQL bug
  #6263, but a developer, Heikki Tuuri, says that this is a Linux bug and
  should be reported to the distribution maintainers. It doesn't look like
  it's specifically an ntpdate bug, or a Linux kernel bug, so I'm
  reporting it as a mysql-server bug.
  
  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.daily/ntpdate: 11 Feb 06:34:19 ntpdate[32101]: step time server 128.111.1.5 offset -8.389688 sec
+ /etc/cron.daily/ntpdate: 11 Feb 06:34:19 ntpdate[32101]: step time server 10.0.0.1 offset -8.389688 sec
  
  /var/log/daemon.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: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[2399]:
  Feb 11 06:34:23 fez mysqld_safe[32034]: ended

-- 
ntpdate can cause mysqld to shut down
https://bugs.launchpad.net/bugs/520615
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to mysql-dfsg-5.0 in ubuntu.



More information about the Ubuntu-server-bugs mailing list