On Wed, Oct 04, 2023 at 08:42:48PM +0200, Kirill Miazine wrote:
> > If it happns again, could you send an 'ps axlww | grep ifconifg'
> > output? Then we see the wait channel where it hangs in the kernel.
> >
> > $ ps axlww
> > UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME
> > COMMAND
>
> Here it happened again:
>
> 0 75339 23922 0 10 0 360 296 wg_ifq D+U p0 0:00.00
> ifconfig wg1 destroy
wg_peer_destroy()
...
NET_LOCK();
while (!ifq_empty(&sc->sc_if.if_snd)) {
NET_UNLOCK();
tsleep_nsec(sc, PWAIT, "wg_ifq", 1000);
NET_LOCK();
}
NET_UNLOCK();
This net lock dance looks fishy. And the sleep has a timeout of 1
milli second. But that is may be per packet. So if you have a
long queue or the queue refills somehow, it will take forever.
I think the difference in the usage is constant traffic that keeps
the send queue full. The timeout hides the problem when there are
only a few packets.
bluhm