Bug#840680: [pkg-gnupg-maint] Bug#840680: dirmngr: Dirmngr not always responding

2016-10-27 Thread Craig Small
Hi Daniel,
  I'm not sure if this helps, but using the connect manager gave an odd
result.

If I start connect manager, then gpg --send-key works immediately, it looks
just like your gpg-connect-agent output.
On another screen, I use gpg --send-key and that works. The key gets sent
and all is good.

However if I hit enter on the connect manager it exits but dirmngr keeps
running. gpg --send-key then is like before where it hangs.

This happened in both 2.1.15-4 and 2.1.15-5
However! I downloaded 2.1.15-6 and it sends the key fine, so it looks like
that was the fix for me.

 - Craig


Bug#840680: [pkg-gnupg-maint] Bug#840680: dirmngr: Dirmngr not always responding

2016-10-26 Thread Daniel Kahn Gillmor
Hi Dhole and Craig--

Thanks for your reports of dirmngr not responding.  I've tried to
reproduce this bug, and actually found it easiest to reproduce with:

 GNUPGHOME=$(mktemp -d) gpg-connect-agent --dirmngr

This should produce the following debugging info, followed by a "> "
prompt:

gpg-connect-agent: no running Dirmngr - starting '/usr/bin/dirmngr'
gpg-connect-agent: waiting for the dirmngr to come up ... (5s)
gpg-connect-agent: connection to the dirmngr established
> 

Instead, it was hanging.

I've just imported an upstream fix for hanging instances of dirmngr and
included it in an upload to unstable as 2.1.15-6, which i've marked as
fixing this bug.  Please try it out in the environments that were
hanging for you, and reopen this bug report if the problems are still
happening.

Many thanks for the reporting, testing, and followup!

Regards,

 --dkg


signature.asc
Description: PGP signature


Bug#840680: [pkg-gnupg-maint] Bug#840680: dirmngr: Dirmngr not always responding

2016-10-13 Thread Daniel Kahn Gillmor
Control: tags 840680 + unreproducible moreinfo
Control: severity 840680 important

hi Shengjing--

Thanks for this report.  it sounds frustrating!  I hope we can debug it:

On Thu 2016-10-13 15:12:44 -0400, Shengjing Zhu wrote:
> After upgrade to 2.1.15-4, I find dirmngr is not always responding
> which makes command like `gpg --refresh-keys` stuck.

is this "always not responding" or "sometimes not responding"?  I
haven't observed the same behavior with dirmngr myself, so i'm not sure
how to best proceed...

> I test dirmngr with the following steps:
>
> First run `gpg-connect-agent --dirmngr /bye`
> It should immediately return but it's stuck.
>
> But I open another shell to run `gpg-connect-agent --dirmngr /bye`
> again. The first gpg-connect-agent returns and the second still is
> stuck.
>
> And I run again `gpg-connect-agent` and the previous one returns.

this is definitely strange behavior!  have you tried attaching strace to
the dirmngr process to see what it's doing while it's not answering you?
or have you tried increasing the logging of dirmngr to see what it's
doing while it's not responding?

if the process id of dirmngr is $DIRMNGR_PID, you can use:

strace -o dirmngr.strace -f -tt -T -p $DIRMNGR_PID

to get an strace dump.

You can increase the logging by adding these lines to
~/.gnupg/dirmngr.conf and then restarting dirmngr:

log-file /tmp/dirmngr.log
debug-level advanced

If you've got dirmgnr logs or strace output that you think might be
worth sharing, but are maybe too sensitive to post to this public bug
report, feel free to send them privately to me (you can encrypt to
0EE5BE979282D80B9F7540F1CCD2ED94D21739E9 if you like).

> So I guess only another process access to the dirmngr socket, the
> previous connect will be got processed.

I'm not sure what you mean by this.  can you explain?

  --dkg


signature.asc
Description: PGP signature