Toolbox "fedora:f40" DNF and YUM hangs

I have been using Silverblue since version 36 and never had any issue like this.

I have a brand new install of Silverblue Fedora 40 on a new laptop , i created a fedora:f40 toolbox with toolbox create but every dnf or yum command hangs for a few minutes before successfully completing

I installed strace and i can see it is hanging on /run/systemd/resolve/io.systemd.Resolve socket

futex(0x7f8a79e7d900, FUTEX_WAKE_PRIVATE, 2147483647) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/run/systemd/resolve/io.systemd.Resolve"}, 42) = 0
sendto(3, "{\"method\":\"io.systemd.Resolve.Re"..., 90, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 90
brk(0x557406ed9000)                     = 0x557406ed9000
recvfrom(3, 0x557406e98760, 131080, MSG_DONTWAIT, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
ppoll([{fd=3, events=POLLIN}], 1, {tv_sec=119, tv_nsec=999960000}, NULL, 8

and after a minute or 2 , it times out and proceed successfully to run the command

ppoll([{fd=3, events=POLLIN}], 1, {tv_sec=119, tv_nsec=999960000}, NULL, 8) = 0 (Timeout)
recvfrom(3, 0x557406e98760, 131080, MSG_DONTWAIT, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)


rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
close(3)                                = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=13539, ...}) = 0
mmap(NULL, 13539, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f8a7cddc000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libnss_myhostname.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=174416, ...}) = 0
mmap(NULL, 174360, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8a79e25000
mmap(0x7f8a79e28000, 90112, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f8a79e28000
mmap(0x7f8a79e3e000, 49152, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19000) = 0x7f8a79e3e000
mmap(0x7f8a79e4a000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x24000) = 0x7f8a79e4a000
close(3)                                = 0
mprotect(0x7f8a79e4a000, 20480, PROT_READ) = 0
munmap(0x7f8a7cddc000, 13539)           = 0
rt_sigprocmask(SIG_BLOCK, [HUP USR1 USR2 PIPE ALRM CHLD TSTP URG VTALRM PROF WINCH IO], [], 8) = 0
uname({sysname="Linux", nodename="toolbox", ...}) = 0

Note that

  • This only happens with toolbox based on f40 , i created ( and am currently using ) one based on f39 and works just fine
  • There are no available update in the f40 container
  • dns resolution and systemd-resolved works just fine both inside and outside the toolbox container
$ ls -la /run/systemd/resolve/io.systemd.Resolve
srw-rw-rw-. 1 nobody nobody 0 Jun  8 15:59 /run/systemd/resolve/io.systemd.Resolve

⬢[@toolbox ~]$ resolvectl 
Global
           Protocols: LLMNR=resolve -mDNS +DNSOverTLS DNSSEC=yes/supported
    resolv.conf mode: stub
  Current DNS Server: 1.1.1.2#cloudflare-dns.com
         DNS Servers: 1.1.1.2#cloudflare-dns.com 1.0.0.2#cloudflare-dns.com
Fallback DNS Servers: 8.8.8.8#dns.google 8.8.4.4#dns.google

Link 3 (wlp0s20f3)
    Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
         Protocols: +DefaultRoute LLMNR=resolve -mDNS +DNSOverTLS DNSSEC=yes/supported
Current DNS Server: 192.168.100.1
       DNS Servers: 192.168.100.1
        DNS Domain: lan

Link 4 (enp85s0)
    Current Scopes: none
         Protocols: -DefaultRoute LLMNR=resolve -mDNS +DNSOverTLS DNSSEC=yes/supported

Link 5 (docker0)
    Current Scopes: none
         Protocols: -DefaultRoute LLMNR=resolve -mDNS +DNSOverTLS DNSSEC=yes/supported



$ resolvectl query mirrors.fedoraproject.org
mirrors.fedoraproject.org: 2600:1f14:fad:5c02:7c8a:72d0:1c58:c189 -- link: wlp0s20f3
                           2600:2701:4000:5211:dead:beef:fe:fed3 -- link: wlp0s20f3
                           2604:1580:fe00:0:dead:beef:cafe:fed1 -- link: wlp0s20f3
                           2605:bc80:3010:600:dead:beef:cafe:fed9 -- link: wlp0s20f3
                           2620:52:3:1:dead:beef:cafe:fed6 -- link: wlp0s20f3
                           2620:52:3:1:dead:beef:cafe:fed7 -- link: wlp0s20f3
                           8.43.85.67          -- link: wlp0s20f3
                           8.43.85.73          -- link: wlp0s20f3
                           34.221.3.152        -- link: wlp0s20f3
                           38.145.60.20        -- link: wlp0s20f3
                           38.145.60.21        -- link: wlp0s20f3
                           67.219.144.68       -- link: wlp0s20f3
                           140.211.169.196     -- link: wlp0s20f3
                           152.19.134.142      -- link: wlp0s20f3
                           152.19.134.198      -- link: wlp0s20f3
                           (wildcard.fedoraproject.org)

-- Information acquired via protocol DNS in 144.7ms.
-- Data is authenticated: yes; Data was acquired via local or encrypted transport: yes
-- Data from: network

Anyone experiencing similar problems ?

Thanks :pray:

You have all the information to file a bug, If I were you I would.

You are probably right.

Just thought it was strange i was the only one with the problem.

Will do that :+1:

Created an issue on bugzilla 2291062 – Using toolbox with a "fedora:f40" container on Silverblue , DNF and YUM hangs

A similar problem occurs in a different setup:
DNF and Firefox take extreemly long to start when VPN active on f40? - #4 by vgaetera

Confirmed same fix working.

sudo sed -ie 's/ resolve/ myhostname resolve/' /etc/nsswitch.conf