From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23283 invoked by alias); 21 Nov 2011 22:23:58 -0000 Received: (qmail 23272 invoked by uid 22791); 21 Nov 2011 22:23:57 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Nov 2011 22:23:10 +0000 From: "amodra at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/51249] semaphore implemetation for linux leaves threads blocked Date: Mon, 21 Nov 2011 22:36:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgomp X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: amodra at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: amodra at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-11/txt/msg02157.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51249 --- Comment #3 from Alan Modra 2011-11-21 22:21:13 UTC --- Sorry, I misread the code. Indeed, the mutex will be left at 2. I'm chasing a frustratingly elusive locking bug. Symptoms are that one or two libgomp tests fail each gcc testsuite run, not always the same test. log shows a timeout, but I'm fairly certain it isn't a real timeout but one of the threads blocking. This used to happen before rth's recent locking changes. The difficulty is that I can't seem to reproduce the failure when running tests by hand. I have a rewrite of sem.c,h which adds a "wait" field to the struct and uses atomics, and have rewritten a number of other files to use atomics rather than the old __sync functions. I just haven't been game to post my changes until I track down the problem.