[BZ 5240][PATCH] Pthread hang where there are still waiters when mutex is in "unlocked" state.

Ryan S. Arnold rsa@us.ibm.com
Thu Nov 1 18:46:00 GMT 2007


Per the problem description in bugzilla 5240:

"A customer identified a potential race condition in
nptl/sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait)
which causes waiting threads not to be woken up under certain circumstances."

http://sources.redhat.com/bugzilla/show_bug.cgi?id=5240

We (IBM) have come up with a patch that solves the problem but I'm not
sure this is the proper solution.

I'd appreciate it if someone on an architecture other than PowerPC or
i386 would run the test case and report their results.

I looked at the x86 assembler version of lowlevellock.S and from what I
can see it doesn't do anything different than the default lowlevellock.c
code but the bug isn't manifest on i386 hardware per my tests.

If someone with proper i386 asm skills could verify I'd appreciate it.

Ryan S. Arnold
IBM Linux Technology Center
Linux Toolchain Development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lowlevellock.patch
Type: text/x-patch
Size: 800 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20071101/0a7667f7/attachment.bin>


More information about the Libc-alpha mailing list