You are not logged in.

#1 2024-07-15 08:57:21

DexterLB
Member
Registered: 2011-06-20
Posts: 51

firefox (and other programs) freeze for >1min when DNS not responding

Hello,
I use systemd-networkd and systemd-resolved. I have two network interfaces of interest: wlan0 (WiFi, dual stack or ipv4-only) and wg (wireguard, ipv6-only). Both interfaces have (different) associated DNS servers in resolved. When wifi is normally connected, traffic goes through the wireguard interface and DNS requests go to the DNS server that is behind wireguard, as configured/expected.

However, when wifi goes down, the wireguard interface is still "up", which causes resolved to try using its DNS server, which is unreachable. This is fine (and expected) in itself, but it seems to have some unwanted side effects:

- If I start firefox while wifi is off, it freezes without showing a window. Even if connectivity to the DNS server comes back, firefox remains frozen and either needs to be killed or something has to timeout (I haven't timed it, but it takes more than 1min for it to show its window. Only SIGKILL works for killing, since firefox is in the `D` state this entire time. If this really is caused by DNS, is there a way to make firefox not attempt to do anything network-related before loading its window? Why is it even trying to do a network request outside of a tab-process?[/li]
- Some other applications also freeze on startup - even my shell (zsh with the grml config, same as the arch installer) freezes on startup and the only way to start a terminal while wifi is off is to start one with a plain bash shell

I might be mistaken about the issue being related to DNS, but there is a distinct correlation between the freezes and having an interface that is up but with no connectivity. Does anyone have an idea about dealing with this?

Last edited by DexterLB (2024-07-15 08:58:05)


The best solution to a problem is usually the easiest one.

Offline

Board footer

Powered by FluxBB