[Bug 1020285] Re: Addition of leap second causes spuriously high CPU usage and futex lockups

Paul Collins paul.collins at canonical.com
Tue Nov 6 02:03:16 UTC 2012


Leap seconds are inserted at the end of a given six-month period.  You
can see that the leap second that was inserted at the end of 30 June
2012 (IERS bulletin C43) results in an update for "1 Jul 2012" in your
file.  You can then see that the line for "1 Jan 2013", which is not yet
enabled (note the "#" at the beginning of the line) would correspond to
a leap second inserted at the end of 31 December 2012, which, as IERS
bulletin C44 states, will not occur.

You can obtain bulletin C44 at my link above, and more of them are
available at http://hpiers.obspm.fr/iers/bul/bulc/?C=M;O=D

Also, Ubuntu 11.04 (Natty) has reached end of life, so I would imagine
it's unlikely that this issue will be addressed for that release.
https://lists.ubuntu.com/archives/ubuntu-security-
announce/2012-October/001882.html

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to base-files in Ubuntu.
https://bugs.launchpad.net/bugs/1020285

Title:
  Addition of leap second causes spuriously high CPU usage and futex
  lockups

Status in “base-files” package in Ubuntu:
  Fix Released
Status in “linux” package in Ubuntu:
  Fix Released
Status in “base-files” source package in Lucid:
  Won't Fix
Status in “linux” source package in Lucid:
  Fix Released
Status in “base-files” source package in Natty:
  Won't Fix
Status in “linux” source package in Natty:
  Triaged
Status in “base-files” source package in Oneiric:
  Won't Fix
Status in “linux” source package in Oneiric:
  Fix Released
Status in “base-files” source package in Precise:
  Won't Fix
Status in “linux” source package in Precise:
  Fix Released
Status in “base-files” source package in Quantal:
  Won't Fix
Status in “linux” source package in Quantal:
  Fix Released

Bug description:
  [Impact]
  Software that relies on fine-grained pthread timeouts will spin indefinitely and drive up system load following a leap second, when the kernel's idea of time has become desynced and sub-1s timeouts are all hit immediately.  Mysql and Java are in particular reported to be affected by this.  This is a transient issue, in that it will go away the first time the system is rebooted after the leap second and is expected to be fixed before the next leap second occurs; nevertheless admins have been caught off-guard by this misbehavior and in some cases may not have noticed the problem or know what to do about it, so we should help them along by resetting the kernel clock with a minimal-risk base-files update.

  [Test Case]
  1. Find a system that has been online, with mysqld or a java-based process running since before 2012-06-30.
  2. Verify that one or more processes on the system are spinning in futex and driving up the system load.
  3. Upgrade to the base-files package from -proposed.
  4. Verify that the system load comes back down immediately.
  5. A stress-test for leap-second handling has been provided at https://lkml.org/lkml/2012/7/3/37

  [Regression potential]
  No analysis has been done on the effect of resetting the date on applications that require a high-accuracy clock.  While this fixes the problem with the pthreads interfaces, it may cause other problems for other software.  Since the proposed fix is to reset the kernel's date to the current date, which is not atomic, there will be a slight skew of the clock backwards in time.  ntp *should* fix this shortly thereafter for machines that have it enabled.
  Also, because there's a single version check for each copy of the SRU, users whose applications are negatively affected by the running of this date command will also be negatively affected on each subsequent upgrade of the system, up to and including the quantal devel release.

  As widely reported, the addition of the leap second on 2012-06-30 has
  caused high CPU usage and futex lockups in a lot of applications
  including JVMs, Mysql as well as desktop apps like Firefox and
  Thunderbird.

  https://lkml.org/lkml/2012/6/30/122
  http://serverfault.com/questions/403732/anyone-else-experiencing-high-rates-of-linux-server-crashes-during-a-leap-second
  https://blog.mozilla.org/it/2012/06/30/mysql-and-the-leap-second-high-cpu-and-the-fix/

  We've seen this ourselves on the Canonical infrastructure on both
  current Lucid and Precise kernels, i.e.

  ii  linux-image-2.6.32-41-server         2.6.32-41.90                         Linux kernel image for version 2.6.32 on x86_64
  ii  linux-image-3.2.0-24-generic         3.2.0-24.39                          Linux kernel image for version 3.2.0 on 64 bit x86 SMP

  We can also confirm the 'date -s $(date)' workaround fixes the problem
  without requiring a reboot.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/1020285/+subscriptions




More information about the foundations-bugs mailing list