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

Herton R. Krzesinski 1020285 at bugs.launchpad.net
Wed Aug 29 20:29:59 UTC 2012


By the way, I confirmed through leapseconds test that they are ok on
Oneiric/Precise (using leapseconds test integrated on our autotest).

-- 
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:
  In Progress
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:
  In Progress

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