On Mon, Jul 2, 2012 at 1:32 PM, Gordon Messmer <yinyang at eburg.com> wrote: > On 07/02/2012 09:24 AM, Peter Eckel wrote: >> On the other hand I'm a bit surprised that the problems were >> comparably few - actually there is a time '01:59:60' for one second, >> and any plausibility check I've ever seen assumes that minutes and >> seconds are in the range from 0..59. Wrongly, it seems. > > As far as I've been able to understand it, the problem had nothing to do > with validity checks or other date handling code. The problem was > simply a bug in the API provided by the Linux kernel for notification of > leap seconds. The kernel messed up some internal data that led to > futexes going nuts. The affected programs weren't handling dates > poorly, they were just threaded applications. > >> Apparently Google uses an approach that looks much less risky to me - >> they use a time window over which they 'smear' the leap second by >> making their time servers lie about the time for a while, making it >> pass a little bit slower. That way they avoid the unlucky 61st second >> and still advance the clocks within a reasonable time. > > Google's approach was reliable by chance. They used a different kernel > API to adjust the clock, and that one didn't break futexes. So it wasn't anything special about java? I did find one one not-very-busy instance of a Centos 6.x with a java application still running that did not appear to have a problem. -- Les Mikesell lesmikesell at gmail.com