gpgme hangs in a multithreaded app

albrecht.dress at arcor.de albrecht.dress at arcor.de
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 http://home.arcor.de/dralbrecht.dress/balsa/balsa2-gpg.html). 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/libc.so.6
#1  0x40d28310 in __DTOR_END__ () from /usr/local/lib/libgpgme.so.6
#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
        libgnomeui-2.so.0 => /opt/gnome2/lib/libgnomeui-2.so.0 (0x40017000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x400a5000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x400b0000)
        libbonoboui-2.so.0 => /opt/gnome2/lib/libbonoboui-2.so.0 (0x400c8000)
        libgnome-2.so.0 => /opt/gnome2/lib/libgnome-2.so.0 (0x40124000)
        libesd.so.0 => /usr/lib/libesd.so.0 (0x40138000)
        libaudiofile.so.0 => /usr/lib/libaudiofile.so.0 (0x40140000)
        libgnomevfs-2.so.0 => /opt/gnome2/lib/libgnomevfs-2.so.0 (0x4015e000)
        libgconf-2.so.4 => /opt/gnome2/lib/libgconf-2.so.4 (0x40192000)
        librt.so.1 => /lib/librt.so.1 (0x401c6000)
        libgtkhtml-2.so.0 => /opt/gnome2/lib/libgtkhtml-2.so.0 (0x401d9000)
        libgailutil.so.16 => /usr/lib/libgailutil.so.16 (0x4022f000)
        libgnomeprintui-2.so.0 => /opt/gnome2/lib/libgnomeprintui-2.so.0 (0x40236000)
        libgnomeprint-2.so.0 => /opt/gnome2/lib/libgnomeprint-2.so.0 (0x40256000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x40696000)
        libgnomecanvas-2.so.0 => /opt/gnome2/lib/libgnomecanvas-2.so.0 (0x406cc000)
        libbonobo-2.so.0 => /opt/gnome2/lib/libbonobo-2.so.0 (0x406f6000)
        libORBitCosNaming-2.so.0 => /usr/lib/libORBitCosNaming-2.so.0 (0x4074f000)
        libbonobo-activation.so.4 => /opt/gnome2/lib/libbonobo-activation.so.4 (0x40754000)
        libORBit-2.so.0 => /usr/lib/libORBit-2.so.0 (0x40768000)
        libpopt.so.0 => /usr/lib/libpopt.so.0 (0x407a6000)
        liblinc.so.1 => /usr/lib/liblinc.so.1 (0x407ad000)
        libgthread-2.0.so.0 => /opt/gnome2/lib/libgthread-2.0.so.0 (0x407b6000)
        libart_lgpl_2.so.2 => /usr/lib/libart_lgpl_2.so.2 (0x407bb000)
        libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x407d1000)
        libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x40801000)
        libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x40a11000)
        libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x40a6c000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x40a82000)
        libpangoxft-1.0.so.0 => /usr/lib/libpangoxft-1.0.so.0 (0x40a95000)
        libpangox-1.0.so.0 => /usr/lib/libpangox-1.0.so.0 (0x40ab6000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x40ac3000)
        libgobject-2.0.so.0 => /opt/gnome2/lib/libgobject-2.0.so.0 (0x40af5000)
        libgmodule-2.0.so.0 => /opt/gnome2/lib/libgmodule-2.0.so.0 (0x40b20000)
        libglib-2.0.so.0 => /opt/gnome2/lib/libglib-2.0.so.0 (0x40b24000)
        libpcreposix.so.0 => /usr/lib/libpcreposix.so.0 (0x40b7a000)
        libpcre.so.0 => /usr/lib/libpcre.so.0 (0x40b7d000)
        libpspell.so.4 => /usr/lib/libpspell.so.4 (0x40b86000)
        libltdl.so.0 => /usr/lib/libltdl.so.0 (0x40ba3000)
        libpspell-modules.so.1 => /usr/lib/libpspell-modules.so.1 (0x40ba8000)
        libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3 (0x40bab000)
        libc.so.6 => /lib/libc.so.6 (0x40bf4000)
        libgpgme.so.6 => /usr/local/lib/libgpgme.so.6 (0x40d10000)
        libxml2.so.2 => /usr/lib/libxml2.so.2 (0x40d2a000)
        libz.so.1 => /lib/libz.so.1 (0x40dcf000)
        libm.so.6 => /lib/libm.so.6 (0x40dde000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40dfd000)
        libesmtp.so.5 => /usr/local/lib/libesmtp.so.5 (0x40e13000)
        libssl.so.0.9.6 => /usr/lib/libssl.so.0.9.6 (0x40e22000)
        libcrypto.so.0.9.6 => /usr/lib/libcrypto.so.0.9.6 (0x40e50000)
        libdl.so.2 => /lib/libdl.so.2 (0x40f11000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40f15000)
        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x40ff8000)
        libXft.so.1 => /usr/X11R6/lib/libXft.so.1 (0x41001000)
        libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x41056000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x4105b000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)









More information about the Gnupg-devel mailing list