Re: kernel crash making a vlan on a wlan

From: Craig Leres <leres_at_freebsd.org>
Date: Sat, 23 Apr 2022 18:12:52 UTC
On 4/19/22 10:46, Jeff Anton wrote:
> A few days ago I tried setting up a vlan for a wlan on a non-critical 
> 13.0 amd64 (Atom processor) machine and it crashed hard. And because I 
> set it up in the rc.conf it loop crashed and eventually would not boot 
> and standalone fsck could not repair the filesystem and it would not 
> even get past the btx loader so that machine is out of action. It was 
> taking kernel dumps but to the same corrupt root fs. Sigh.
> 
> What I can remember from the crash report was the process was ifconfig 
> and there were calls to like wlan_ioctl and other ioctl's on the stack.
> 
> I probably set something like the following in rc.conf
> 
> vlans_wlan0="vlan0"
> create_args_vlan0="vlan 1234"
> ifconfig_vlan0="inet 192.168.2.3"
> static_routes="mcast"
> route_mcast="-net 224.0.0.0/4 -iface vlan0"
> 
> Anyone want to risk attempting recreation while I rebuild my now dead 
> machine?

I am able to reproduce the crash with 13.1-RC4.

I did an install on a spare SSD and put it in a foxconn nt-510. With the 
appended rc.conf (and an appropriate wpa_supplicant.conf for my wifi) 
the system boots up and can talk to the network. All it takes to crash 
it is to run:

     ifconfig vlan0 192.168.1.1

I also appended the stack trace from /var/log/messages.

		Craig

==============================

hostname="test.alameda.xse.com"
sshd_enable="YES"
dumpdev="AUTO"

keymap="us.ctrl"

wlans_iwn0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"

vlans_wlan0="vlan0"
create_args_vlan0="vlan 1234"

wpa_supplicant="YES"

==============================

Apr 22 11:03:09 test kernel: Fatal trap 12: page fault while in kernel mode
Apr 22 11:03:09 test kernel: cpuid = 0; apic id = 00
Apr 22 11:03:09 test kernel: fault virtual address      = 0x0
Apr 22 11:03:09 test kernel: fault code         = supervisor read 
instruction, page not present
Apr 22 11:03:09 test kernel: instruction pointer        = 0x20:0x0
Apr 22 11:03:09 test kernel: stack pointer              = 
0x28:0xfffffe00946589b8
Apr 22 11:03:09 test kernel: frame pointer              = 
0x28:0xfffffe0094658ac0
Apr 22 11:03:09 test kernel: code segment               = base 0x0, 
limit 0xfffff, type 0x1b
Apr 22 11:03:09 test kernel:                    = DPL 0, pres 1, long 1, 
def32 0, gran 1
Apr 22 11:03:09 test kernel: processor eflags   = interrupt enabled, 
resume, IOPL = 0
Apr 22 11:03:09 test kernel: current process            = 1404 (ifconfig)
Apr 22 11:03:09 test kernel: trap number                = 12
Apr 22 11:03:09 test kernel: panic: page fault
Apr 22 11:03:09 test kernel: cpuid = 0
Apr 22 11:03:09 test kernel: time = 1650650520
Apr 22 11:03:09 test kernel: KDB: stack backtrace:
Apr 22 11:03:09 test kernel: #0 0xffffffff80c69285 at kdb_backtrace+0x65
Apr 22 11:03:09 test kernel: #1 0xffffffff80c1b93f at vpanic+0x17f
Apr 22 11:03:09 test kernel: #2 0xffffffff80c1b7b3 at panic+0x43
Apr 22 11:03:09 test kernel: #3 0xffffffff810afdf5 at trap_fatal+0x385
Apr 22 11:03:09 test kernel: #4 0xffffffff810afe4f at trap_pfault+0x4f
Apr 22 11:03:09 test kernel: #5 0xffffffff81087348 at calltrap+0x8
Apr 22 11:03:09 test kernel: #6 0xffffffff80dadbfd at arp_ifinit+0x6d
Apr 22 11:03:09 test kernel: #7 0xffffffff80d4192d at vlan_ioctl+0x1dd
Apr 22 11:03:09 test kernel: #8 0xffffffff80db5baf at in_control+0x9bf
Apr 22 11:03:09 test kernel: #9 0xffffffff80d323bd at ifioctl+0x3bd
Apr 22 11:03:09 test kernel: #10 0xffffffff80c895eb at kern_ioctl+0x25b
Apr 22 11:03:09 test kernel: #11 0xffffffff80c892f1 at sys_ioctl+0xf1
Apr 22 11:03:09 test kernel: #12 0xffffffff810b06ec at amd64_syscall+0x10c
Apr 22 11:03:09 test kernel: #13 0xffffffff81087c5b at 
fast_syscall_common+0xf8
Apr 22 11:03:09 test kernel: Uptime: 11m2s
Apr 22 11:03:09 test kernel: Dumping 277 out of 2005 
MB:..6%..12%..24%..35%..41%..52%..64%..75%..81%..93%---<<BOOT>>---