# gpg-agent 100% CPU after pinentry

## jyelloz

Hi, I have not used gnupg in a long time but I have attempted to start using it again. Anyway, I have an existing keypair with a few subkeys. I've re-imported my secret key for the new gnupg 2.1 format as asked.

When attempting to do anything with gpg that requires my password I can enter my password but regardless of the pinentry implementation I use, gpg hangs and gpg-agent starts using 100% of the CPU indefinitely. This leaves gnupg completely inoperable for me.

Here's some sample output from gpg when attempting to change my password:

```
gpg --edit-key "<my key>"

Secret key is available.

gpg: using pgp trust model

pub  rsa4096/<my key fingerprint>

...

gpg> passwd

<I enter my existing password to unlock the private key>

gpg: key "<my key fingerprint>": error changing passphrase: No secret key

```

After this, gpg is stuck, pinentry is still running as a subprocess of gpg-agent, and gpg-agent is taking 100% CPU until I kill it.

Here's the installed versions of some relevant packages:

```
[ebuild   R    ] app-crypt/gnupg                                       [2.1.15::gentoo]              USE="bzip2 doc gnutls ldap nls readline tools usb (-selinux) -smartcard -tofu" 0 KiB

[ebuild   R    ] dev-libs/libassuan                                    [2.4.3::gentoo]               USE="-static-libs" 0 KiB

[ebuild   R    ] app-crypt/pinentry                                    [0.9.7-r1::gentoo]            USE="gnome-keyring gtk ncurses -caps -emacs -qt4 -qt5 -static" 0 KiB

```

Has anyone seen such a thing before? If so, what can be done?

----------

## kurisu

I have exactly the same issue since gnupg-2.1.15 went to stable. There is an open bug report, but alas no real progress so far. You can temporarily work around it by masking >=app-crypt/gnupg-2.1.

----------

