After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 313329 - seahorse-agent crashes with gpg-1.4.2
seahorse-agent crashes with gpg-1.4.2
Status: RESOLVED FIXED
Product: seahorse
Classification: Applications
Component: general
unspecified
Other Linux
: Immediate blocker
: ---
Assigned To: Seahorse Maintainer
Seahorse Maintainer
Depends on:
Blocks:
 
 
Reported: 2005-08-12 14:01 UTC by Adam Schreiber
Modified: 2005-08-28 19:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Odd patch that makes it work. (20.55 KB, patch)
2005-08-14 06:56 UTC, Stef Walter
none Details | Review
Now with the right patch. (1.71 KB, patch)
2005-08-14 18:54 UTC, Stef Walter
none Details | Review
Patch against STABLE (seahorse-0-8) (1.87 KB, patch)
2005-08-28 19:12 UTC, Stef Walter
none Details | Review
Patch for seahorse 0.7.9 (3.41 KB, patch)
2005-08-28 19:37 UTC, Stef Walter
none Details | Review

Description Adam Schreiber 2005-08-12 14:01:41 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.
Comment 1 Adam Schreiber 2005-08-12 14:04:37 UTC
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.
Comment 2 Stef Walter 2005-08-14 06:56:58 UTC
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.
Comment 3 Stef Walter 2005-08-14 06:57:58 UTC
Oh, and what version of glib is everyone running?
Comment 4 Adam Schreiber 2005-08-14 12:50:36 UTC
Everyone that's reported the bug should be using glib2-2.6.6.
Comment 5 Stef Walter 2005-08-14 18:54:36 UTC
Created attachment 50697 [details] [review]
Now with the right patch.

Ack, that patch wasn't even for seahorse... :(
Comment 6 Stef Walter 2005-08-17 04:19:10 UTC
Any news? Is this working?
Comment 7 Adam Schreiber 2005-08-17 11:41:46 UTC
I haven't heard back from the Dropline folks yet.  I haven't tried it.
Comment 8 Adam Schreiber 2005-08-17 17:40:27 UTC
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.
Comment 10 Lars Strojny 2005-08-28 03:17:58 UTC
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?
Comment 11 Stef Walter 2005-08-28 19:12:26 UTC
Created attachment 51473 [details] [review]
Patch against STABLE (seahorse-0-8)

Found the bug. A classic, but confusing, double free. Sorry for the wait.
Comment 12 Stef Walter 2005-08-28 19:37:05 UTC
Created attachment 51474 [details] [review]
Patch for seahorse 0.7.9

A patch which fixes Seahorse version 0.7.9.
Comment 13 Adam Schreiber 2005-08-28 19:43:41 UTC
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.
Comment 14 Stef Walter 2005-08-28 19:53:17 UTC
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)