panic: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
* 89711 35588 0 0 0 0 syz-executor.0
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff825c306b) at panic+0x177 sys/kern/subr_prf.c:198
witness_checkorder(ffffffff82b8eb38,9,0) at witness_checkorder+0x116d sys/kern/subr_witness.c:833
__mp_lock(ffffffff82b8e930) at __mp_lock+0xa1 read_rflags machine/cpufunc.h:195 [inline]
__mp_lock(ffffffff82b8e930) at __mp_lock+0xa1 intr_disable machine/cpufunc.h:216 [inline]
__mp_lock(ffffffff82b8e930) at __mp_lock+0xa1 sys/kern/kern_lock.c:142
rt_clone(ffff80002130a8e8,fffffd8074006648,0) at rt_clone+0x5c sys/net/route.c:257
rtalloc_mpath(fffffd8074006648,fffffd8074006610,0) at rtalloc_mpath+0xbc rt_match sys/net/route.c:235 [inline]
rtalloc_mpath(fffffd8074006648,fffffd8074006610,0) at rtalloc_mpath+0xbc sys/net/route.c:350
in_pcbrtentry(fffffd80740065c0) at in_pcbrtentry+0x1cf
ip6_ctloutput(0,fffffd806e906b80,29,2c,fffffd806eaed300) at ip6_ctloutput+0x1079 sys/netinet6/ip6_output.c:1511
sys_getsockopt(ffff8000ffff5260,ffff80002130aad8,ffff80002130ab20) at sys_getsockopt+0x15e sys/kern/uipc_syscalls.c:1275
syscall(ffff80002130aba0) at syscall+0x4c2 mi_syscall sys/sys/syscall_mi.h:101 [inline]
syscall(ffff80002130aba0) at syscall+0x4c2 sys/arch/amd64/amd64/trap.c:599
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffdf2d0, count: 4
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports. Insufficient info makes it difficult to find and fix bugs.
ddb{0}>
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
*cpu0: acquiring blockable sleep lock with spinlock or critical section held (kernel_lock) &kernel_lock
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff825c306b) at panic+0x177 sys/kern/subr_prf.c:198
witness_checkorder(ffffffff82b8eb38,9,0) at witness_checkorder+0x116d sys/kern/subr_witness.c:833
__mp_lock(ffffffff82b8e930) at __mp_lock+0xa1 read_rflags machine/cpufunc.h:195 [inline]
__mp_lock(ffffffff82b8e930) at __mp_lock+0xa1 intr_disable machine/cpufunc.h:216 [inline]
__mp_lock(ffffffff82b8e930) at __mp_lock+0xa1 sys/kern/kern_lock.c:142
rt_clone(ffff80002130a8e8,fffffd8074006648,0) at rt_clone+0x5c sys/net/route.c:257
rtalloc_mpath(fffffd8074006648,fffffd8074006610,0) at rtalloc_mpath+0xbc rt_match sys/net/route.c:235 [inline]
rtalloc_mpath(fffffd8074006648,fffffd8074006610,0) at rtalloc_mpath+0xbc sys/net/route.c:350
in_pcbrtentry(fffffd80740065c0) at in_pcbrtentry+0x1cf
ip6_ctloutput(0,fffffd806e906b80,29,2c,fffffd806eaed300) at ip6_ctloutput+0x1079 sys/netinet6/ip6_output.c:1511
sys_getsockopt(ffff8000ffff5260,ffff80002130aad8,ffff80002130ab20) at sys_getsockopt+0x15e sys/kern/uipc_syscalls.c:1275
syscall(ffff80002130aba0) at syscall+0x4c2 mi_syscall sys/sys/syscall_mi.h:101 [inline]
syscall(ffff80002130aba0) at syscall+0x4c2 sys/arch/amd64/amd64/trap.c:599
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffdf2d0, count: -11
ddb{0}> show registers
rdi 0
rsi 0x1
rbp 0xffff80002130a610
rbx 0xffffffff829deb8f cpu_info_full_primary+0x2b8f
rdx 0x3fd
rcx 0
rax 0x68
r8 0x101010101010101
r9 0x8080808080808080
r10 0x6c25b484c36e5ae5
r11 0x6c621de4d0c8b33
r12 0xffffffff829de990 cpu_info_full_primary+0x2990
r13 0
r14 0
r15 0x1
rip 0xffffffff817e9808 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff80002130a600
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{0}> show proc
PROC (syz-executor.0) pid=89711 stat=onproc
flags process=0 proc=0
pri=58, usrpri=58, nice=20
forw=0xffffffffffffffff, list=0xffff8000ffff5a40,0xffffffff82b90490
process=0xffff8000ffff8868 user=0xffff800021305000, vmspace=0xfffffd806ef7e2e8
estcpu=36, cpticks=1, pctcpu=0.0
user=0, sys=1, intr=0
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
*35588 89711 28045 0 7 0 syz-executor.0
28045 321983 80385 0 3 0x82 nanoslp syz-executor.0
80385 314277 60823 0 3 0x82 thrsleep syz-execprog
80385 458928 60823 0 3 0x4000082 nanoslp syz-execprog
80385 396268 60823 0 3 0x4000082 wait syz-execprog
80385 45513 60823 0 3 0x4000082 thrsleep syz-execprog
80385 466170 60823 0 3 0x4000082 thrsleep syz-execprog
80385 397826 60823 0 3 0x4000082 kqread syz-execprog
80385 516790 60823 0 3 0x4000082 thrsleep syz-execprog
80385 184933 60823 0 3 0x4000082 thrsleep syz-execprog
60823 194281 22786 0 3 0x10008a sigsusp ksh
22786 254983 87310 0 3 0x9a kqread sshd
22225 167559 1 0 3 0x100083 ttyin getty
87310 298712 1 0 3 0x88 kqread sshd
49063 521378 66630 73 3 0x1100090 kqread syslogd
66630 253003 1 0 3 0x100082 netio syslogd
89666 244563 1 0 3 0x100080 kqread resolvd
46937 175770 28645 77 3 0x100092 kqread dhcpleased
75671 443030 28645 77 3 0x100092 kqread dhcpleased
28645 168391 1 0 3 0x80 kqread dhcpleased
77951 5463 0 0 3 0x14200 bored smr
75089 118648 0 0 3 0x14200 pgzero zerothread
85260 376991 0 0 3 0x14200 aiodoned aiodoned
14813 165500 0 0 3 0x14200 syncer update
94701 130748 0 0 3 0x14200 cleaner cleaner
75956 97698 0 0 3 0x14200 reaper reaper
54503 403075 0 0 3 0x14200 pgdaemon pagedaemon
46258 236753 0 0 3 0x14200 bored viomb
2964 375641 0 0 3 0x40014200 acpi0 acpi0
74982 452775 0 0 7 0x40014200 idle1
32944 285570 0 0 3 0x14200 bored softnet
49010 429097 0 0 3 0x14200 bored softnet
91188 145492 0 0 3 0x14200 bored softnet
91010 514870 0 0 3 0x14200 bored softnet
91713 280412 0 0 3 0x14200 bored systqmp
2108 132078 0 0 3 0x14200 bored systq
88781 355421 0 0 3 0x40014200 bored softclock
14287 154539 0 0 3 0x40014200 idle0
1 489986 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{0}> show all locks
CPU 0:
exclusive mutex &inp->inp_mtx r = 0 (0xfffffd8074006680)
#0 witness_lock+0x44d
#1 mtx_enter_try+0x100
#2 mtx_enter+0x4b sys/kern/kern_lock.c:266
#3 sys_getsockopt+0x145 sys/kern/uipc_syscalls.c:1275
#4 syscall+0x4c2 mi_syscall sys/sys/syscall_mi.h:101 [inline]
#4 syscall+0x4c2 sys/arch/amd64/amd64/trap.c:599
#5 Xsyscall+0x128
Process 35588 (syz-executor.0) thread 0xffff8000ffff5260 (89711)
shared rwlock netlock r = 0 (0xffffffff82957180)
#0 witness_lock+0x44d
#1 solock_shared+0x64 pru_lock sys/sys/protosw.h:287 [inline]
#1 solock_shared+0x64 sys/kern/uipc_socket2.c:371
#2 sys_getsockopt+0x145 sys/kern/uipc_syscalls.c:1275
#3 syscall+0x4c2 mi_syscall sys/sys/syscall_mi.h:101 [inline]
#3 syscall+0x4c2 sys/arch/amd64/amd64/trap.c:599
#4 Xsyscall+0x128
exclusive mutex &inp->inp_mtx r = 0 (0xfffffd8074006680)
#0 witness_lock+0x44d
#1 mtx_enter_try+0x100
#2 mtx_enter+0x4b sys/kern/kern_lock.c:266
#3 sys_getsockopt+0x145 sys/kern/uipc_syscalls.c:1275
#4 syscall+0x4c2 mi_syscall sys/sys/syscall_mi.h:101 [inline]
#4 syscall+0x4c2 sys/arch/amd64/amd64/trap.c:599
#5 Xsyscall+0x128
ddb{0}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 10164 6392K 6420K 78643K 11254 0
pcb 13 8K 8K 78643K 13 0
rtable 80 2K 2K 78643K 133 0
ifaddr 29 8K 8K 78643K 29 0
counters 46 34K 34K 78643K 46 0
ioctlops 0 0K 2K 78643K 20 0
mount 1 1K 1K 78643K 1 0
log 0 0K 0K 78643K 4 0
vnodes 1167 73K 73K 78643K 1180 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 1K 78643K 2 0
VM map 2 1K 1K 78643K 2 0
sem 2 0K 0K 78643K 2 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1697 195K 286K 78643K 12548 0
file desc 4 9K 13K 78643K 67 0
proc 55 78K 91K 78643K 267 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
in_multi 22 1K 1K 78643K 22 0
ether_multi 1 0K 0K 78643K 1 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 25 122K 122K 78643K 25 0
exec 0 0K 1K 78643K 258 0
tdb 3 0K 0K 78643K 3 0
pagedep 1 8K 8K 78643K 1 0
inodedep 1 32K 32K 78643K 1 0
newblk 1 0K 0K 78643K 1 0
VM swap 8 62K 64K 78643K 10 0
UVM amap 139 14K 14K 78643K 2011 0
UVM aobj 3 2K 2K 78643K 3 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
ip6_options 2 0K 0K 78643K 94 0
NDP 4 0K 0K 78643K 6 0
temp 23 4677K 4741K 78643K 3110 0
kqueue 12 18K 18K 78643K 25 0
SYN cache 2 16K 16K 78643K 2 0
ddb{0}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache 128 22 0 0 1 0 1 1 0 8 0
rtpcb 120 19 0 16 1 0 1 1 0 8 0
rtentry 112 34 0 1 1 0 1 1 0 8 0
unpcb 144 80 0 67 1 0 1 1 0 8 0
syncache 296 5 0 5 2 1 1 1 0 8 1
tcpqe 32 61 0 61 1 1 0 1 0 8 0
tcpcb 776 55 0 51 1 0 1 1 0 8 0
arp 120 4 0 0 1 0 1 1 0 8 0
inpcb 368 170 0 162 1 0 1 1 0 8 0
nd6 48 3 0 0 1 0 1 1 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 145 0 0 10 0 10 10 0 8 0
art_table 32 146 0 0 2 0 2 2 0 8 0
art_node 16 33 0 3 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 1488 0 93 88 0 88 88 0 8 0
ffsino 272 1488 0 93 94 0 94 94 0 8 1
nchpl 144 1769 0 150 61 0 61 61 0 8 1
uvmvnodes 80 1497 0 0 31 0 31 31 0 8 0
vnodes 216 1497 0 0 84 0 84 84 0 8 0
namei 1024 5087 0 5087 3 1 2 2 0 8 2
percpumem 16 35 0 0 1 0 1 1 0 8 0
kstatmem 264 8 0 0 1 0 1 1 0 8 0
scxspl 216 6048 0 6048 10 8 2 8 0 8 2
plimitpl 152 18 0 10 1 0 1 1 0 8 0
sigapl 424 370 0 338 5 0 5 5 0 8 1
knotepl 120 54 0 0 2 0 2 2 0 8 0
kqueuepl 216 21 0 13 1 0 1 1 0 8 0
pipepl 320 100 0 93 2 1 1 1 0 8 0
fdescpl 496 353 0 338 4 1 3 3 0 8 1
filepl 152 1534 0 1467 3 0 3 3 0 8 0
lockfpl 104 6 0 4 1 0 1 1 0 8 0
lockfspl 48 4 0 2 1 0 1 1 0 8 0
sessionpl 144 18 0 9 1 0 1 1 0 8 0
pgrppl 48 18 0 9 1 0 1 1 0 8 0
ucredpl 104 66 0 56 1 0 1 1 0 8 0
zombiepl 144 338 0 338 2 1 1 1 0 8 1
processpl 1072 370 0 338 3 0 3 3 0 8 0
procpl 672 377 0 338 4 0 4 4 0 8 0
sockpl 488 269 0 245 4 0 4 4 0 8 1
mcl8k 8192 2 0 0 1 0 1 1 0 8 0
mcl4k 4096 2 0 0 1 0 1 1 0 8 0
mcl2k 2048 268 0 0 34 0 34 34 0 8 0
mtagpl 96 3 0 0 1 0 1 1 0 8 0
mbufpl 256 329 0 0 21 0 21 21 0 8 0
bufpl 288 3951 0 138 273 0 273 273 0 8 0
anonpl 24 104702 0 100903 61 16 45 46 0 186 21
amapchunkpl 152 5410 0 5142 18 1 17 17 0 158 4
amappl16 200 2054 0 1996 10 5 5 5 0 8 0
amappl15 192 4 0 3 2 1 1 1 0 8 0
amappl14 184 124 0 112 2 0 2 2 0 8 0
amappl13 176 5 0 5 1 1 0 1 0 8 0
amappl12 168 300 0 299 2 1 1 1 0 8 0
amappl11 160 49 0 38 1 0 1 1 0 8 0
amappl10 152 21 0 20 2 1 1 1 0 8 0
amappl9 144 934 0 934 2 1 1 1 0 8 1
amappl8 136 81 0 63 2 1 1 1 0 8 0
amappl7 128 116 0 100 2 0 2 2 0 8 1
amappl6 120 116 0 104 2 0 2 2 0 8 1
amappl5 112 86 0 77 1 0 1 1 0 8 0
amappl4 104 382 0 358 2 0 2 2 0 8 1
amappl3 96 543 0 514 2 0 2 2 0 8 1
amappl2 88 634 0 577 3 0 3 3 0 8 1
amappl1 80 10215 0 9684 25 5 20 22 0 8 8
amappl 88 1635 0 1562 4 1 3 3 0 92 0
dma4096 4096 1 0 1 1 1 0 1 0 8 0
dma1024 1024 1 0 0 1 0 1 1 0 8 0
dma256 256 6 0 6 1 1 0 1 0 8 0
dma128 128 253 0 253 1 1 0 1 0 8 0
dma64 64 6 0 6 1 1 0 1 0 8 0
dma32 32 7 0 7 1 1 0 1 0 8 0
dma16 16 18 0 17 1 0 1 1 0 8 0
aobjpl 72 2 0 0 1 0 1 1 0 8 0
uaddrrnd 24 353 0 338 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 353 0 338 1 0 1 1 0 8 0
vmmpekpl 168 8568 0 8551 1 0 1 1 0 8 0
vmmpepl 168 36083 0 34767 114 9 105 105 0 357 47
vmsppl 368 352 0 338 3 0 3 3 0 8 1
rwobjpl 56 13571 0 11254 44 1 43 43 0 8 8
pdppl 4096 713 0 676 71 28 43 53 0 8 6
pvpl 32 265232 0 257442 287 17 270 271 0 265 203
pmappl 248 352 0 338 3 1 2 2 0 8 1
extentpl 40 56 0 38 1 0 1 1 0 8 0
phpool 112 607 0 31 17 0 17 17 0 8 0
ddb{0}> machine ddbcpu 0
Invalid cpu 0
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff825c306b) at panic+0x177 sys/kern/subr_prf.c:198
witness_checkorder(ffffffff82b8eb38,9,0) at witness_checkorder+0x116d sys/kern/subr_witness.c:833
__mp_lock(ffffffff82b8e930) at __mp_lock+0xa1 read_rflags machine/cpufunc.h:195 [inline]
__mp_lock(ffffffff82b8e930) at __mp_lock+0xa1 intr_disable machine/cpufunc.h:216 [inline]
__mp_lock(ffffffff82b8e930) at __mp_lock+0xa1 sys/kern/kern_lock.c:142
rt_clone(ffff80002130a8e8,fffffd8074006648,0) at rt_clone+0x5c sys/net/route.c:257
rtalloc_mpath(fffffd8074006648,fffffd8074006610,0) at rtalloc_mpath+0xbc rt_match sys/net/route.c:235 [inline]
rtalloc_mpath(fffffd8074006648,fffffd8074006610,0) at rtalloc_mpath+0xbc sys/net/route.c:350
in_pcbrtentry(fffffd80740065c0) at in_pcbrtentry+0x1cf
ip6_ctloutput(0,fffffd806e906b80,29,2c,fffffd806eaed300) at ip6_ctloutput+0x1079 sys/netinet6/ip6_output.c:1511
sys_getsockopt(ffff8000ffff5260,ffff80002130aad8,ffff80002130ab20) at sys_getsockopt+0x15e sys/kern/uipc_syscalls.c:1275
syscall(ffff80002130aba0) at syscall+0x4c2 mi_syscall sys/sys/syscall_mi.h:101 [inline]
syscall(ffff80002130aba0) at syscall+0x4c2 sys/arch/amd64/amd64/trap.c:599
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffdf2d0, count: -11
ddb{0}> machine ddbcpu 1
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
x86_ipi_db(ffff800020dd8ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
acpicpu_idle() at acpicpu_idle+0x312 sys/dev/acpi/acpicpu.c:1206
sched_idle(ffff800020dd8ff0) at sched_idle+0x417 sys/kern/kern_sched.c:175
end trace frame: 0x0, count: 10
ddb{1}> trace
x86_ipi_db(ffff800020dd8ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
acpicpu_idle() at acpicpu_idle+0x312 sys/dev/acpi/acpicpu.c:1206
sched_idle(ffff800020dd8ff0) at sched_idle+0x417 sys/kern/kern_sched.c:175
end trace frame: 0x0, count: -5
ddb{1}>