The package versions all refer to Arch x86_64.
The issue is definitely caused by dirmngr. The version of the running dirmngr is what determines whether the bug manifests or not.
The command "gpg --recv-key <key>" fails with the following error:
gpg: keyserver receive failed: Server indicated a failure
The last package version working fine is 2.1.16-2.
All following versions including 2.1.21-1 are affected by the bug.
Steps to reproduce:
After switching to a different version of gnupg, it is necessary to run the command "killall dirmngr".
Remove the key if already exists:
gpg --delete-keys 647F28654894E3BD457199BE38DBBDC86092693E
Run the command:
gpg --recv-key 647F28654894E3BD457199BE38DBBDC86092693E
Expected output:
gpg: key 38DBBDC86092693E: public key "Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com>" imported
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: depth: 0 valid: 1 signed: 2 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 2f, 0u
gpg: next trustdb check due at 2019-02-14
gpg: Total number processed: 1
gpg: imported: 1
Output on versions affected by the bug:
gpg: keyserver receive failed: Server indicated a failure