This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/5240] Pthread hang where there are still waiters when mutex is in "unlocked" state.
- From: "rsa at us dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 1 Nov 2007 17:55:32 -0000
- Subject: [Bug libc/5240] Pthread hang where there are still waiters when mutex is in "unlocked" state.
- References: <20071101170311.5240.rsa@us.ibm.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From rsa at us dot ibm dot com 2007-11-01 17:55 -------
Created an attachment (id=2071)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=2071&action=view)
patch to avoid the hang by awakening waiters before returning TIMEOUT.
The following patch ensures that waiters will be awoken before returning the
timeout. This patch avoids an unnecessary system call in the usual timeout
case.
A simpler solution if we don't care about the system call cost would be to
unconditionally invoke lll_futex_wake before returning.
I've verified that this patch does indeed prevent the hang scenario described.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=5240
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.