Bug 271270 - bnxt(4): kernel crash during kldunload
Summary: bnxt(4): kernel crash during kldunload
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords: crash
Depends on:
Blocks:
 
Reported: 2023-05-05 23:11 UTC by Alan Somers
Modified: 2023-05-25 09:25 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Somers freebsd_committer freebsd_triage 2023-05-05 23:11:44 UTC
On the latest 14.0-CURRENT build, unloading the if_bnxt module causes a kernel crash.  

root@slc-rb20a-ss:~ # kldunload if_bnxt
bnxt0: detached
pci6: <network, ethernet> at device 0.0 (no driver attached)
bnxt1: detached
pci6: <network, ethernet> at device 0.1 (no driver attached)
bnxt2: detached
bnxt3: detached
root@slc-rb20a-spci11: <network, ethernet> at device 0.0 (no driver attached)
pci11: <network, ethernet> at device 0.1 (no driver attached)
s:~ # bnxt0: <Broadcom BCM57414 NetXtreme-E 10Gb/25Gb Ethernet> mem 0x201fffc10000-0x201fffc1ffff,0x201fffb00000-0x201fffbfffff,0x201fffc22000-0x201fffc23fff irq 16 at device 0.0 numa-domain 0 on pci6
bnxt0: Using 256 TX descriptors and 256 RX descriptors
bnxt0: Using 16 RX queues 16 TX queues
bnxt0: Using MSI-X interrupts with 17 vectors
panic: _sx_xlock_hard: recursed on non-recursive sx iflib ctx lock @ /usr/home/asomers/src/github/freebsd/freebsd-src/sys/net/iflib.c:2582

cpuid = 0
time = 1683328108
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0c9c6785d0
vpanic() at vpanic+0x151/frame 0xfffffe0c9c678620
panic() at panic+0x43/frame 0xfffffe0c9c678680
_sx_xlock_hard() at _sx_xlock_hard+0x818/frame 0xfffffe0c9c678720
_sx_xlock() at _sx_xlock+0xb6/frame 0xfffffe0c9c678760
iflib_media_status() at iflib_media_status+0x32/frame 0xfffffe0c9c678790
ifmedia_ioctl() at ifmedia_ioctl+0x16a/frame 0xfffffe0c9c6787c0
dump_iface() at dump_iface+0x131/frame 0xfffffe0c9c678840
rtnl_handle_ifevent() at rtnl_handle_ifevent+0xab/frame 0xfffffe0c9c6788c0
if_attach_internal() at if_attach_internal+0x40e/frame 0xfffffe0c9c678910
ether_ifattach() at ether_ifattach+0x29/frame 0xfffffe0c9c678940
iflib_device_register() at iflib_device_register+0xe53/frame 0xfffffe0c9c6789d0
iflib_device_attach() at iflib_device_attach+0xb5/frame 0xfffffe0c9c678a00
device_attach() at device_attach+0x3c0/frame 0xfffffe0c9c678a40
device_probe_and_attach() at device_probe_and_attach+0x70/frame 0xfffffe0c9c678a70
pci_driver_added() at pci_driver_added+0xf3/frame 0xfffffe0c9c678ab0
devclass_driver_added() at devclass_driver_added+0x39/frame 0xfffffe0c9c678af0
device_do_deferred_actions() at device_do_deferred_actions+0x3a/frame 0xfffffe0c9c678b10
devctl2_ioctl() at devctl2_ioctl+0x534/frame 0xfffffe0c9c678be0
devfs_ioctl() at devfs_ioctl+0xcd/frame 0xfffffe0c9c678c30
vn_ioctl() at vn_ioctl+0xbe/frame 0xfffffe0c9c678ca0
devfs_ioctl_f() at devfs_ioctl_f+0x1e/frame 0xfffffe0c9c678cc0
kern_ioctl() at kern_ioctl+0x202/frame 0xfffffe0c9c678d30
sys_ioctl() at sys_ioctl+0x126/frame 0xfffffe0c9c678e00
amd64_syscall() at amd64_syscall+0x6ac/frame 0xfffffe0c9c678f30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe0c9c678f30
--- syscall (54, FreeBSD ELF64, ioctl), rip = 0x3407b66b78ea, rsp = 0x3407b41a7e78, rbp = 0x3407b41a7f30 ---
KDB: enter: panic