gpg-agent prompt slow to show up
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Fri Nov 27 17:27:56 CET 2015
On Fri 2015-11-27 03:43:09 -0500, Charlie Brown wrote:
> I'm new to gpg, and I'm trying the agent.
> I noticed that when gpg needs to prompt me for pass phrase, the prompt
> shows up about 15 seconds after I issue the command (e.g. gpg
> --decrypt or git commit -S). The problem exists with both gpg
> --use-agent and gpg2.
> I then tried the --no-use-agent flag of gpg, and the cli prompt showed
> up instantly, but sadly it doesn't not use the agent by its nature.
> My colleagues say that they do not have such problem. Any idea, or how
> can I look into this problem?
> This is the output from gpg-agent --daemon -vv:
> <-- Issue a command that will prompt for pass phrase -->
> gpg-agent: handler 0x7f42eb30c700 for fd 5 started
> gpg-agent: starting a new PIN Entry
> <-- Long annoying delay -->
> <-- Then the prompt show up -->
> gpg-agent: handler 0x7f42ebb0d700 for fd 8 started
> gpg-agent: socket is still served by this server
> gpg-agent: handler 0x7f42ebb0d700 for fd 8 terminated
I have yet to be able to replicate this myself, but i've seen other
people have this problem when they're using pinentry-gtk-2 or
pinentry-gnome3 and they have something wrong with their dbus setup
related to localization (l10n) or accessibility (a11y).
In particular, there appears to be a 25000 millisecond (25 second)
timeout in some gtk frameworks while trying to look for the dbus service
I think: in a proper installation, dbus would either provide a
connection to this service (if installed) or immediately reject the
request (if not installed) so the 25 second timeout should never take
effect. But i've never been able to replicate this problem myself.
On the (debian unstable) machine of my colleague where we tracked it
down this much, the problem was resolved after reinstalling
at-spi2-core, but it didn't return after we removed it again.
Sorry to not have a clearer diagnosis, but hopefully this will help
point you in the right direction.
If you figure out the problem and what it's related to, i'd love to hear
more details so we can avoid it happening to other people in the future.
More information about the Gnupg-users