1

I'm seeing this error when running apt update in containers, if that is useful information. apt spits out:

System error resolving 'archive.ubuntu.com:80' - getaddrinfo (16: Device or resource busy)

I tried looking at the glibc source but I could not understand what was going on.

7
  • This sounds like your reason - github.com/moby/moby/issues/26510.
    – slm
    Commented Aug 3, 2018 at 2:07
  • And this - docs.docker.com/storage/troubleshooting_volume_errors
    – slm
    Commented Aug 3, 2018 at 2:09
  • 1
    I am running apt update in a LXC privileged ubuntu bionic container. Pretty typical bridged networking setup. I'm not sure what that stackoverflow question has to do with this. This is a name resolution error. Commented Aug 3, 2018 at 2:13
  • 1
    You didn't give much to go on, so I'm throwing leads back to you.
    – slm
    Commented Aug 3, 2018 at 2:14
  • 1
    You can use strace to see if there is a relevant system call failing with EBUSY (or a different failure e.g. which matches what JdeBP describes)
    – sourcejedi
    Commented Aug 3, 2018 at 7:57

2 Answers 2

2

Your container is not fully functional, and the GNU C library's Name Service Switch functions do not work in it. Specifically, they cannot dynamically load _nss_N_gethostbyname3_r/_nss_N_gethostbyname2_r. getaddrinfo() returns with errno set to EBUSY (and h_errno set to NETDB_INTERNAL) in such circumstances.

You are also looking at the source code of the wrong function. That is getaddrinfo_a().

1
  • How can I handle the dynamic loading issue to make my container functional again? Commented Aug 3, 2018 at 5:53
2

Check your access rights. In my case /etc/hosts was mode 0600 which works for root but apt drops privileges when downloading.

Other fun places to check:

  • /lib, /lib/ARCH_TRIPLE, /lib/ARCH_TRIPLE/libnss_dns.so
  • /etc/resolv.conf
  • /usr, /usr/bin
1
  • thanks matthias; this container is long gone but maybe that will help in the future Commented Dec 18, 2020 at 0:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .