Live data from Hacker News

Leap second causing Linux server crashes?

serverfault.com

11–20 of 122 posts

Re: Leap second causing Linux server crashes?

#12
post #5

No burps from my BSD boxes either, although they're all in UTC so the leap second hasn't happened for them yet.

The leap second is added at the same point in time regardless the timezone your server is configured to use. So if you're GMT+3, the leap second will be inserted at 03:00 local time.

From the answer: "The reason this is occurring before the leap second is actually scheduled to occur is that ntpd lets the kernel handle the leap second at midnight, but needs to alert the kernel to insert the leap second before midnight. ntpd therefore calls adjtimex sometime during the day of the leap second, at which point this bug is triggered."

Re: Leap second causing Linux server crashes?

#16

2012. and we still have problems keeping track of time. This is both fascinating and scary. P.S. for people wanting to know more this video is simple to understand but really amazing http://www.youtube.com/watch?v=xX96xng7sAE

Its... worse. We can track time so easily and so well that we decided to screw it up.

Re: Leap second causing Linux server crashes?

#17
post #13

Is this implementation-specific, or could the Windows equivalent to ntp cause the same problem?

Implementation specific. It looks like it is a bug in the Linux kernel with how it adjusts the time. It is possible that Windows, OS X, and other BSDs will be affected by a similar bug, but that would be coincidental as the bug is not due to ntpd but rather how the kernel handles a request that ntpd generates.

More specifically, there is a condition in which the kernel tries to insert a leap second and, in doing so, attempts to acquire the same lock twice causing the spinlock lockup and (effectively) halting the kernel.

Re: Leap second causing Linux server crashes?

#18
Novell kb: http://www.novell.com/support/kb/doc.php?id=7001865

  SLE9 (kernel 2.6.5-7.325): NOT AFFECTED
  SLE10-SP1 (kernel 2.6.16.54-0.2.12): NOT AFFECTED
  SLE10-SP2 (kernel 2.6.16.60-0.42.54.1): NOT AFFECTED
  SLE10-SP3 (kernel 2.6.16.60-0.83.2): NOT AFFECTED
  SLE10-SP4 (kernel 2.6.16.60-0.97.1): NOT AFFECTED
  SLE11-GA (kernel 2.6.27.54-0.2.1): VERY UNLIKELY
  SLE11-SP1 (kernel 2.6.32.59-0.3.1): VERY UNLIKELY
  SLE11-SP2 (kernel 3.0.31-0.9.1): VERY UNLIKELY

  Update (06/26/2012): after thorough code review -> SLE9 and SLE10 not affected at all.

Re: Leap second causing Linux server crashes?

#19
post #6

That wouldn't happen if servers were Macs

Mac OS X is a BSD variant, so there's every chance.

How does that follow? OS X runs an odd hybrid kernel (XNU) which is Mach and parts of BSD, but... this is a Linux kernel bug. There's an effectively zero chance of this impacting anything but Linux.
Post reply on HN