panic: mutex 0xffffffff839ca6c8 not held in in_pcb_iterator
Stopped at db_enter+0x25: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
* 51724 87400 32767 0x10 0x4000000 1 syz-executor
72011 47686 32767 0x10 0x4000000 0 syz-executor
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438
panic(ffffffff833ec5b0) at panic+0x1e5 sys/kern/subr_prf.c:198
in_pcb_iterator(ffffffff839ca6c8,fffffd80656d9e20,ffff80003c47ad70) at in_pcb_iterator+0x21d sys/netinet/in_pcb.c:683
sysctl_file(ffff80003c47b038,4,200000000100,ffff80003c47b068,ffff80002a296ce8) at sysctl_file+0x18d2 sys/kern/kern_sysctl.c:-1
kern_sysctl(ffff80003c47b034,5,200000000100,ffff80003c47b068,0,ffffffffffffff67,81d20b6e02eae9fe) at kern_sysctl+0x251 sys/kern/kern_sysctl.c:526
sys_sysctl(ffff80002a296ce8,ffff80003c47b1a0,ffff80003c47b0f0) at sys_sysctl+0x3f2 sys/kern/kern_sysctl.c:-1
syscall(ffff80003c47b1a0) at syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80003c47b1a0) at syscall+0xbc6 sys/arch/amd64/amd64/trap.c:579
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x80654c85d70, count: 7
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{1}>
ddb{1}> set $lines = 0
ddb{1}> set $maxwidth = 0
ddb{1}> show panic
*cpu1: mutex 0xffffffff839ca6c8 not held in in_pcb_iterator
ddb{1}> trace
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438
panic(ffffffff833ec5b0) at panic+0x1e5 sys/kern/subr_prf.c:198
in_pcb_iterator(ffffffff839ca6c8,fffffd80656d9e20,ffff80003c47ad70) at in_pcb_iterator+0x21d sys/netinet/in_pcb.c:683
sysctl_file(ffff80003c47b038,4,200000000100,ffff80003c47b068,ffff80002a296ce8) at sysctl_file+0x18d2 sys/kern/kern_sysctl.c:-1
kern_sysctl(ffff80003c47b034,5,200000000100,ffff80003c47b068,0,ffffffffffffff67,81d20b6e02eae9fe) at kern_sysctl+0x251 sys/kern/kern_sysctl.c:526
sys_sysctl(ffff80002a296ce8,ffff80003c47b1a0,ffff80003c47b0f0) at sys_sysctl+0x3f2 sys/kern/kern_sysctl.c:-1
syscall(ffff80003c47b1a0) at syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80003c47b1a0) at syscall+0xbc6 sys/arch/amd64/amd64/trap.c:579
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x80654c85d70, count: -8
ddb{1}> show registers
rdi 0
rsi 0x1
rbp 0xffff80003c47ac30
rbx 0xffff8000299dedd7
rdx 0
rcx 0xffff80002a296ce8
rax 0xffff8000299ddff0
r8 0x101010101010101
r9 0x8080808080808080
r10 0xc58954382b7beebc
r11 0x51544bd1039d4215
r12 0xffff8000299debd8
r13 0
r14 0
r15 0x1
rip 0xffffffff81a737d5 db_enter+0x25
cs 0x8
rflags 0x246
rsp 0xffff80003c47ac20
ss 0x10
db_enter+0x25: addq $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor) tid=51724 pid=87400 tcnt=4 stat=onproc
flags process=10<SUGID> proc=4000000<THREAD>
runpri=36, usrpri=86, slppri=36, nice=20
wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0
forw=0xffffffffffffffff, list=0xffff8000ffff1c50,0xffff80003c43fc68
process=0xffff800038c13568 user=0xffff80003c476000, vmspace=0xfffffd806c3025c8
estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
87400 370574 71962 32767 3 0x90 nanoslp syz-executor
*87400 51724 71962 32767 7 0x4000010 syz-executor
87400 34917 71962 32767 3 0x4000090 fsleep syz-executor
87400 278579 71962 32767 3 0x4000090 fsleep syz-executor
67163 137399 95720 32767 2 0x10 syz-executor
67163 439739 95720 32767 3 0x4000090 fsleep syz-executor
47863 159843 38019 32767 2 0x4000010 syz-executor
47863 148899 38019 32767 3 0x4000090 kqread syz-executor
47863 264649 38019 32767 3 0x4000090 kqread syz-executor
47686 221879 72076 32767 2 0x10 syz-executor
47686 72011 72076 32767 7 0x4000010 syz-executor
8373 191125 0 0 3 0x14200 bored sosplice
56153 476007 58982 32767 3 0x90 nanoslp syz-executor
56153 93640 58982 32767 3 0x4000090 kqpoll syz-executor
56153 176363 58982 32767 3 0x4000090 fsleep syz-executor
35720 448395 14040 32767 3 0x90 nanoslp syz-executor
35720 245635 14040 32767 3 0x4000090 kqread syz-executor
35720 348604 14040 32767 3 0x4000090 fsleep syz-executor
82575 401203 98647 32767 3 0x90 nanoslp syz-executor
82575 357550 98647 32767 3 0x4000090 sbwait syz-executor
82575 491365 98647 32767 3 0x4000090 fsleep syz-executor
18865 479450 67216 32767 3 0x90 nanoslp syz-executor
18865 408103 67216 32767 3 0x4000090 kqsel syz-executor
18865 461944 67216 32767 3 0x4000090 fsleep syz-executor
58982 149314 76143 32767 3 0x90 nanoslp syz-executor
14040 15935 46867 32767 3 0x90 nanoslp syz-executor
72076 476744 29888 32767 3 0x90 nanoslp syz-executor
98647 4673 45031 32767 3 0x90 nanoslp syz-executor
71962 474228 13171 32767 3 0x90 nanoslp syz-executor
67216 393852 33352 32767 3 0x90 nanoslp syz-executor
95720 404211 92606 32767 3 0x90 nanoslp syz-executor
38019 192299 6886 32767 3 0x90 nanoslp syz-executor
76143 207626 61743 0 3 0x82 wait syz-executor
29888 61756 61743 0 3 0x82 wait syz-executor
45031 141267 61743 0 3 0x82 wait syz-executor
46867 152794 61743 0 3 0x82 wait syz-executor
6886 48929 61743 0 3 0x82 wait syz-executor
92606 176195 61743 0 3 0x82 wait syz-executor
33352 314568 61743 0 3 0x82 wait syz-executor
13171 432733 61743 0 3 0x82 wait syz-executor
61743 338362 81814 0 3 0x82 kqread syz-executor
81814 459240 10892 0 3 0x10008a sigsusp ksh
10892 52414 86498 0 3 0x98 kqread sshd-session
86498 171101 59191 0 3 0x92 kqread sshd-session
18459 295335 1 0 3 0x100083 ttyin getty
59191 67666 1 0 3 0x88 kqread sshd
50356 463034 7705 73 3 0x1100090 kqread syslogd
7705 433785 1 0 3 0x100082 sbwait syslogd
19705 81767 1 0 3 0x100080 kqread resolvd
47533 58102 1852 77 3 0x100092 kqread dhcpleased
71089 51681 1852 77 3 0x100092 kqread dhcpleased
1852 128760 1 0 3 0x80 kqread dhcpleased
32775 489257 0 0 3 0x14200 bored smr
18826 360768 0 0 2 0x14200 zerothread
69478 45153 0 0 3 0x14200 aiodoned aiodoned
50094 33402 0 0 3 0x14200 syncer update
47642 225071 0 0 3 0x14200 cleaner cleaner
93081 235207 0 0 3 0x14200 reaper reaper
2553 326087 0 0 3 0x14200 pgdaemon pagedaemon
90696 451550 0 0 3 0x14200 bored viomb
50154 124542 0 0 3 0x40014200 acpi0 acpi0
93412 471605 0 0 3 0x40014200 idle1
18859 432539 0 0 3 0x14200 bored softnet3
26588 485915 0 0 3 0x14200 bored softnet2
75376 176291 0 0 3 0x14200 bored softnet1
80802 114933 0 0 3 0x14200 bored softnet0
55957 265800 0 0 3 0x14200 bored systqmp
44141 407684 0 0 3 0x14200 bored systq
84586 175291 0 0 3 0x14200 tmoslp softclockmp
91742 33684 0 0 3 0x40014200 tmoslp softclock
9003 177980 0 0 3 0x40014200 idle0
1 502555 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
Process 87400 (syz-executor) thread 0xffff80002a296ce8 (51724)
shared rwlock netlock r = 0 (0xffffffff83805e30)
#0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0 witness_lock+0x5bb sys/kern/subr_witness.c:1160
#1 rw_do_enter_read+0x36e sys/kern/kern_rwlock.c:397
#2 sysctl_file+0x190c sys/kern/kern_sysctl.c:1769
#3 kern_sysctl+0x251 sys/kern/kern_sysctl.c:526
#4 sys_sysctl+0x3f2 sys/kern/kern_sysctl.c:-1
#5 syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline]
#5 syscall+0xbc6 sys/arch/amd64/amd64/trap.c:579
#6 Xsyscall+0x128
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 10191 10955K 10966K 166960K 11268 0
pcb 17 12K 12K 166960K 17 0
rtable 234 6K 6K 166960K 348 0
pf 31 16K 16K 166960K 31 0
ifaddr 42 7K 7K 166960K 44 0
ifgroup 50 2K 2K 166960K 50 0
sysctl 1 1K 9K 166960K 5 0
counters 68 36K 36K 166960K 68 0
ioctlops 0 0K 2K 166960K 30 0
iov 0 0K 12K 166960K 5 0
mount 1 1K 1K 166960K 1 0
log 0 0K 0K 166960K 4 0
vnodes 1334 84K 84K 166960K 1360 0
UFS quota 1 32K 32K 166960K 1 0
UFS mount 5 36K 36K 166960K 5 0
shm 2 1K 5K 166960K 3 0
VM map 2 1K 1K 166960K 2 0
sem 4 0K 0K 166960K 4 0
dirhash 12 2K 2K 166960K 12 0
ACPI 1692 195K 286K 166960K 12470 0
file desc 26 97K 121K 166960K 194 0
sigio 0 0K 0K 166960K 2 0
proc 58 79K 103K 166960K 473 0
subproc 72 4K 4K 166960K 72 0
NFS srvsock 1 0K 0K 166960K 1 0
NFS daemon 1 16K 16K 166960K 1 0
ip_moptions 0 0K 0K 166960K 8 0
in_multi 99 7K 7K 166960K 99 0
ether_multi 1 0K 0K 166960K 1 0
ISOFS mount 1 32K 32K 166960K 1 0
MSDOSFS mount 1 16K 16K 166960K 1 0
ttys 73 334K 334K 166960K 73 0
exec 0 0K 1K 166960K 340 0
fusefs mount 1 32K 32K 166960K 1 0
tdb 3 0K 0K 166960K 3 0
VM swap 8 62K 64K 166960K 10 0
UVM amap 273 168K 178K 166960K 3233 0
UVM aobj 5 2K 2K 166960K 5 0
pinsyscall 47 94K 110K 166960K 1191 0
memdesc 1 4K 4K 166960K 1 0
crypto data 1 1K 1K 166960K 1 0
ip6_options 0 0K 0K 166960K 7 0
NDP 13 0K 2K 166960K 27 0
temp 39 8687K 8747K 166960K 3852 0
kqueue 18 28K 28K 166960K 38 0
SYN cache 2 16K 16K 166960K 2 0
ddb{1}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache 128 26 0 0 1 0 1 1 0 8 0
rtpcb 120 105 0 102 3 0 3 3 0 8 2
rtentry 176 111 0 1 5 0 5 5 0 8 0
unpcb 144 87 0 63 1 0 1 1 0 8 0
syncache 336 4 0 4 1 0 1 1 0 8 1
tcpcb 808 24 0 15 1 0 1 1 0 8 0
arp 128 18 0 0 1 0 1 1 0 8 0
ipq 40 1 0 0 1 0 1 1 0 8 0
ipqe 40 1 0 0 1 0 1 1 0 8 0
inpcb 328 101 0 86 2 0 2 2 0 8 0
nd6 144 24 0 0 1 0 1 1 0 8 0
kcovpl 48 8 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 453 0 0 29 0 29 29 0 8 0
art_table 32 454 0 0 4 0 4 4 0 8 0
art_node 16 110 0 10 1 0 1 1 0 8 0
sysvmsgpl 40 40 0 40 1 0 1 1 0 8 1
semupl 112 1 0 1 1 0 1 1 0 8 1
semapl 112 2 0 0 1 0 1 1 0 8 0
shmpl 112 2 0 0 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 1621 0 114 95 0 95 95 0 8 0
ffsino 288 1621 0 114 108 0 108 108 0 8 0
nchpl 144 1885 0 205 63 0 63 63 0 8 0
uvmvnodes 80 1702 0 0 35 0 35 35 0 8 0
vnodes 216 1702 0 0 95 0 95 95 0 8 0
namei 1024 5518 0 5518 3 1 2 2 0 8 2
percpumem 16 49 0 0 1 0 1 1 0 8 0
kstatmem 264 24 0 0 2 0 2 2 0 8 0
scxspl 216 6240 0 6240 10 2 8 8 1 8 8
plimitpl 152 44 0 16 2 0 2 2 0 8 0
sigapl 424 466 0 409 7 0 7 7 0 8 0
knotepl 120 536 0 0 17 0 17 17 0 8 0
kqueuepl 224 45 0 26 2 0 2 2 0 8 0
pipepl 336 100 0 73 4 1 3 3 0 8 0
fdescpl 520 447 0 409 3 0 3 3 0 8 0
filepl 160 1717 0 1473 12 0 12 12 0 8 1
lockfpl 104 20 0 16 1 0 1 1 0 8 0
lockfspl 48 12 0 8 1 0 1 1 0 8 0
sessionpl 144 22 0 6 1 0 1 1 0 8 0
pgrppl 48 31 0 7 1 0 1 1 0 8 0
ucredpl 104 183 0 164 1 0 1 1 0 8 0
zombiepl 144 409 0 409 2 1 1 1 0 8 1
processpl 1240 466 0 409 5 0 5 5 0 8 0
procpl 656 560 0 488 6 0 6 6 0 8 0
sosppl 168 2 0 2 1 0 1 1 0 8 1
sockpl 728 294 0 249 10 0 10 10 0 8 5
mcl64k 65536 1 0 0 1 0 1 1 0 8 0
mcl8k 8192 2 0 0 1 0 1 1 0 8 0
mcl4k 4096 112 0 0 14 0 14 14 0 8 0
mcl2k 2048 13 0 0 2 0 2 2 0 8 0
mtagpl 96 2 0 0 1 0 1 1 0 8 0
mbufpl 256 275 0 0 18 0 18 18 0 8 0
bufpl 280 2289 0 115 156 0 156 156 0 8 0
anonpl 32 5308 0 0 43 0 43 43 0 246 0
amapchunkpl 152 9367 0 8739 30 1 29 29 0 158 4
amappl16 200 1807 0 1783 5 0 5 5 0 8 3
amappl15 192 5 0 5 2 1 1 1 0 8 1
amappl14 184 123 0 113 1 0 1 1 0 8 0
amappl13 176 5 0 5 1 0 1 1 0 8 1
amappl12 168 1039 0 1001 2 0 2 2 0 8 0
amappl11 160 48 0 38 1 0 1 1 0 8 0
amappl10 152 18 0 18 2 1 1 1 0 8 1
amappl9 144 245 0 245 2 1 1 1 0 8 1
amappl8 136 18 0 17 1 0 1 1 0 8 0
amappl7 128 108 0 98 1 0 1 1 0 8 0
amappl6 120 172 0 169 2 1 1 1 0 8 0
amappl5 112 176 0 170 1 0 1 1 0 8 0
amappl4 104 284 0 268 1 0 1 1 0 8 0
amappl3 96 1512 0 1368 4 0 4 4 0 8 0
amappl2 88 594 0 542 2 0 2 2 0 8 0
amappl1 80 8129 0 7548 15 1 14 14 0 8 0
amappl 88 2604 0 2397 5 0 5 5 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 4 0 0 1 0 1 1 0 8 0
uaddrrnd 24 447 0 409 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 447 0 409 1 0 1 1 0 8 0
vmmpekpl 168 5192 0 5165 2 0 2 2 0 8 0
vmmpepl 168 35047 0 32877 100 5 95 95 0 357 0
vmsppl 480 446 0 409 7 1 6 6 0 8 0
rwobjpl 72 14027 0 11454 47 0 47 47 0 8 0
pdppl 4096 901 0 818 113 26 87 95 0 8 4
pvpl 32 13321 0 0 108 0 108 108 0 265 0
pmappl 256 446 0 409 4 1 3 3 0 8 0
extentpl 40 45 0 27 1 0 1 1 0 8 0
phpool 112 401 0 31 11 0 11 11 0 8 0
ddb{1}> machine ddbcpu 0
Stopped at x86_ipi_db+0x27: addq $0x8,%rsp
x86_ipi_db(ffffffff83859ff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394
x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27
__mp_lock(ffffffff839595f8) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:129 [inline]
__mp_lock(ffffffff839595f8) at __mp_lock+0x192 sys/kern/kern_lock.c:160
doopenat(ffff80003c43f738,ffffff9c,200000000740,8000,0,ffff800037ffc590) at doopenat+0x314 sys/kern/vfs_syscalls.c:1137
syscall(ffff800037ffc640) at syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff800037ffc640) at syscall+0xbc6 sys/arch/amd64/amd64/trap.c:579
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xe509231e840, count: 8
ddb{0}> trace
x86_ipi_db(ffffffff83859ff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394
x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27
__mp_lock(ffffffff839595f8) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:129 [inline]
__mp_lock(ffffffff839595f8) at __mp_lock+0x192 sys/kern/kern_lock.c:160
doopenat(ffff80003c43f738,ffffff9c,200000000740,8000,0,ffff800037ffc590) at doopenat+0x314 sys/kern/vfs_syscalls.c:1137
syscall(ffff800037ffc640) at syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff800037ffc640) at syscall+0xbc6 sys/arch/amd64/amd64/trap.c:579
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xe509231e840, count: -7
ddb{0}> machine ddbcpu 1
Stopped at db_enter+0x25: addq $0x8,%rsp
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438
panic(ffffffff833ec5b0) at panic+0x1e5 sys/kern/subr_prf.c:198
in_pcb_iterator(ffffffff839ca6c8,fffffd80656d9e20,ffff80003c47ad70) at in_pcb_iterator+0x21d sys/netinet/in_pcb.c:683
sysctl_file(ffff80003c47b038,4,200000000100,ffff80003c47b068,ffff80002a296ce8) at sysctl_file+0x18d2 sys/kern/kern_sysctl.c:-1
kern_sysctl(ffff80003c47b034,5,200000000100,ffff80003c47b068,0,ffffffffffffff67,81d20b6e02eae9fe) at kern_sysctl+0x251 sys/kern/kern_sysctl.c:526
sys_sysctl(ffff80002a296ce8,ffff80003c47b1a0,ffff80003c47b0f0) at sys_sysctl+0x3f2 sys/kern/kern_sysctl.c:-1
syscall(ffff80003c47b1a0) at syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80003c47b1a0) at syscall+0xbc6 sys/arch/amd64/amd64/trap.c:579
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x80654c85d70, count: 7
ddb{1}> trace
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438
panic(ffffffff833ec5b0) at panic+0x1e5 sys/kern/subr_prf.c:198
in_pcb_iterator(ffffffff839ca6c8,fffffd80656d9e20,ffff80003c47ad70) at in_pcb_iterator+0x21d sys/netinet/in_pcb.c:683
sysctl_file(ffff80003c47b038,4,200000000100,ffff80003c47b068,ffff80002a296ce8) at sysctl_file+0x18d2 sys/kern/kern_sysctl.c:-1
kern_sysctl(ffff80003c47b034,5,200000000100,ffff80003c47b068,0,ffffffffffffff67,81d20b6e02eae9fe) at kern_sysctl+0x251 sys/kern/kern_sysctl.c:526
sys_sysctl(ffff80002a296ce8,ffff80003c47b1a0,ffff80003c47b0f0) at sys_sysctl+0x3f2 sys/kern/kern_sysctl.c:-1
syscall(ffff80003c47b1a0) at syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80003c47b1a0) at syscall+0xbc6 sys/arch/amd64/amd64/trap.c:579
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x80654c85d70, count: -8