From owner-freebsd-threads@FreeBSD.ORG Tue Jul 23 16:18:20 2013 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 646B1785 for ; Tue, 23 Jul 2013 16:18:20 +0000 (UTC) (envelope-from marcus@marcuscom.com) Received: from av-tac-rtp.cisco.com (av-tac-rtp.cisco.com [64.102.19.209]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0AA3927FA for ; Tue, 23 Jul 2013 16:18:19 +0000 (UTC) X-TACSUNS: Virus Scanned Received: from chook.cisco.com (localhost.cisco.com [127.0.0.1]) by av-tac-rtp.cisco.com (8.13.8+Sun/8.13.8) with ESMTP id r6NGIIav024176 for ; Tue, 23 Jul 2013 12:18:18 -0400 (EDT) Received: from dhcp-10-150-54-149.cisco.com (dhcp-10-150-54-149.cisco.com [10.150.54.149]) by chook.cisco.com (8.13.8+Sun/8.13.8) with ESMTP id r6NGIHqs008445; Tue, 23 Jul 2013 12:18:17 -0400 (EDT) Message-ID: <51EEACC9.8000406@marcuscom.com> Date: Tue, 23 Jul 2013 12:18:17 -0400 From: Joe Marcus Clarke User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Martin Simmons Subject: Re: Mutexes and error checking References: <51E71D4F.5030502@marcuscom.com> <51E8061B.60906@marcuscom.com> <51EB5EC4.6050802@marcuscom.com> <20130721160220.GA38417@stack.nl> <51EC0BCF.6080501@FreeBSD.org> <51EC49F8.6070207@marcuscom.com> <201307231543.r6NFhS7n007384@higson.cam.lispworks.com> In-Reply-To: <201307231543.r6NFhS7n007384@higson.cam.lispworks.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: deischen@freebsd.org, kwm@rainbow-runner.nl, avg@freebsd.org, freebsd-threads@freebsd.org X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jul 2013 16:18:20 -0000 On 7/23/13 11:43 AM, Martin Simmons wrote: >>>>>> On Sun, 21 Jul 2013 16:52:08 -0400, Joe Marcus Clarke said: >> >> The specifics are this. There are some GNOME/GTK+/GLib apps that are >> crashing now that GLib checks the return of pthread_mutex_unlock() in >> g_mutex_unlock(). While we can workaround this in GLib by simply >> nop'ing the EPERM return, we'd like to pursue something that may be a >> bit more manageable for those apps written for Linux that do not use GLib. > > Which apps are broken and why can't they be fixed? Koop, do you have a complete list? The one that was reported to me was sonata (a Python app). I have not yet traced down the offending code as I was curious why Linux was not failing, and this appears to be why. Joe > > >> Again, I'm not arguing the voracity of the 3rd party app code, just the >> discrepancy between Linux and Solaris compared to FreeBSD. > > Note that unlocking an unlocked normal mutex on Linux (glibc) does *not* work, > but leaves it in a subtly inconsistent state. Therefore bugs like the one you > reported to the GNOME Bugzilla > (https://bugzilla.gnome.org/show_bug.cgi?id=678758) should be fixed, not > ignored by hiding the error status. > > __Martin > -- PGP Key : http://www.marcuscom.com/pgp.asc