[gpgme] fork() problem

Stephan Menzel smenzel at gmx-gmbh.de
Wed Feb 14 16:32:03 CET 2007


Am Dienstag, 13. Februar 2007 15:43:56 schrieb Stephan Menzel:
> What I'm afraid of now is, that gpgme might fork() in order to do it's
> magic and mess up it's own mutexes (or mine) doing so.
> Does all that say anything to you guys or am I completely mistaken here?

I have some additional info here.
I played around a bit and I tried to wrap my own mutex around the whole thing 
and disable it's internal locking by linking against libgpgme.so.11 instead 
of libgpgme-pthread.so.11 even though it's a multithreaded app.

And indeed, I couldn't see anymore of those problems. Instead I got several 
crashes apparently due to failed assertions in the lib. The stacktraces look 
like this:

#0  0xffffe410 in __kernel_vsyscall ()
(gdb) backtrace
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb711d885 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb711f002 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7117318 in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
#4  0xb6731e03 in _gpgme_ath_mutex_lock (lock=0x0) at ath.c:71
#5  0xb6741e2f in _gpgme_sema_cs_enter (s=0xb674db40) at posix-sema.c:48
#6  0xb673bd3b in _gpgme_engine_info_copy (r_info=0x0) at engine.c:225
#7  0xb6743070 in gpgme_new (r_ctx=0x0) at gpgme.c:58
#8  0xb732e9f3 in MyWrapperClass (this=0xb1782768) at MyWrapperClass.cc:187

It still doesn't crash all the time though. It mostly works so I think it's 
some strange race condition.
Maybe this helps.

Thanks and greetings...

Stephan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /pipermail/attachments/20070214/b3052a11/attachment.pgp 


More information about the Gnupg-devel mailing list