Wednesday, January 01, 2025

wg(4) inhibits reboot

I've been doing some testing against Wireguard and was able to get the system
in a state where it was unable to reboot via the shutdown command. Unfortunately,
I've been unable to reproduce the issue again so far. This particular system was
running an unmodified GENERIC kernel from -current:

OpenBSD 7.6-current (GENERIC) #470: Thu Dec 12 09:20:35 MST 2024
deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC

I had the system sending small amounts of traffic over the tunnel overnight. I
had executed an 'ifconfig wg0 down' then attempted an 'sh /etc/netstart wg0'.
Not sure if this had succeeded, I attempted to reboot the box, both using 'reboot'
and 'shutdown -r', neither of which worked. It would get as far as "System
shutdown time has arrived" and return you to the shell prompt. A few other
peculiar things I noticed:

- ifconfig would hang during the display of the wg0 interface, hanging after the
line "index A priority B llprio C" and a ^C would not terminate it. ifconfig
had to be manually killed
- the /usr/local/bin/wg process was unable to be killed, via kill -9 or kill -15
- a few attempts at running reboot and shutdown showed multiples of those
processes (and rc) hanging in the process list.

Can't remember what exactly I did that finally broke the hang and allowed the
reboot to proceed, but it involved tickling the wg0 interface. I don't have
enough concrete data for a bug report but seeing if anyone has any ideas.

Regards
Lloyd

No comments:

Post a Comment