On Wed, Dec 06, 2006 at 12:09:43PM +0100, Pierre Habouzit wrote:
> Package: gnupg-agent
> Version: 2.0.0-5.1
> Severity: grave
> File: /usr/bin/gpg-agent
> Justification: renders package unusable
>
> after some time, gpg-agent sometimes get stuck, and does not work: gpg
> used with --use-agent option just says:
>
> gpg: problem with the agent - disabling agent use
>
> It's usually get stuck once a day rougly, implying an X session
> restart which is most than painful.
>
>
> neither verbose, nor --debug-all seems to give any valuable from the
> gpg command line, and I don't really know how to get into a situation
> where it gets stuck to debug it :|
>
> though I have one stuck instance running atm, is there any tests I can
> perform to know what's going on wrong ? I've checked $GPG_AGENT_INFO are
> correct, the socket is here, and gpg-agent is running the right pid, and
> fuser says that gpg-agent is still owning the socket.
I've compared the strace of a stuck gpg-agent and a working one, the
stuck one seems to receive a SIGPIPE when it writes to stdout. and yes
my gpg-agent is launched with the switch --daemon:
==== broken trace: ====
fcntl(0, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(0, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(0, F_SETFL, O_RDWR|O_NONBLOCK) = 0
select(1, NULL, [0], NULL, {0, 0}) = 1 (out [0], left {0, 0})
write(0, "OK closing connection", 21) = -1 EPIPE (Broken pipe)
--- SIGPIPE (Broken pipe) @ 0 (0) ---
fcntl(0, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(0, F_SETFL, O_RDWR) = 0
close(0) = 0
==== "good" trace ====
fcntl(6, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(6, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(6, F_SETFL, O_RDWR|O_NONBLOCK) = 0
select(7, NULL, [6], NULL, {0, 0}) = 1 (out [6], left {0, 0})
write(6, "OK closing connection", 21) = 21
fcntl(6, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(6, F_SETFL, O_RDWR) = 0
fcntl(6, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(6, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(6, F_SETFL, O_RDWR|O_NONBLOCK) = 0
select(7, NULL, [6], NULL, {0, 0}) = 1 (out [6], left {0, 0})
write(6, "\n", 1) = 1
fcntl(6, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(6, F_SETFL, O_RDWR) = 0
close(6) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 6
=====================
I've strictly no idea how the broken gpg-agent got into that stupid
state though.
--
·O· Pierre Habouzit
··O [EMAIL PROTECTED]
OOO http://www.madism.org