Bug#401843: /usr/bin/gpg-agent: gpg-agent sometimes get stuck and stops working

2006-12-06 Thread Pierre Habouzit
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.


-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-2-amd64
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages gnupg-agent depends on:
ii  libc62.3.6.ds1-8 GNU C Library: Shared libraries
ii  libgcrypt11  1.2.3-2 LGPL Crypto library - runtime libr
ii  libgpg-error01.4-2   library for common error values an
ii  libpth20 2.0.7-4 The GNU Portable Threads

Versions of packages gnupg-agent recommends:
ii  gnupg 1.4.5-3GNU privacy guard - a free PGP rep
ii  gnupg22.0.0-5.1  GNU privacy guard - a free PGP rep
ii  gpgsm 2.0.0-5.1  GNU privacy guard - S/MIME version
ii  pinentry-gtk2 [pinentry]  0.7.2-3GTK+-2-based PIN or pass-phrase en

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#401843: /usr/bin/gpg-agent: gpg-agent sometimes get stuck and stops working

2006-12-06 Thread Pierre Habouzit
reassign 401843 pinentry-gtk2
thanks


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.

  okay, further testing shows in fact that pinentry-gtk-2 is the culprit
in fact. after some time, for a reason I just can't understand,
pinentry-gtk-2 just refuses to fire, and says that it cannot open
display: 0.0. the interesting part of the strace is:


getuid()= 1003
uname({sys=Linux, node=mad, ...})   = 0
uname({sys=Linux, node=mad, ...})   = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
uname({sys=Linux, node=mad, ...})   = 0
uname({sys=Linux, node=mad, ...})   = 0
connect(3, {sa_family=AF_FILE, path=/tmp/.X11-unix/X0}, 19) = 0
uname({sys=Linux, node=mad, ...})   = 0
fcntl(3, F_SETFD, FD_CLOEXEC)   = 0
access(/tmp/.gdmSNNFKT, R_OK) = -1 ENOENT (No such file or 
directory)
writev(3, [{l\0\v\0\0\0\0\0\0\0\0\0, 12}], 1) = 12
fcntl(3, F_GETFL)   = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK)= 0
read(3, \0\26\v\0\0\0\6\0, 8) = 8
read(3, No protocol specified\n\0\0, 24) = 24
write(2, Xlib: connection to \:0.0\ refused by server\r\nXlib: , 52) = 
52
write(2, No protocol specified\n, 22) = 22
write(2, \r\n, 2) = 2
shutdown(3, 2 /* send and receive */)   = 0
close(3)= 0
write(2, \n(pinentry-gtk-2:4007): Gtk-WARNING **: cannot open display: 
:0.0\n, 66) = 66
munmap(0x2b347fd66000, 16384)   = 0
exit_group(1)   = ?


it tries to open gdm X Authentication cookie, sadly, it's not the
correct file name. I just don't know where that name comes from,
$XAUTHORITY is correct and in fact points to /tmp/.gdmY0V0JT and not
/tmp/.gdmSNNFKT.

-- 
·O·  Pierre Habouzit
··O[EMAIL PROTECTED]
OOOhttp://www.madism.org



Bug#401843: /usr/bin/gpg-agent: gpg-agent sometimes get stuck and stops working

2006-12-06 Thread Pierre Habouzit
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]
OOOhttp://www.madism.org