10.4-stable systematically crashing inside pselect() when a tun device is used

Jukka A. Ukkonen jau789 at gmail.com
Sat Nov 18 09:27:14 UTC 2017


Hello all,

As briefly stated in the subject I have a 10-stable system on
which I have been testing a program which opens either a tun
device or a tap device, waits in pselect() for the descriptor
to become readable, and then proceeds to read the packet/frame.
When using a tun descriptor the pselect() call always panics the
kernel with the complaints shown in the photo below. When using
a tap device the same code works just fine.
After a little eyeballing I failed to notice any obvious reason
for this in the tun device code. I hope someone who knows the tun
device better might be able to tell me what should I see in this.

At the very minimum the pselect() call should fail properly with
an error code. Raising a panic and crashing the whole kernel gives
me the impression that there is something very seriously wrong
there. At least for now it just has not dawned to me what it is.
The system doing this is just the average amd64 running 10-stable.
So, this should not be a hardware related issue on a rarely used
hardware.
Any hints, pointers, helpful sophisticated guesses etc. would be
welcome.

—jau



More information about the freebsd-questions mailing list