This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: pthread_mutex_destroy returns EBUSY, but the mutex isn't locked
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: adrian dot ludwin at gmail dot com
- Cc: libc-help at sourceware dot org
- Date: Wed, 4 Jun 2008 10:11:30 -0400
- Subject: Re: pthread_mutex_destroy returns EBUSY, but the mutex isn't locked
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=NBPtKghlyc/LRElfW0SmWCvsPb0l2Rd2tN/sWJrAbvA=; b=t6VTV4Np+Clc4RhT3HXawTEVJJrF2LN6r1EDgIRCQRjyPl3W9dHv0Iq7mx0+wVrDEA pCs3ZVxEzzvVyFtVJSFEEoo27E1vMI0YBmZ3UIlRUlWk8hiR2IIhtTlLgWUuL6AFSM6S 5n0g0j4H0vOFivIksCQHgkqyTd5bFjBki2DhM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=T3eNnOz1KfkGpWNZx9afKccUc4Klw0UxRS+hw8wADYwHIxSjx99pqykdUwNojBtcZT ZhCUIlsCUTh+4Rv+2Xh5z0YA50MLuwgSgdnjGkOX8Ti6r2+aLUDil6ta0+QqWST/vR3P 9Kc4qaJ9qC1qX1/w5YAn6tLKYU/ISwezrSjXk=
- References: <58fe92790806040548r10e09333x971047764992ca4e@mail.gmail.com>
On Wed, Jun 4, 2008 at 8:48 AM, Adrian Ludwin <adrian.ludwin@gmail.com> wrote:
> Mutex 0x920df0: lock=0, count=0, owner=0, nusers=2, kind=2
The mutex is unlocked, there are 2 waiters on the futex, but they
haven't had time to be woken yet, therefore you can't destroy the
mutex, and calls to pthread_mutex_destroy() return EBUSY.
You shouldn't ignore the error. You should wait a while and try
destroying it again.
Cheers,
Carlos.