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

Adam Conrad adconrad at 0c3.net
Tue Jul 3 18:54:56 UTC 2012


Hello James, or anyone else affected,

Accepted base-files into lucid-proposed. The package will build now and
be available at http://launchpad.net/ubuntu/+source/base-
files/5.0.0ubuntu20.10.04.6 in a few hours, and then in the -proposed
repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
enable and use -proposed.  Your feedback will aid us getting this update
out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from
verification-needed to verification-done.  If it does not, change the
tag to verification-failed.  In either case, details of your testing
will help us make a better decision.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance!

** Changed in: base-files (Ubuntu Lucid)
       Status: New => Fix Committed

-- 
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:
  Fix Committed
Status in “linux” source package in Lucid:
  Triaged
Status in “base-files” source package in Natty:
  Fix Committed
Status in “linux” source package in Natty:
  Triaged
Status in “base-files” source package in Oneiric:
  Fix Committed
Status in “linux” source package in Oneiric:
  Triaged
Status in “base-files” source package in Precise:
  Fix Committed
Status in “linux” source package in Precise:
  Triaged
Status in “base-files” source package in Quantal:
  Fix Released
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