This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: dead-lock in glibc
- From: Joël Krähemann <jkraehemann at gmail dot com>
- To: Torvald Riegel <triegel at redhat dot com>
- Cc: "Carlos O'Donell" <carlos at systemhalted dot org>, "libc-help at sourceware dot org" <libc-help at sourceware dot org>
- Date: Mon, 3 Apr 2017 20:03:23 +0200
- Subject: Re: dead-lock in glibc
- Authentication-results: sourceware.org; auth=none
- References: <CA+Owze40Onq_uZs2wOjY=O5Xv3D75Ce_b7Sf5qEjMZ-bAnW_wA@mail.gmail.com> <CAE2sS1gXkrLAZf2o54QSkE_fqFMrSd987nP=QYRe=GQEdq26_w@mail.gmail.com> <CA+Owze6vtqJ4jURD2H4fouw5izePVaQ9iun2LCLQ+HqwVvkvWw@mail.gmail.com> <CAE2sS1iF1ua0w9379zm-nMToTxQfVJfTxa78uMgs6z=LEqy5GA@mail.gmail.com> <CA+Owze6nxNpB+FWAQfu_6duy0wEA1n+K5mY1C6KAZEO1-dn4eQ@mail.gmail.com> <CA+Owze6h=O+dw9eCE7LauRozK6upbYLQsY=6_whrAGmh_-BDnw@mail.gmail.com> <CA+Owze79b4_1bRRsYkCOm7oD18h4V3s81-1699+36U9JYEffew@mail.gmail.com> <1491211453.5374.16.camel@redhat.com>
- Reply-to: jkraehemann-guest at users dot alioth dot debian dot org
Hi
Yes, it was. Instead of calling pthread_mutex_lock() I was doing
pthread_mutex_unlock().
Without having any lock on the mutex.
What I think about the dead-lock in glibc is it was caused by a memory
corruption.
Since it was on a working copy we won't be able to reproduce.
I just wonder how it is possible that one application can render
WindowMaker useless.
You might want to try it yourself:
http://git.savannah.nongnu.org/cgit/gsequencer.git/commit/?h=0.7.122.x&id=1637db4c2e8e69946fbae91c53c21caff22746f8
Bests,
Joël
On Mon, Apr 3, 2017 at 11:24 AM, Torvald Riegel <triegel@redhat.com> wrote:
> On Fri, 2017-03-31 at 23:07 +0200, Joël Krähemann wrote:
>> Hi
>>
>> Here was the mutex locked wrong. First unlock() and then unlock(), again.
>
> IOW, was this a bug in the application?
>