Project

General

Profile

Actions

Bug #3363

open

sysctl CTL_NET.PF_ROUTE.0.0.NET_RT_IFLIST.0 blocks in an uninterruptible wait in some cases

Added by guy almost 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Kernel
Target version:
Start date:
12/21/2023
Due date:
% Done:

0%

Estimated time:

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

sysctl_blocks.c (11.6 KB) sysctl_blocks.c guy, 12/21/2023 11:11 PM

No data to display

Actions

Also available in: Atom PDF