Subject: Re: Error detected by libpthread: Invalid mutex
To: Brian Stark <bpstark@pacbell.net>
From: Christian Limpach <chris@pin.lu>
List: current-users
Date: 01/26/2004 01:31:37
> I will see what I can do to enable the core dumps using
> PTHREAD_DIAGASSERT (as Christian
> suggested).

libpthread uses:
    (void)kill(getpid(), SIGABRT);
to abort and dump core.  Mozilla catches SIGABRT and thus you won't get a
coredump no matter what flags you set.  You can change the SIGABRT to SIGBUS
at the end of lib/libpthread/pthread.c and then you'll get a coredump.

> As for the undefined behavior that Klaus described, I would much rather
> see an error message
> and the program continue rather than an error message and the program
> going away. Having said
> that, I'll admit that there may be a good reason why the program goes
> away (I'm just not too familar
> with the libpthread internals to understand what is going on there).

You can run with PTHREAD_DIAGASSERT=A and libpthread will ignore the errors.
See pthread(3) for additional flags.

    christian