Watch out for an upcoming leap second

One day this year we’ll have 86,401 seconds, not the usual 86,400. When that’s happened before it’s caused some software to get way out of wack.

man looking at a wall clocks waitiing time zones
Getty Images

At midnight on 30th June, 2015 official clocks will pause by one second to let the earth’s rotation catch up with atomic time.

Shouldn’t be a problem, right? Only tell that to LinkedIn, Reddit, and Qantas. All three were running systems that crashed in 2012, when the last leap second was added. The prior leap second in 2005 also caused problems with some computers, including Google’s.

Well, it’s time again for another one. So brace yourself for potential trouble. Indeed, it may well be time to ask server system vendors about their mitigation plans.

Why a leap second?

The vagaries of the earth’s rotation means that some years the earth rotates slower than other years. That’s not a problem in itself, however, atomic time is used for time keeping, and atomic time doesn’t vary. Thus the mismatch.

Scientists in Europe at the International Earth Rotation Service keep an eye on the planet’s rotation and call for a leap second periodically. The last one was in 2012, but they've been happening since 1972. This year's will the 26th leap second, one of four since 1999.

What happened in 2012?

Issues arose at Foursquare, LinkedIn, Mozilla, Qantas, Reddit, StumbleUpon and Yelp, who all reported crashes, according to media reports.

Joab Jackson of IDG News Service wrote at the time that unpatched Linux kernels, Hadoop instances, Cassandra databases and Java-based programs were affected. Some servers running Debian Linux went offline.

What caused it?

Computing systems and their Network Time Protocol, or NTP, client software need to be programmed to handle unforeseen extra seconds.

If the software isn’t programmed correctly, unexpected seconds can cause problems. NTP is used to sync with the atomic clock.

In some cases in the 2012 leap second implementation, NTP had to be disabled in order to restore servers.

Linux patches were available before that leap year adjustment because the NTP high-resolution timer used was known to potentially cause a livelock. Livelocks are a way that a process doesn't progress. The patches presumably weren’t applied in some cases.

The future

Unfortunately, time stamps of the kind provided by NTP are important, so you can’t just ignore them.

In a commercial environment, accurate time stamps are important in maintaining and troubleshooting equipment and forensic “analysis of distributed attacks,” to resolving disputes among parties contesting a “commercially valuable time-sensitive transaction,” according to pro time-stamp content on NTP's website.

It gets even more important in programming, too, because time stamps are used as part of the dependency checking process where multiple chunks of code all are time-stamped. Plus, banking and law enforcement all use time synchronization. Hippies are about the only people who don’t. So it's probably here to stay.

Leap smear

One alternative to leap seconds is to gradually add milliseconds to servers over time, rather than an entire second all at once. This is the method that Google is now using on its servers. It’s called leap smear.

Another solution would be to abolish leap seconds altogether. The only problem with that idea is that eventually you’d sever the link between time and the rising and setting of the sun. That 26 seconds added since 1972 has maintained the sun’s relationship with the clock.

My advice: Ensure any outstanding patches are applied; talk to your vendors.

Copyright © 2015 IDG Communications, Inc.

The 10 most powerful companies in enterprise networking 2022