Page MenuHome GnuPG

GPG hangs on 100% CPU after kernel update
Closed, ResolvedPublic

Description

Today I updated a couple of packages:

2019-10-04 14:57:17 upgrade virtualbox-ext-pack:all 5.2.32-1~ubuntu18.04.1 5.2.32-1~ubuntu18.04.2
2019-10-04 14:57:18 upgrade libext2fs2:amd64 1.44.1-1ubuntu1.1 1.44.1-1ubuntu1.2
2019-10-04 14:57:18 upgrade e2fsprogs:amd64 1.44.1-1ubuntu1.1 1.44.1-1ubuntu1.2
2019-10-04 14:57:19 upgrade libsane1:amd64 1.0.27-1~experimental3ubuntu2.1 1.0.27-1~experimental3ubuntu2.2
2019-10-04 14:57:19 upgrade libsane1:i386 1.0.27-1~experimental3ubuntu2.1 1.0.27-1~experimental3ubuntu2.2
2019-10-04 14:57:20 upgrade libsane-common:all 1.0.27-1~experimental3ubuntu2.1 1.0.27-1~experimental3ubuntu2.2
2019-10-04 14:57:20 upgrade libcom-err2:amd64 1.44.1-1ubuntu1.1 1.44.1-1ubuntu1.2
2019-10-04 14:57:20 upgrade libcom-err2:i386 1.44.1-1ubuntu1.1 1.44.1-1ubuntu1.2
2019-10-04 14:57:20 upgrade netplan.io:amd64 0.97-0ubuntu1~18.04.1 0.98-0ubuntu1~18.04.1
2019-10-04 14:57:21 upgrade nplan:all 0.97-0ubuntu1~18.04.1 0.98-0ubuntu1~18.04.1
2019-10-04 14:57:21 upgrade tzdata:all 2019b-0ubuntu0.18.04 2019c-0ubuntu0.18.04
2019-10-04 14:57:25 upgrade linux-generic:amd64 4.15.0.64.66 4.15.0.65.67
2019-10-04 14:57:25 upgrade linux-image-generic:amd64 4.15.0.64.66 4.15.0.65.67
2019-10-04 14:57:29 upgrade linux-headers-generic:amd64 4.15.0.64.66 4.15.0.65.67

No configuration change was done in the meantime and everything was running fine before the update, I therefore rule out incorrect configs and blame one of the updates to have broken compatibility with GPG. Now GPG hangs on 100% CPU for any non-trivial operation. Trivial operations such as gpg --version still work.

MWE:

  1. (Re-)Start computer
  2. Run any gpg operation, e.g. gpg --debug-level advanced --list-keys
  3. Observe gpg process hanging at 100% CPU load infinitely (I waited for 10 minutes) or until Ctrl-C is pressed, even without debug option. Debug output is:
gpg: enabled debug flags: memstat trust extprog
gpg: "Trust-DB" wird überprüft
gpg: removing stale lockfile (created by 6957)
^C
gpg: signal Interrupt caught ... exiting

Now collect additional information for bug report:

$uname -a
Linux <machine_name> 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$gpg --version
gpg (GnuPG) 2.2.4
libgcrypt 1.8.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /home/myuser/.gnupg
Unterstützte Verfahren:
Öff. Schlüssel: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Verschlü.: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
           CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Komprimierung: nicht komprimiert, ZIP, ZLIB, BZIP2

When used with Enigmail, Thunderbird hangs upon opening an encrypted email or trying to send one. In this situation, the only resolution unfortunately is killall gpg

Thanks for looking into this issue! Its terrible to have lost PGP email capability. :(

Details

Version
2.2.4

Event Timeline

Please try with the latest GnuPG version (2.2.17) - it is unlikely that we can give support for an old version with Ubuntu's own set of patches. It is also advisable to post to the gnupg-users ML because over there you have hundreds of Ubuntu users.

Thanks for the feedback! Right now it hangs only for a few seconds, then works as usual. No idea how this come, but I'll close the issue and contact the ML if it appears again.