﻿id,summary,reporter,owner,description,type,status,component,version,resolution,keywords,cc,guest,host
14736,DNS server stops responding after number of gpg requests => Fixed in SVN,x-yuri,,"Hi,

Steps to reproduce the issue:

{{{
$ mkdir vm1
$ cd $_
$ vagrant init ubuntu/trusty64
$ vagrant up
$ vagrant ssh
$ cat /etc/resolv.conf | grep nameserver
nameserver 10.0.2.3
$ i=0; while true; do echo ""--- $i""; gpg --delete-key --batch --yes D39DC0E3; gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 || { echo -e $? '\a'; break; }; sleep 5; : $(( i++ )); done
--- 0
gpg: key ""D39DC0E3"" not found: eof
gpg: D39DC0E3: delete key failed: eof
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: key D39DC0E3: public key ""Michal Papis (RVM signing)<mpapis@gmail.com>"" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
--- 1
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: key D39DC0E3: public key ""Michal Papis (RVM signing)
<mpapis@gmail.com>"" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
...
--- 11
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpgkeys: HTTP fetch error 6: Could not resolve host: keys.gnupg.net
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
}}}

After this you can't resolve this particular domain, until you relog in. Meanwhile, `getaddrinfo` returns `EAI_AGAIN` (`Temporary failure in name resolution`). You can check this by compiling and running the following program:

{{{
    #include <stdio.h>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <netdb.h>
    #include <string.h>

    int main(void) {
        int r;
        struct addrinfo hints, *res;
        memset(&hints, 0, sizeof (hints));
        hints.ai_socktype = SOCK_STREAM;
        r = getaddrinfo(""keys.gnupg.net"", ""11371"", &hints, &res);
        // r = getaddrinfo(""pool.sks-keyservers.net"", ""11371"", &hints, &res);
        if (r) {
            printf(""r: %hhi\n"", r);   // EAI_AGAIN
            printf(""r: %s\n"", gai_strerror(r));
        }
        return 0;
    }
}}}

You can most likely reproduce it without `vagrant`. Just start up some VM, make sure it has `10.0.2.3` as its resolver and run the last command. It doesn't always happen on 11th try however, so be patient and leave it for a while. It'll call you back soon :)

The host OS is Arch Linux, if anything.

More info can be found here:
https://sourceware.org/ml/libc-help/2015-10/msg00012.html
https://lists.gnupg.org/pipermail/gnupg-users/2015-October/054532.html
https://github.com/protobox/protobox/issues/159
https://github.com/rvm/rvm/issues/3110#issuecomment-95161168

Regards,
Yuri",defect,closed,network/NAT,VirtualBox 5.0.4,fixed,,,Linux,Linux
