Disable lock-elision in glibc pending upstream changes

Bug #1642390 reported by Adam Conrad
40
This bug affects 5 people
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
Fix Released
Undecided
Adam Conrad
Xenial
Fix Released
Undecided
Adam Conrad
Yakkety
Fix Released
Undecided
Adam Conrad

Bug Description

[ SRU Justification ]
A long thread on debian-devel[1] has pointed out that hardware lock elision behaves differently (arguably, more correctly) in the face of incorrect pthread usage, especially where double-unlocks are concerned. While this isn't itself a bug, it's quite true that we have no way of knowing right now just how many third party sources are buggy, and as people are upgrading to hardware that supports this feature, more software may crash in the future.

The long-term goal should be to try to ferret out all the bad actors here, fix them, and re-enable hardware lock elision as the default, but the sane conservative choice seems to be to just disable the feature entirely for now, while we (the glibc upstream community) work on making lock elision a per-process opt-in.

[1] https://lists.debian.org/debian-devel/2016/11/msg00210.html

[ Proposed Fix ]
This SRU will disable lock elision entirely, thus avoiding the problematic codepaths. A future SRU will re-enable building those codepaths, but in such a way that they're disabled by default with a per-process environment twiddle to enable it on demand.

[ Regression Potential ]
There's a potential for performance regressions, however given that most x86 users are only just now upgrading to hardware that supports this feature, the status quo is that this codepath is dead to most users. As for s390x and PPC, we've had requests to disable lock elision by default on both arches (entirely on s390x, conditionally on PPC), and those requests will be somewhat satisfied by this SRU, and cleaned up in the future SRU where we integrate the upstream-concensus patch to allow it to be conditionally re-enabled.

[ Testing ]
autopkgtest regressions will be our guide here on if this SRU is causing any issues.

Adam Conrad (adconrad)
Changed in glibc (Ubuntu):
assignee: nobody → Adam Conrad (adconrad)
Changed in glibc (Ubuntu Xenial):
assignee: nobody → Adam Conrad (adconrad)
Changed in glibc (Ubuntu Yakkety):
assignee: nobody → Adam Conrad (adconrad)
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Adam, or anyone else affected,

Accepted glibc into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/glibc/2.23-0ubuntu5 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 on 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 add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and 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 glibc (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed
Changed in glibc (Ubuntu Yakkety):
status: New → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello Adam, or anyone else affected,

Accepted glibc into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/glibc/2.24-3ubuntu2 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 on 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 add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and 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!

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in glibc (Ubuntu):
status: New → Confirmed
Revision history for this message
Brian W Hart (hartb) wrote :

Howdy, I'm the originator of:

https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1641241

(which points to this bug via https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1640518)

I tested the new ("ubuntu5") libc6 packages from xenial-proposed. They prevent the crash we were seeing with TensorFlow, and I have not noticed any other problems.

Revision history for this message
Jacob Pedersen (jtp1974) wrote :

Thanks for this update to glibc. It resolved segmentation fault problems when running Oracle on a T460p Thinkpad. Even loading the newest microcode could not resolve the segmentation faults but this version of glibc makes everything run smoothly. No sideeffects detected.

Thanks!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Alvaro Prieto (alvaroprieto) wrote :

I want to add a +1 problem solved. No more segfault for me either on an intel NUC6i7KYK with a Core i7-6770.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glibc - 2.23-0ubuntu5

---------------
glibc (2.23-0ubuntu5) xenial; urgency=medium

  * Disable lock-elision on all targets to avoid regressions (LP: #1642390)

 -- Adam Conrad <email address hidden> Wed, 16 Nov 2016 13:53:50 -0700

Changed in glibc (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of the Stable Release Update for glibc has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glibc - 2.24-3ubuntu2

---------------
glibc (2.24-3ubuntu2) yakkety; urgency=medium

  * Disable lock-elision on all targets to avoid regressions (LP: #1642390)

 -- Adam Conrad <email address hidden> Wed, 16 Nov 2016 13:53:50 -0700

Changed in glibc (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote :

autopkgtest results looked good, released to xenial and yakkety

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (6.5 KiB)

This bug was fixed in the package glibc - 2.24-7ubuntu2

---------------
glibc (2.24-7ubuntu2) zesty; urgency=medium

  * Disable lock-elision on all targets to avoid regressions (LP: #1642390)

glibc (2.24-7ubuntu1) zesty; urgency=medium

  * Merge with 2.24 from Debian sid, with upstream and packaging updates.

glibc (2.24-7) unstable; urgency=medium

  [ Samuel Thibault ]
  * hurd-i386/tg-hurdsig-SA_SIGINFO.diff: Fix passing address to legacy SIGBUS
    handlers.
  * hurd-i386/tg-libpthread-gsync-mutex.diff: New patch to make mutexes use
    gsync too.
  * hurd-i386/tg-NOFOLLOW.diff: New patch to fix O_NOFOLLOW errors.
  * hurd-i386/tg-NOFOLLOW-DIRECTORY.diff: New patch to fix O_NOFOLLOW |
    O_DIRECTORY errors.

  [ Aurelien Jarno ]
  * debian/patches/git-updates.diff: update from upstream stable branch.
  * debian/rules: build with -no-pie -fno-PIE. Closes: #845512, #845521.

  [ Matthias Klose ]
  * Allow to inject the libc-dev dependency on linux-libc-dev by the build
    environment.

glibc (2.24-6) unstable; urgency=medium

  [ Samuel Thibault ]
  * libc0.3.symbols.hurd-i386: Drop removed RPCs.
  * hurd-i386/cvs-libpthread.diff: Update to latest upstream version.
    - hurd-i386/cvs-libpthread-static-weak.diff: Drop, merged upstream.
    - hurd-i386/cvs-pthread-atfork.diff: Drop, merged upstream.
    - hurd-i386/cvs-setcancelstate.diff: Drop, merged upstream.
  * hurd-i386/tg-libpthread-gsync-spin.diff: New patch to make spinlocks use
    gsync too. Thanks Svante Signell for investigating issues with the first
    version.
  * hurd-i386/tg-ONSTACK.diff: New patch to fix SS_ONSTACK support.
    Closes: #551470.
  * hurd-i386/tg-extern_inline.diff: Update to upstream.
    - hurd-i386/tg-sigstate_thread_reference.diff: Refresh.
    - hurd-i386/tg-gsync-libc.diff: Refresh.
  * hurd-i386/tg-hurdsig-SA_SIGINFO.diff: Update to upstream.
  * hurd-i386/tg-EGREGIOUS-fr.diff: New patch to fix grammar in french
    translation.

  [ Aurelien Jarno ]
  * debian/patches/git-updates.diff: update from upstream stable branch:
    - Fix pread/pwrite syscalls on SH4.
    - Fix build on powerpc/ppc64el with binutils from trunk. Closes: #843691.
    - Fix flexible array usage in gconv.h. Closes: #841304.
    - Fix linknamespace parallel test failures. Closes: #844132.
  * debian/patches/any/submitted-unicode-9.0.0.diff: proposed patch to update
    Unicode support to version 9.0.0. Closes: #842466.
  * debian/patches/localedata/locale-C.diff: update to Unicode 9.0.0.
  * debian/patches/localedata/submitted-en_AU-date_fmt.diff: improve date_fmt
    for en_AU locale. Closes: #841916.

glibc (2.24-5) unstable; urgency=medium

  [ Aurelien Jarno ]
  * debian/sysdeps/linux.mk: fix cross-compilation by also looking at headers
    in $(LINUX_HEADERS).
  * debian/testsuite-xfail-debian.mk: allow nptl/tst-stack4 to fail on HPPA.

  [ Samuel Thibault ]
  * hurd-i386/cvs-libpthread-static-weak.diff: New patch to fix weak
    references when linking in libpthread statically.
  * hurd-i386/cvs-pthread-atfork.diff: New patch to fix unregistering atfork
    handlers at library unload. Closes: #841068.
  * debhelper.in/libc-dev.install.hurd-i386: Install libpthre...

Read more...

Changed in glibc (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.