NetworkManager appears to block while waiting for a response from a DNS server when WiFi networks are switched
As a DNS resolver, I use stubby to get a local resolver on 127.0.0.1. While switching connections from one wifi network to another in NetworkManager, NetworkManager appears to send a DNS request to stubby, which it then blockingly waits for a reply for. Stubby naturally won't answer until the connection, which NetworkManager just broke, times out. This blocks NetworkManager entirely; nmcli will just sit there and hang. plasma-nm will also just sit there and hang, which as a side effect freezes the entirety of plasmashell to truly ring in The Year of The Linux Desktop. Restarting stubby immediately unfreezes NetworkManager before the connection timeout is reached, confirming that yes, this is somehow caused by NetworkManager waiting for stubby.