Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 616096 - app-crypt/gnupg-2.1.18: dirmngr fails on all keyserver operations
Summary: app-crypt/gnupg-2.1.18: dirmngr fails on all keyserver operations
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Kristian Fiskerstrand (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 611250
  Show dependency tree
 
Reported: 2017-04-20 09:18 UTC by Marek Szuba
Modified: 2020-08-04 14:56 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Szuba archtester gentoo-dev 2017-04-20 09:18:15 UTC
I have just confirmed that the upstream bug T2889 affects the current stable ebuild of app-crypt/gnupg. Please see the link for more details.

Workaround until this has been fixed: add the option "standard-resolver" to dirmngr.conf, then kill all running instances of dirmngr.
Comment 1 Kristian Fiskerstrand (RETIRED) gentoo-dev 2017-04-21 07:52:46 UTC
That particular bug (trailing dot) is fixed in 2.1.18 that contains https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commitdiff;h=b200e636ab20d2aa93d9f71f3789db5a04af0a56 which resolves the upstream bug fixed

I'd rather expect this relates to non-standard (missing "dns") resolver for hosts in /etc/nsswitch.conf
Comment 2 Holger Hoffstätte 2017-05-13 09:40:50 UTC
Not to raise any false alarms here, but for me this bug - or a variant of it? - still seems to apply even to 2.20.0-r1. I've been wondering why refreshing keys suddenly stopped working after recent updates on ~arch ("Address family not supported by protocol"), but with this workaround refresh works again.
Comment 3 Kristian Fiskerstrand (RETIRED) gentoo-dev 2017-05-13 13:58:23 UTC
(In reply to Holger Hoffstätte from comment #2)
> Not to raise any false alarms here, but for me this bug - or a variant of
> it? - still seems to apply even to 2.20.0-r1. I've been wondering why
> refreshing keys suddenly stopped working after recent updates on ~arch
> ("Address family not supported by protocol"), but with this workaround
> refresh works again.

Address family not supported sounds like a local IPv6 configuration issue?
Comment 4 Holger Hoffstätte 2017-05-13 14:38:55 UTC
(In reply to Kristian Fiskerstrand from comment #3)
> (In reply to Holger Hoffstätte from comment #2)
> > Not to raise any false alarms here, but for me this bug - or a variant of
> > it? - still seems to apply even to 2.20.0-r1. I've been wondering why
> > refreshing keys suddenly stopped working after recent updates on ~arch
> > ("Address family not supported by protocol"), but with this workaround
> > refresh works again.
> 
> Address family not supported sounds like a local IPv6 configuration issue?

That's what I thought. Unfortunately:

- this used to work not too long ago; I ran --refresh-keys when I exported/re-imported my keyring to recover from recent gnupg breakage.

- it also happens when I explicitly specify the keyserver, regardless of IPv4/v6 (e.g. the v4-only pool).

- it works fine when I rebuild gnupg with --disable-libdns; tested (with removed config) as alternative to the dirmngr configuration settting mentioned above.

Since everything else IPv4/v6 related works just fine here all fingers point to their homegrown resolver code.
Comment 5 Kristian Fiskerstrand (RETIRED) gentoo-dev 2017-05-13 14:45:04 UTC
(In reply to Holger Hoffstätte from comment #4)

 
> - it works fine when I rebuild gnupg with --disable-libdns; tested (with
> removed config) as alternative to the dirmngr configuration settting
> mentioned above.

Possibly related to https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=247932f367f856e7ce91528e14f0aaf838150857 and https://dev.gnupg.org/T3105
Comment 6 Holger Hoffstätte 2017-05-13 15:21:51 UTC
(In reply to Kristian Fiskerstrand from comment #5)
> (In reply to Holger Hoffstätte from comment #4)
> 
>  
> > - it works fine when I rebuild gnupg with --disable-libdns; tested (with
> > removed config) as alternative to the dirmngr configuration settting
> > mentioned above.
> 
> Possibly related to
> https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;
> h=247932f367f856e7ce91528e14f0aaf838150857 and https://dev.gnupg.org/T3105

Very interesting! I think this may have happened after I updated to gcc7, which might explain overly zealous optimization of questionable code.
I'll give that patch a try and report back.
Comment 7 Holger Hoffstätte 2017-05-13 15:46:51 UTC
(In reply to Holger Hoffstätte from comment #6)
> Very interesting! I think this may have happened after I updated to gcc7,
> which might explain overly zealous optimization of questionable code.
> I'll give that patch a try and report back.

Bingo! Removed the dirmngr config, verified failure, added patch to ebuild, rebuilt, --refresh-keys works again against standard keyserver pool. \o/
It's probably a good idea to include that patch everywhere.
Comment 8 Kristian Fiskerstrand (RETIRED) gentoo-dev 2017-05-13 15:58:53 UTC
(In reply to Holger Hoffstätte from comment #7)
> (In reply to Holger Hoffstätte from comment #6)
> > Very interesting! I think this may have happened after I updated to gcc7,
> > which might explain overly zealous optimization of questionable code.
> > I'll give that patch a try and report back.
> 
> Bingo! Removed the dirmngr config, verified failure, added patch to ebuild,
> rebuilt, --refresh-keys works again against standard keyserver pool. \o/
> It's probably a good idea to include that patch everywhere.

I expect a new upstream release relatively soon (https://dev.gnupg.org/T3150) so won't backport it to 2.1.20
Comment 9 Kristian Fiskerstrand (RETIRED) gentoo-dev 2017-05-13 16:00:04 UTC
(In reply to Kristian Fiskerstrand from comment #8)
> (In reply to Holger Hoffstätte from comment #7)
> > (In reply to Holger Hoffstätte from comment #6)
> > > Very interesting! I think this may have happened after I updated to gcc7,
> > > which might explain overly zealous optimization of questionable code.
> > > I'll give that patch a try and report back.
> > 
> > Bingo! Removed the dirmngr config, verified failure, added patch to ebuild,
> > rebuilt, --refresh-keys works again against standard keyserver pool. \o/
> > It's probably a good idea to include that patch everywhere.
> 
> I expect a new upstream release relatively soon
> (https://dev.gnupg.org/T3150) so won't backport it to 2.1.20

To avoid confusion, the patch for the actual keyring corruption _is_ included in our 2.0.21-r1 package, but the other issue will be included in the .21 release anyways
Comment 10 Gert Wollny 2017-08-05 09:39:47 UTC
When switching from 2.1.15 to 2.1.20-r1 I also ran into this problem. The system normally runs ipv4 only. An update to 2.1.22 also didn't help. 

I was able to resolved the problem by loading the ipv6 kernel module.
Comment 11 Gert Wollny 2017-08-05 09:58:15 UTC
I've filed another bug upstream: https://dev.gnupg.org/T3331
Comment 12 Kristian Fiskerstrand (RETIRED) gentoo-dev 2018-06-20 21:18:59 UTC
This is fixed in current versions of gnupg