Bug #3363
opensysctl CTL_NET.PF_ROUTE.0.0.NET_RT_IFLIST.0 blocks in an uninterruptible wait in some cases
0%
Description
The attached program blocks, reliably, in an uninterruptible wait on my DragonFly BSD 6.4 VM if I run it and then:
plug in a USB Wi-FI interface and tell VMware Fusion to attach it to the running VM;
wait for the interface to be attached and to be recognized by the program;
unplug the interface.
It hands in my_getifaddrs() (which is a copy of the DFly BSD getifaddrs()) when it's called after the program receives an RTM_IFINFO message. The hang is in the first sysctl() it does in the loop.
The RTM_IFINFO message is indicating that the carrier state of the removed interface is unknown; after that, an RTM_IFANNOUNCE message is received, indicating that the interface in question was removed, and then another RTM_IFINFO message, for the same interface, is received, again indicating that the carrier state is unknown.
I suspect this will happen on real hardware as well. It may also occur for, for example, Ethernet interfaces, and interfaces on pluggable-at-run-time buses other than USB.
Files
No data to display