GNOME Bugzilla – Bug 375062
Crash when using gpg2
Last modified: 2007-03-15 14:42:58 UTC
Distribution: Debian 4.0 Package: seahorse Severity: Normal Version: GNOME2.15.91 unspecified Gnome-Distributor: Debian Synopsis: Crash when using gpg2 Bugzilla-Product: seahorse Bugzilla-Component: Daemon Bugzilla-Version: unspecified BugBuddy-GnomeVersion: 2.0 (2.16.1) Description: Description of the crash: The deamon crashed when I ran 'gpg2 --clearsign' and entered my passphrase. Debugging Information: Backtrace was generated from '/usr/bin/seahorse-daemon' (no debugging symbols found) Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". ------- Bug created by bug-buddy at 2006-11-14 11:11 -------
Thanks for taking the time to report this bug. Unfortunately, that stack trace is missing some elements that will help a lot to solve the problem, so it will be hard for the developers to fix that crash. Can you get us a stack trace with debugging symbols? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
That's all the info I can coax from gdb, unfortunately. Sometimes it just doesn't want to generate a back trace, and I can't find any information about what to do in such a case. :(
hmm... is this reproducible, at least? :-)
Yes. Also I think I know why there is no back trace. My user doesn't have permission to ptrace the seahorse-daemon process because the executable is owned by root and is has the setuid bit set. I'll try to get a proper backtrace and post it here.
** ERROR **: file seahorse-agent-prompt.c: line 125 (prompt_done_dialog): assertion failed: (pass) aborting... Program received signal SIGABRT, Aborted.
+ Trace 94074
Thread 16384 (LWP 8027)
Created attachment 78347 [details] Screenshot of the passphrase entry window The passphrase entry window is also screwed up... here's what it looks like.
great, thanks a lot for your further investigating! stacktrace looks good, confirming.
Bug buddy's failure to handle errors from GDB is something to bear in mind for future bug submissions I think. At least, bug-buddy should display errors from gdb... I filed this as bug #385798.
I am also seeing this issue when trying to use gpg2 to sign my email in evolution. I am starting seahorse-agent as described on live.gnome.org by adding it to an xinitrc.d file and chaining the startup commands. This is on gentoo. ssh-agent functionality is working great. gpg-agent functionality however is not working and I have to kill seahorse-agent to be able to sign and send my email. seahorse version is 0.9.10 gnupg version is 2.0.1 gpgme version is 1.1.2 Is there any information needed to get this fixed ? Thank you.
Hello, Can you please try the patch attached to: http://bugs.gentoo.org/show_bug.cgi?id=164523 It should solves the issue using gnupg-2, the protocol was changed a little, but since I don't use seahorse, I could not confirm it. Thanks!
At face value your patch looks reasonable, but if you have the time could you update it to apply against SVN HEAD? If not, let me know and I'll attempt to update it.
Created attachment 81796 [details] [review] seahorse-head-gpg2.patch Against head. Please also add a notice that gpg2 cannot be used without the --variables option, since gpg2 does not support gpg-agent-options anymore.
*** Bug 404081 has been marked as a duplicate of this bug. ***
Sorry for the duplicate, I tend to skip bugs beginning with "crash" since bugbuddy is so easy to use to report bugs :) At first sight, this patch is a bit more complete than the one I had, and the patches I provided where written by Alon IIRC :) I'll try to apply them to my overlay and see what happens.
I tried the patch against seahorse-0.9.10 and the problem is fixed. Now when I send a signed email in evolution, it pops up the passphrase dialog, with the correct information. I type the passphrase, and it sends the email. I will now upgrade to gpg-2.0.2 ( gentoo ) and see if things are still fixed.
I've tried out the patch with still using gpg-1.4.6 and everything seems to work properly. Islam, if you find everything working with gpg-2.0.2 I'll commit the patch.
Do you mind if I take a look before it goes in? Specifically, I'm wondering if in the long term it would be more beneficial to make decisions on 1.x vs. 2.x behavior at compile time rather than at run time. The compile time option has the benefit of producing simpler code. Although I guess that claim would depend on how many differences there is between GPG 1.x and 2.x ... It would allow us to account for things like Alon Bar-Lev points out in comment #12
Go right ahead. I'm still not experiencing any problems with gpg 1.4.6.
(In reply to comment #17) > The compile time option has the benefit of producing simpler code. Although I > guess that claim would depend on how many differences there is between GPG 1.x > and 2.x ... But what happens when user upgrades gpg? Almost sure he open a bug first before he realize he need to recompile your product. Runtime detection for none cupled components are the best way to go. And if you like compile time options, you should also verify that you work with correct component at runtime anyway.
Yes. I agree. After looking into the issue further, the GnuPG guys seem to make efforts (if not guarantees) that the GPG 1.x and GPG 2.x are compatible in most ways. I think that most incompatibilities will have been due to us not handling things exactly in the same way as GPG (any version) expects them. Alon, as far as your patch I just have one change to you ask after which I'll include it in seahorse: This code assumes a fixed order of options and arguments: split_arguments (args, &tmp, &tmp, &id, &errmsg, &prompt, &description, NULL); That order won't always be the case as both the '--data' and '--check' options may or may not be present according to the protocol. A better way would be to have split_arguments accept a flag which when set would skip any options beginning in '--'.
Yes. I thought I will bring it up after someone say it works... Since you manipulate the input string, I implemented this hack. I thought maybe I should pass strstr (args, "--") instead of args, and have only one tmp. The problem is that the agent as-is will not work with gpgsm... So you should review gpg2 anyway, and probably change the behavior. I am not using your product... But reviewing what users said... They like your GUI... So I am thinking of an implementation of a bridge between gpg and gpg-agent "listening" important events and update the GUI, without actually implementing any agent functionality.
Certainly. The idea is to use gpg-agent to do the actual work eventually.
Committed a modified version of the patch, which is more resilient when it comes to flags passed from GPG2. 2007-02-08 Nate Nielsen <nielsen@memberwebs.com> * configure.in * agent/seahorse-agent-actions.c: * agent/seahorse-agent-io.c: * agent/seahorse-agent.h: * libseahorse/seahorse-gpg-options.c: Fixes for agent interoperability with GPG2. Patch from Alon Bar-Lev. Fixes bug #375062 I don't have GPG2 installed (due to library conflicts with version 1.4). Could you verify that this still fixes the bug? Thanks.
(In reply to comment #23) > I don't have GPG2 installed (due to library conflicts with version 1.4). Could > you verify that this still fixes the bug? Thanks. Hello, Just reviewed version 1.0. Any reason why the configure.in accepted_versions="1.2 1.4" And not: accepted_versions="1.2 1.4 2.0" As it is working now with 2.0. Thanks!
Because it wasn't working for everyone(bug #410324). To try and end this confusion, I built gpg-2.0.3 and removed my install of gpg-1.4.6. So far everything appears to be working correctly. Note: I'm using seahorse-agent properly chained into my session startup.
Thanks! It is working correctly as far as I can see. The only issue is to check for gpg2 if gpg cannot be found. Or best add --with-gpg= or something. Can you please explain "session startup" as I am not gnome user and we have some issue with people don't know where to setup the environment at: http://bugs.gentoo.org/show_bug.cgi?id=164523 There must be a way in gnome to enable them to set session wide environment variable.
The correct way to integrate with the session is documented at: http://live.gnome.org/Seahorse/SessionIntegration
Thanks! Which method are you using? It seems this one is the simplest. .gnomerc::eval `seahorse-agent --variables`
I'm using the version shown for Slackware.