Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jul 2013 12:45:15 -0400 (EDT)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Joe Marcus Clarke <marcus@marcuscom.com>
Cc:        kwm@rainbow-runner.nl, avg@freebsd.org, freebsd-threads@freebsd.org
Subject:   Re: Mutexes and error checking
Message-ID:  <Pine.GSO.4.64.1307231236440.15999@sea.ntplx.net>
In-Reply-To: <51EEACC9.8000406@marcuscom.com>
References:  <51E71D4F.5030502@marcuscom.com> <Pine.GSO.4.64.1307181059460.22570@sea.ntplx.net> <51E8061B.60906@marcuscom.com> <Pine.GSO.4.64.1307181118100.22570@sea.ntplx.net> <Pine.GSO.4.64.1307182144030.23634@sea.ntplx.net> <Pine.GSO.4.64.1307190152440.25756@sea.ntplx.net> <51EB5EC4.6050802@marcuscom.com> <20130721160220.GA38417@stack.nl> <51EC0BCF.6080501@FreeBSD.org> <51EC49F8.6070207@marcuscom.com> <201307231543.r6NFhS7n007384@higson.cam.lispworks.com> <51EEACC9.8000406@marcuscom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 23 Jul 2013, Joe Marcus Clarke wrote:

> 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.

FYI, here is a very lighty tested patch that allows an unlock on
a PTHREAD_MUTEX_NORMAL mutex by a non-owning thread:

   http://people.freebsd.org/~deischen/libthr_mutex_normal.diffs

I do not argue for or against this behavior in making this patch,
as I can see both sides of the argument.

-- 
DE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.1307231236440.15999>