<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>codemonkey.org.uk &#187; leap second</title>
	<atom:link href="http://codemonkey.org.uk/tag/leap-second/feed/" rel="self" type="application/rss+xml" />
	<link>http://codemonkey.org.uk</link>
	<description>Dave Jones' Linux &#38; opensource stuff.</description>
	<lastBuildDate>Tue, 03 Jan 2012 14:52:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Last post on leap seconds.</title>
		<link>http://codemonkey.org.uk/2009/01/01/post-leap-seconds/</link>
		<comments>http://codemonkey.org.uk/2009/01/01/post-leap-seconds/#comments</comments>
		<pubDate>Thu, 01 Jan 2009 23:03:03 +0000</pubDate>
		<dc:creator>davej</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[leap second]]></category>

		<guid isPermaLink="false">http://www.codemonkey.org.uk/?p=50</guid>
		<description><![CDATA[I thought I was done with this. Then, today I saw this. To the best of my knowledge, Fedora 8 didn&#8217;t suffer from the bug I originally described several posts ago. I think this one happening at nearly midnight UTC is coincidence. There&#8217;s a &#8220;me too&#8221; in the comments, but it seems odd that two [...]<p><a href="http://codemonkey.org.uk/2009/01/01/post-leap-seconds/">Last post on leap seconds.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>I thought I was done with this.  Then, today I saw <a href="http://ask.slashdot.org/askslashdot/09/01/01/1930202.shtml">this</a>.  To the best of my knowledge, Fedora 8 didn&#8217;t suffer from the bug I originally described several posts ago.  I think this one happening at nearly midnight UTC is coincidence.</p>
<p>There&#8217;s a &#8220;me too&#8221; in the comments, but it seems odd that two people on slashdot saw it, but we never heard a peep on the Fedora mailing lists, or in bugzilla. Or even in upstream kernel.org.   It could just be coincidence, the story is unsurprisingly short on details. I guess slashdot stories are easier to write than bug reports. But without additional debugging info we won&#8217;t ever know. Bear in mind that last time we saw a crash of this nature it didn&#8217;t affect everyone then either.</p>
<p>It was only by chance I managed to catch the backtrace in the `06 crash. I actually had two locked up machines, but one had its screen blanked, and wouldn&#8217;t unblank. The other machine had blanking disabled (setterm -blank 0) and thankfully, had also been set up to use a VGA screen resolution so had plenty of lines to display the whole backtrace.</p>
<p><b>Update:</b> <a href="http://lkml.org/lkml/2009/1/2/389">a problem has been found, and fixed.</a></p>
<p><a href="http://codemonkey.org.uk/2009/01/01/post-leap-seconds/">Last post on leap seconds.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://codemonkey.org.uk/2009/01/01/post-leap-seconds/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>More on leap seconds.</title>
		<link>http://codemonkey.org.uk/2008/12/31/leap-seconds-2/</link>
		<comments>http://codemonkey.org.uk/2008/12/31/leap-seconds-2/#comments</comments>
		<pubDate>Thu, 01 Jan 2009 03:09:59 +0000</pubDate>
		<dc:creator>davej</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[leap second]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[qa]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[zune]]></category>

		<guid isPermaLink="false">http://www.codemonkey.org.uk/?p=43</guid>
		<description><![CDATA[Jesse Keating made a comment in my previous post on leap seconds, which I thought was worth highlighting in another post, for the benefit of those who don&#8217;t read the comments. This is why rarely executed codepaths suck. Whilst it is tempting to gloat over another Microsoft failure, this could easily have been any other [...]<p><a href="http://codemonkey.org.uk/2008/12/31/leap-seconds-2/">More on leap seconds.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>Jesse Keating made a comment in <a href="http://www.codemonkey.org.uk/2008/12/31/leap-seconds/">my previous post on leap seconds</a>, which I thought was worth highlighting in another post, for the benefit of those who don&#8217;t read the comments.</p>
<p><a href="http://zuneinsider.com/archive/2008/12/31/30gb-zune-issues-official-update.aspx">This is why rarely executed codepaths suck</a>.   Whilst it is tempting to gloat over another Microsoft failure, this could easily have been any other OS.  I already mentioned that Linux had suffered something similar once.  A bug like this in consumer devices is a nightmarish, but imagine if such a bug ended up in something more critical ?  &#8220;Sorry, your life support system went offline because there was a leap second&#8221;.  In safety critical systems, rare codepaths are kind of terrifying.</p>
<p>Writing test cases for bugs like this is also not particularly fun.  You&#8217;d have to have a fake ntp server for testing the rare case.<br />
Now think about all the other potential &#8216;only runs once every blue moon&#8217; codepaths in your apps, and imagine the effort required to write test plans for all of them. Not impossible, but certainly a lot of potential job security there for QA folks.  Just like fuzz-testing, traditional coverage-testing by just running common workloads aren&#8217;t the panacea of testing when there are variables outside your control.</p>
<p>What&#8217;s still puzzling to me though.. The Zunes died several hours before 00:00:00 UTC.<br />
Quirk of MSFT&#8217;s ntp implementation I guess. *shrug*</p>
<p><a href="http://codemonkey.org.uk/2008/12/31/leap-seconds-2/">More on leap seconds.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://codemonkey.org.uk/2008/12/31/leap-seconds-2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Leap seconds.</title>
		<link>http://codemonkey.org.uk/2008/12/31/leap-seconds/</link>
		<comments>http://codemonkey.org.uk/2008/12/31/leap-seconds/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 19:27:52 +0000</pubDate>
		<dc:creator>davej</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[leap second]]></category>

		<guid isPermaLink="false">http://www.codemonkey.org.uk/?p=37</guid>
		<description><![CDATA[Tonight, a leap second will occur. After 23:59.59, we have 23:59:60 before rolling over to 00:00:00. Most people won&#8217;t even notice. Most electronic devices won&#8217;t notice. Those unaware of the event (like the clock on my microwave oven), will end up a second slower. (not that it really matters, it doesn&#8217;t display seconds in its [...]<p><a href="http://codemonkey.org.uk/2008/12/31/leap-seconds/">Leap seconds.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>Tonight, a <a href="http://en.wikipedia.org/wiki/Leap_second">leap second</a> will occur. After 23:59.59, we have 23:59:60 before rolling over to 00:00:00.  Most people won&#8217;t even notice.  Most electronic devices won&#8217;t notice.  Those unaware of the event (like the clock on my microwave oven), will end up a second slower. (not that it really matters, it doesn&#8217;t display seconds in its clock, and I surely wasn&#8217;t second-accurate when I set it).</p>
<p>Of slightly more concern, are the more clever devices.  The devices that are aware of leap seconds know when to insert one. On these internet connected devices, ntpd tells the kernel &#8220;insert or deduct a second&#8221; as necessary.<br />
This all sounds fairly benign, but it has been known to be problematic.  For reasons I&#8217;m not entirely sure of, ntp still calls into the kernel twice a year, regardless of whether a leap second is inserted or not. So, twice a year, we end up in different code paths that we don&#8217;t execute the rest of the year.</p>
<p>Whilst I was travelling in June 2006, I noticed I couldn&#8217;t get at my email.  A week passed before I found out on returning home that the kernel had oopsed in that code path.  There was no leap second in June that year. Nor has there been in any year this decade.   Thankfully, that particular oops was only fatal if you were running a build with certain debugging CONFIG options turned on (I was), so that vast majority of users never saw a problem. <a href="http://www.mail-archive.com/git-commits-head@vger.kernel.org/msg15039.html">Here&#8217;s the fix that went into 2.6.22 for this bug</a>.</p>
<p>The very few that did see the problem (I don&#8217;t recall anyone else mentioning it when I posted to lkml) likely just rebooted, with the &#8220;if it happens again, I&#8217;ll report it&#8221; mindset, which of course, it didn&#8217;t..</p>
<p>Hopefully at midnight, all will be well and that code will just do it&#8217;s thing with no dire consequences <img src='http://codemonkey.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><B>update:</b> anti-climax, just as we like it <img src='http://codemonkey.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<blockquote><p>
Dec 31 18:59:59 localhost kernel: Clock: inserting leap second 23:59:60 UTC
</p></blockquote>
<p><a href="http://codemonkey.org.uk/2008/12/31/leap-seconds/">Leap seconds.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://codemonkey.org.uk/2008/12/31/leap-seconds/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

