pthread_mutex_destroy returns EBUSY, but the mutex isn't locked

Carlos O'Donell carlos@systemhalted.org
Wed Jun 4 14:11:00 GMT 2008


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.



More information about the Libc-help mailing list