From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27252 invoked by alias); 1 Nov 2007 17:55:47 -0000 Received: (qmail 27168 invoked by uid 48); 1 Nov 2007 17:55:32 -0000 Date: Thu, 01 Nov 2007 17:55:00 -0000 Message-ID: <20071101175532.27167.qmail@sourceware.org> From: "rsa at us dot ibm dot com" To: glibc-bugs@sources.redhat.com In-Reply-To: <20071101170311.5240.rsa@us.ibm.com> References: <20071101170311.5240.rsa@us.ibm.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/5240] Pthread hang where there are still waiters when mutex is in "unlocked" state. X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00004.txt.bz2 ------- 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.