assertion in _gcry_ath_mutex_lock

Marcus Brinkmann marcus.brinkmann at ruhr-uni-bochum.de
Tue Jul 20 22:05:04 CEST 2004


At Tue, 20 Jul 2004 00:22:17 -0500,
job at jobbogan.com wrote:
> 
> I'm getting assertions w/ openldap 2.1.20 compiled against
> gnutls-1.0.16 & libgcrypt-1.2.0.  
> 
> I've tried several versions of gnutls & libgcrypt but the failure mode
> is constant across all the versions I've tried.  I've attached a stack
> trace.  The other active threads differ from crash to crash, but the
> asserting thread is constant.

You are using pthread, but you have not initialized gcrypt to use the
pthread mutex stubs.  Please refer to the documentation on how to do that.

I am waging a guess that this is already your problem.  The stubs used
for the non-threaded case use the assertions to check for locking
issues, but they rely on the fact that there is never contention in a
single-threaded program (otherwise it would dead lock anyway :).

So, if there is contention, and you didn't initialize gcrypt properly,
you will trigger the assertion.

A programming error in gcrypt could also trigger this assertion, but
this would show as a dead lock in the threaded case (if properly
initialized).

Thanks,
Marcus




More information about the Gcrypt-devel mailing list