GNOME Bugzilla – Bug 313329
seahorse-agent crashes with gpg-1.4.2
Last modified: 2005-08-28 19:53:17 UTC
Upgrade to gpg-1.4.2. Signing a first email works correctly. Decrypting an email or signing another email causes seahorse-agent/daemon to crash. This bug exists in both STABLE and HEAD.
This bug was first discovered by Dropline Gnome developers here: http://sourceforge.net/mailarchive/forum.php?thread_id=7906746&forum_id=43152 They are using STABLE, and found the bug in 0.78 and 0.79. I'm using HEAD.
Created attachment 50676 [details] [review] Odd patch that makes it work. Very strange problem. g_mem_chunk_alloc hangs in a loop (and then crashes a few minutes later) the second time a client tries to connect. Switching away from GMemChunk alloctions to normal heap allocations makes the problem go away. Attached is a patch (to the stable branch) which demonstrates this. But this is not conclusive. I ran seahorse-agent under valgrind. There was one (mostly harmless) uninitialized memory access, which I fixed. But that didn't affect the issue. Only when I used the heap instead of mem chunks everything started working again. And the real clincher is, we've been using GMemChunk for allocating that per connection memory ever since seahorse-agent existed. Nasty. I'm not sure if I should commit this patch or keep looking further for the problem.
Oh, and what version of glib is everyone running?
Everyone that's reported the bug should be using glib2-2.6.6.
Created attachment 50697 [details] [review] Now with the right patch. Ack, that patch wasn't even for seahorse... :(
Any news? Is this working?
I haven't heard back from the Dropline folks yet. I haven't tried it.
This patch does not fix the problem for me. I was able to sign three messages to myself in sucession, but trying to decrypt the first one locked up Thunderbird. After closing and restarting seahorse-daemon and Thunderbird, I was able to decrypt the first email, and the second, but attempting to decrypt the third caused the same lock up as before.
This doesn't appear to be working for those using stable either. http://sourceforge.net/mailarchive/forum.php?thread_id=8001320&forum_id=43152 http://sourceforge.net/mailarchive/forum.php?thread_id=8001322&forum_id=43152
Using 0.7.9 I have the same problem but the patch will not apply and I have no time to recreate one. Is there/will there be a patch for 0.7.9?
Created attachment 51473 [details] [review] Patch against STABLE (seahorse-0-8) Found the bug. A classic, but confusing, double free. Sorry for the wait.
Created attachment 51474 [details] [review] Patch for seahorse 0.7.9 A patch which fixes Seahorse version 0.7.9.
I can confirm this fixes the bug on the stable branch. I also applied the patch against HEAD and it was fixed there as well.
Applied a fix similar to the 0.7.9 one on the stable branch. I'll merge stable changes to HEAD shortly. 2005-08-26 Nate Nielsen <nielsen@memberwebs.com> * agent/seahorse-agent-io.c: Fixed crasher when used with GPG 1.4.2 (bug# 313329)