gpgme hangs in a multithreaded app

albrecht.dress at albrecht.dress at
Thu Mar 27 11:15:02 CET 2003

Hi all!

I hacked RFC3156 support for the GNOME mail client balsa a few days ago, of course using gpgme (see Balsa is a multithreaded app, and it works perfectly with Linux on a PowerMac. However, when running on an upgraded SuSE 7.2/ix86, balsa hangs in gpgme.

After interrupting the program, here's the bt in gdb:

(gdb) bt
#0  0x40cba9c4 in read () from /lib/
#1  0x40d28310 in __DTOR_END__ () from /usr/local/lib/
#2  0x40d22c85 in _gpgme_io_read (fd=30, buffer=0xbffff17c, count=79) at posix-io.c:56
#3  0x40d24a24 in _gpgme_get_program_version (path=0x40d26720 "/usr/bin/gpg") at version.c:248
#4  0x40d1f81d in _gpgme_gpg_get_version () at rungpg.c:229
#5  0x40d1eaa6 in _gpgme_engine_get_version (proto=GPGME_PROTOCOL_OpenPGP) at engine.c:78
#6  0x40d1eda4 in _gpgme_engine_new (proto=GPGME_PROTOCOL_OpenPGP, r_engine=0x82f1c3c) at engine.c:172
#7  0x40d17e43 in _gpgme_op_reset (ctx=0x82f1c28, type=1) at op-support.c:44
#8  0x40d194a5 in _gpgme_op_verify_start (ctx=0x82f1c28, synchronous=1, sig=0x82cb798, text=0x829e148) at verify.c:372
#9  0x40d19651 in gpgme_op_verify (ctx=0x82f1c28, sig=0x82cb798, text=0x829e148, r_stat=0x829ced0) at verify.c:485
#10 0x080c8165 in libbalsa_body_check_signature (body=<incomplete type>) at rfc3156.c:228
[more stuff from balsa...; the ldd output is below]

I followed the remarks in the docs (yes, there *is* the call to gpgme_check_version). The strange thing is that if I build balsa without threading support, it does NOT hang.

Do you have any idea about the reason of the hang? How could I track it down or resolve the problem? Sorry if this is a dumb question, I'm new to the list...

Thanks in advance, Albrecht.

+++ldd output+++
albrecht at linux:~/Work-local/balsa-2.0.10 > ldd src/balsa => /opt/gnome2/lib/ (0x40017000) => /usr/X11R6/lib/ (0x400a5000) => /usr/X11R6/lib/ (0x400b0000) => /opt/gnome2/lib/ (0x400c8000) => /opt/gnome2/lib/ (0x40124000) => /usr/lib/ (0x40138000) => /usr/lib/ (0x40140000) => /opt/gnome2/lib/ (0x4015e000) => /opt/gnome2/lib/ (0x40192000) => /lib/ (0x401c6000) => /opt/gnome2/lib/ (0x401d9000) => /usr/lib/ (0x4022f000) => /opt/gnome2/lib/ (0x40236000) => /opt/gnome2/lib/ (0x40256000) => /usr/lib/ (0x40696000) => /opt/gnome2/lib/ (0x406cc000) => /opt/gnome2/lib/ (0x406f6000) => /usr/lib/ (0x4074f000) => /opt/gnome2/lib/ (0x40754000) => /usr/lib/ (0x40768000) => /usr/lib/ (0x407a6000) => /usr/lib/ (0x407ad000) => /opt/gnome2/lib/ (0x407b6000) => /usr/lib/ (0x407bb000) => /usr/lib/ (0x407d1000) => /usr/lib/ (0x40801000) => /usr/lib/ (0x40a11000) => /usr/lib/ (0x40a6c000) => /usr/lib/ (0x40a82000) => /usr/lib/ (0x40a95000) => /usr/lib/ (0x40ab6000) => /usr/lib/ (0x40ac3000) => /opt/gnome2/lib/ (0x40af5000) => /opt/gnome2/lib/ (0x40b20000) => /opt/gnome2/lib/ (0x40b24000) => /usr/lib/ (0x40b7a000) => /usr/lib/ (0x40b7d000) => /usr/lib/ (0x40b86000) => /usr/lib/ (0x40ba3000) => /usr/lib/ (0x40ba8000) => /usr/lib/ (0x40bab000) => /lib/ (0x40bf4000) => /usr/local/lib/ (0x40d10000) => /usr/lib/ (0x40d2a000) => /lib/ (0x40dcf000) => /lib/ (0x40dde000) => /lib/ (0x40dfd000) => /usr/local/lib/ (0x40e13000) => /usr/lib/ (0x40e22000) => /usr/lib/ (0x40e50000) => /lib/ (0x40f11000) => /usr/X11R6/lib/ (0x40f15000) => /usr/X11R6/lib/ (0x40ff8000) => /usr/X11R6/lib/ (0x41001000) => /usr/X11R6/lib/ (0x41056000) => /usr/X11R6/lib/ (0x4105b000)
        /lib/ => /lib/ (0x40000000)

More information about the Gnupg-devel mailing list