_gcry_ath_mutex_lock: Assertion

David Goulet dgoulet at ev0ke.net
Wed Jul 30 18:01:15 CEST 2014


Hello!

We are currently working on a test suite for libotr[1] which heavily
uses libgcrypt (version 1.5.3 in Debian). We use a small client that
exchanges OTR messages between two threads using libotr for stress,
regression and fuzzing tests.

While receiving messages at the same time, we can end up with this from
the gcry_md_read() call.

	lt-client: ath.c:193: _gcry_ath_mutex_lock: Assertion `*lock ==
	((ath_mutex_t) 0)' failed.

You can find a full gdb backtrace here --> http://pastebin.com/cqJDe7dR
Part are optimized out but let me know, I can provide you a -O0 version.

I did a small investiguation and it seems that there is contention on
this lock which for some reasons assert() when it's locked.

	ath_mutex_lock (&digests_registered_lock);

I see that in libgcrypt 1.6, it has been removed so is there a way to
avoid the issue for < 1.6 without defining NDEBUG?

Thanks!
David

[1] https://bugs.otr.im/projects/libotr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: Digital signature
URL: </pipermail/attachments/20140730/ffca0a63/attachment.sig>


More information about the Gcrypt-devel mailing list