RedHat gives a warning on its homepage:
A leap second event will occur on 2016 December 31, 23h 59m 60s UTC.
It's prefixed by an exclamation mark which seems to read important. What harm does a leap second cause on a system? How do we deal with it?
RedHat gives a warning on its homepage:
A leap second event will occur on 2016 December 31, 23h 59m 60s UTC.
It's prefixed by an exclamation mark which seems to read important. What harm does a leap second cause on a system? How do we deal with it?
Leap seconds have been occurring since 1972, and Unix systems have been living through them quite unharmed for all of that time.
RedHat choosing, this time around, to splash an amber alert message across the top of its customer support WWW site is giving people quite the wrong impression, and causing people to think that it's something like a zero-day virus alert, and reacting in ways such as can be seen at Leap second Bug 31st Dec 2016 talking of a "leap second bug".
A leap second is not a bug, and Unix systems cope with them perfectly fine. The C library has for decades promoted the idea that the tm_sec field of a tm structure can sometimes have the value 60.
In fact, the only real problem is that Unix and Linux systems have a wide range of different ways of coping with them, according to taste. So one has to know what setup one has chosen, in order to know what actions, if any at all, one needs to take.
The RedHat page rather buries this under an extensive backgrounder, makes a bogus assumption about TAI-10 systems, and isn't the answer for a question that asks about Unices and Linux operating systems in general (albeit that it is a good answer for a worldview that is confined to RedHat Linux).
Fundamentally, you need the answer to three questions to know what you need to do:
The synchronization tool will be something like Daniel J. Bernstein's taiclock, Laurent Bercot's s6-taiclock, or OpenBSD's rdate in its default TAI-10 mode.
You pretty much do not have to do anything in this scenario except ensure that your leap second tables are up to date. The kernel clock keeps on ticking at one SI second per second (corrections for oscillator drift and suchlike permitting), and the leap seconds tables handle the adjustments from TAI-10 to UTC.
There are two sets of tables to keep up to date:
right/ timezone files, which you keep up to date by ensuring that you have an up-to-date version of your timezone file package (whatever that is) on your system/etc/leapsecs.datM. Bernstein hasn't updated the leapsecs.dat at cr.yp.to, but I have published an updated leapsecs.dat that includes the 2016-12-31 23:59:60 UTC leap second, packaged in a leapsecs package.
Since the servers that you are synchronizing to speak TAI-10 as well, the seconds that they publish are aimed to be always one SI second long, too. There will be no stepping, slewing, or smearing by the servers speaking TAI-10. Everyone ticks constant-length SI seconds, and the leap second is only visible as an artifact of your C library.
The synchronization tool will be something OpenBSD's rdate in its UTC mode.
Again you pretty much do not have to do anything in this scenario except ensure that your leap second tables are up to date, as in the previous scenario. Again the kernel clock keeps on ticking at one SI second per second.
The problem is that the servers do not.
So if you run with TAI-10, you tend to like UTC time servers that step leap seconds, because the other options actually cause your TAI-10 time to be synchronized to sped-up or slowed-down UTC unnecessarily, and lose its one SI second per second nature.
This case subdivides according to what the time servers, that you are synchronizing to, do.
In only one of the UTC-servers+UTC-machine cases will your machine's time be correct, the case where applications see the time go backwards, something that Unix applications do not like to see. In all of the other UTC-servers+UTC-machine cases your machine's time will be incorrect for up to a day.
In the TAI-10-servers+TAI-10-machine case, your machine's time will be correct throughout. And in one of the UTC-server+TAI-10-machine cases, the one where the server steps the time, your machine's time will also be correct throughout, unless it happens to do a poll right on the ambiguous UTC time.
The consequences of your machine's time being incorrect are at the application level. The operating system is fine with this. (Contrary to popular belief, POSIX actually allows for the system clock to be, possibly deliberately, wrong.) If you do things like bill people by the second, for example, your idea of how long a second is and of when each second occurs, is different from your customers' idea, for possibly two days. Your customers and you may not have chosen the same setup.
Then there's the possible problem of your choosing to synchronize with a mixed set of time servers, some of which slew UTC, some of which step UTC, and some of which smear UTC. Much hilarity ensues in this case, as you confuse the Hell out of your synchronization tools. There's much irony, too. The "dumb" synchronization tools cope with desynchronized time sources better than the "smart" ones that try to work out which time source is telling the right time. In this particular situation only the steppers are even telling the right time. Whereas the slewers and the smearers have contradictory ideas of what the wrong UTC time is.
A final dishonourable mention goes out to the Linux kernel, discussed on the RedHat page. Synchronization tools can choose to step the time themselves, or they can instruct the kernel to do it. As RedHat reports, there's a history of problems with this, from internal timing mechanisms in the kernel not working right to the machine freezing up.