[pkg-gnupg-maint] Bug#842015: Bug#842015: gnupg: gpg --no-tty freezes when there is no X display

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Oct 25 17:19:13 UTC 2016


Control: tags 842015 + moreinfo unreproducible

Hi Vincent --

On Tue 2016-10-25 05:25:24 -0400, Vincent Lefevre wrote:
> Emacs lucid starts:
>
>   /usr/bin/gpg --no-tty --status-fd 1 --yes --enable-progress-filter \
>   --command-fd 0 --output /tmp/epg-output9765F4x --decrypt -- <file.gpg>
>
> to decode files, even when there is no X display. This is a bug
> since this makes no sense (reported as bug 842012), but the fact
> that gpg freezes instead of returning with an error is another
> bug...

I'd like to learn more about what's going on that makes this freeze for
you.  It's possible that it's talking to gpg-agent and gpg-agent isn't
responding as fast as you'd like because it's invoking pinentry
somewhere else...

can you try running the command in question manually and showing me
what's produced on the status-fd?

I tried this myself and see:

$ DISPLAY=:0 gpg --no-tty --status-fd 1 --yes --enable-progress-filter --command-fd 0 --output $(pwd)/output --decrypt -- test.gpg 
[GNUPG:] PROGRESS test.gpg ? 0 866 B
[GNUPG:] ENC_TO A70A96E1439EA852 1 0
[GNUPG:] KEYEXPIRED 1453409582
[GNUPG:] KEY_CONSIDERED 0EE5BE979282D80B9F7540F1CCD2ED94D21739E9 0
[GNUPG:] PINENTRY_LAUNCHED 27754


it hangs here while pinentry is trying to collect my passphrase.

If i cancel the pinentry, then it produces the following text and
returns with error code 2:

[GNUPG:] KEYEXPIRED 1453409582
[GNUPG:] KEY_CONSIDERED 0EE5BE979282D80B9F7540F1CCD2ED94D21739E9 0
gpg: encrypted with 4096-bit RSA key, ID A70A96E1439EA852, created 2016-01-05
      "Daniel Kahn Gillmor <dkg at fifthhorseman.net>"
gpg: public key decryption failed: Operation cancelled
[GNUPG:] ERROR pkdecrypt_failed 83886179
[GNUPG:] BEGIN_DECRYPTION
[GNUPG:] DECRYPTION_FAILED
gpg: decryption failed: No secret key
[GNUPG:] END_DECRYPTION
[GNUPG:] PROGRESS test.gpg ? 866 866 B


Are you using a forwarded agent or a local agent?  what pinentry
programs are available on the machine in question?  which one is
installed as the default?

         --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 930 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnupg-maint/attachments/20161025/a53fa168/attachment.sig>


More information about the pkg-gnupg-maint mailing list