Sig-I/O (Posts about leap-second)https://sig-io.nl/categories/leap-second.atom2023-05-25T20:58:04ZMark JanssenNikolaLinux Leap-Second problemhttps://sig-io.nl/posts/linux-leap-second-problem/2012-07-03T23:03:16+02:002012-07-03T23:03:16+02:00Mark Janssen<p>So, this weekend was quite an interesting one, as on July 1st 02:00 local time (00:00 UTC) a leap-second was added via NTP. This caused serious problems for all my Java Virtual Machines and mysql databases.</p>
<p>If your system has printed the following line (in dmesg), a leap-second has been added recently:</p>
<blockquote>
<p>Clock: inserting leap second 23:59:60 UTC</p>
</blockquote>
<p>On most of my systems, the JVM’s would spike to 100% cpu load over all cores, mysql seems to also do this.</p>
<p>The work-around/fix at this time is to run:</p>
<blockquote>
<p>date <cite>date +"%m%d%H%M%C%y.%S"</cite></p>
</blockquote>
<p>Hopefully this will be fixed in the kernel before the next leap-second is added. Which could be as soon as 2013/01/01, though probably later.</p>
<section id="update-2018">
<h2>Update 2018:</h2>
<p>It was indeed fixed before the next leap-second, which occurred somewhere not too long after. I haven't encountered this problem since.</p>
</section>