pthread_mutex_timedlock segfault on multi-proc x86_64

Bug #284672 reported by Gavin Scott on 2008-10-16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)

Bug Description

There is a race condition in __lll_mutex_timedlock_wait (called by pthread_mutex_timedlock) on x86_64 that can cause segfaults on multi-processor x86_64 machines. Full details can be found in this glibc bug:

This bug affects Ubuntu 8.04's libc6 package, which is based on glibc 2.7 (which Ulrich Drepper describes as "outdated code" above), and is easily reproducible using the program in the above bug (on multi-processor or multi-core x86_64 machines).

I've tested Dennis Lubert's proposed fix (in the bugzilla link above), and it fixes the crash for me. I frankly don't understand the workings of the assembly function enough to comment on whether the fix is "correct", but his reasoning in the bug report make sense to me. Sample patch is attached.

Brian Murray (brian-murray) wrote :

Looking at the attachments in this bug report, I noticed that "lowlevellock-x86_64.diff" was not flagged as a patch. A patch contains changes to an Ubuntu package that will resolve a bug and this attachment is one! Subsequently, I've checked the patch flag for it. In the future when submitting patches please use the patch checkbox as there are some Launchpad searches that use this feature. Thanks for your contribution Gavin Scott!

Changed in glibc:
importance: Undecided → Medium
status: New → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers