v1.1.42 hangs with GLib/GDK threads

lowhalo@hush.com lowhalo@hush.com
Sat, 16 Aug 2003 21:21:09 -0700


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Greetings!

    I'm the main developer for Ultramagnetic, a new secure instant
messenger based on Gaim and libgcrypt
(see http://ultramagnetic.sourceforge.net/).

    I ran into some trouble upgrading my code to use the new v1.1.42.
Even though I'm initializing the library properly before doing anything
else, I'm experiencing random hangs while calling libgcrypt's public
key functions.  Ultramagnetic initializes GLib's and GDK's thread
support with the following:  "g_thread_init(NULL); gdk_threads_init();"
I compile UM with the following libraries:  "-pthread -lgthread-2.0"

    I suspect that this problem is caused by a bug in libgcrypt's
'automagic' detection of the thread library since I do not have this
problem when I comment out the thread support in UM.

    Here's a gdb backtrace of one of these hangs:


#0  0x40654a35 in __pthread_sigsuspend () from /lib/i686/libpthread.so.0
#1  0x40653db8 in __pthread_wait_for_restart_signal ()
   from /lib/i686/libpthread.so.0
#2  0x40656190 in __pthread_alt_lock () from /lib/i686/libpthread.so.0
#3  0x40652d77 in pthread_mutex_lock () from /lib/i686/libpthread.so.0
#4  0x404aeec9 in _gcry_ath_mutex_lock (lock=0x404e59ec) at ath.c:102
#5  0x404aea3f in _gcry_private_is_secure (p=0x829a998) at secmem.c:564
#6  0x404ae1cf in _gcry_private_free (a=0x829a998) at stdmem.c:189
#7  0x404abb29 in gcry_free (p=0x0) at global.c:444
#8  0x404d5669 in _gcry_mpi_free_limb_space (a=0x829a998) at mpiutil.c:92
#9  0x404d577b in _gcry_mpi_free (a=0x829a980) at mpiutil.c:146
#10 0x404d0e19 in gcry_mpi_sub (w=0x829a930, u=0x82781a0, v=0x82781e8)
    at mpi-add.c:219
#11 0x404d1f25 in _gcry_mpi_invm (x=0x829a788, a=0x829a770, n=0x8269e98)
    at mpi-inv.c:242
#12 0x404c6c70 in sign (r=0x8273090, s=0x829a6d0, hash=0x8269e70,
    skey=0xbfff85d0) at dsa.c:293
#13 0x404c6f99 in _gcry_dsa_sign (algo=17, resarr=0x8250ad0, data=0x8269e70,

    skey=0x5) at dsa.c:418
#14 0x404b1a74 in pubkey_sign (algorithm=17, resarr=0x8250ad0,
    data=0x8269e70, skey=0x82741d0) at pubkey.c:596
#15 0x404b35f3 in gcry_pk_sign (r_sig=0xbfff86b8, s_hash=0x829a108,
    s_skey=0x404d70e0) at pubkey.c:1553
#16 0x080c1450 in send_public_keys (gc=0x8194e38, who=0x82625e8 "xdude")
    at um_encryption.c:768


    Let me know if there's anything you need me to do to help fix this.

    Thanks!
    - low halo

- --
low halo <lowhalo at-s1gn hush d0t c0m>
Defender of Truth and Liberty
http://ultramagnetic.sourceforge.net/

http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9BFD99BF
58CE 3215 226A 69ED 4D20 4044 C925 54F9 9BFD 99BF

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/PwJBySVU+Zv9mb8RAiNDAKCHjAJKBBMik0VTpk1oRgpqYM6fyACgteYi
BoYNNoNvzbzG0EYUesbfjrc=
=bfpj
-----END PGP SIGNATURE-----




Concerned about your privacy? Follow this link to get
FREE encrypted email: https://www.hushmail.com/?l=2

Free, ultra-private instant messaging with Hush Messenger
https://www.hushmail.com/services.php?subloc=messenger&l=434

Promote security and make money with the Hushmail Affiliate Program: 
https://www.hushmail.com/about.php?subloc=affiliate&l=427