ppanic: kernel diagnostic assertion "!_kernel_lock_held()" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_fork.c", line 670
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
* 17589 2142 0 0 0x4000000 1 syz-executor.1
281921 72727 0 0 0 0 dhclient
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff821f86fc) at panic+0x15c sys/kern/subr_prf.c:207
__assert(ffffffff8224e08e,ffffffff8223c642,29e,ffffffff8221bc9f) at __assert+0x2b sys/kern/subr_prf.c:154
proc_trampoline_mp() at proc_trampoline_mp+0x123
end trace frame: 0x0, count: 11
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
receive 1a: so 0xfffffd806f6db000, so_type 3, m 0xfffffd8076a29400, m_type 0
ddb{1}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff821f86fc) at panic+0x15c sys/kern/subr_prf.c:207
__assert(ffffffff8224e08e,ffffffff8223c642,29e,ffffffff8221bc9f) at __assert+0x2b sys/kern/subr_prf.c:154
proc_trampoline_mp() at proc_trampoline_mp+0x123
end trace frame: 0x0, count: -4
ddb{1}> show registers
rdi 0
rsi 0x1
rbp 0xffff8000241bb2c0
rbx 0xffff8000241bb370
rdx 0xffff800020ec7878
rcx 0
rax 0
r8 0xffffffff81f8ff4f kprintf+0x16f
r9 0x1
r10 0x25
r11 0x8c3f729bd94e044d
r12 0x3000000008
r13 0xffff8000241bb2d0
r14 0x104
r15 0x1
rip 0xffffffff815491a8 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff8000241bb2b0
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor.1) pid=17589 stat=onproc
flags process=0 proc=4000000<THREAD>
pri=76, usrpri=76, nice=20
forw=0xffffffffffffffff, list=0xffff800020ec7ae8,0xffffffff826651b0
process=0xffff800020e93730 user=0xffff8000241b6000, vmspace=0xfffffd807efffb80
estcpu=26, cpticks=1, pctcpu=0.0
user=0, sys=1, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
2142 82993 38977 0 2 0 syz-executor.1
2142 311666 38977 0 3 0x4000000 biowait syz-executor.1
2142 443844 38977 0 2 0x4000000 syz-executor.1
* 2142 17589 38977 0 7 0x4000000 syz-executor.1
73174 316683 58406 0 2 0 syz-executor.0
73174 193062 58406 0 3 0x4000080 fsleep syz-executor.0
95370 179448 0 0 3 0x14200 bored sosplice
38977 414614 93495 0 3 0x82 nanosleep syz-executor.1
58406 478698 93495 0 3 0x82 nanosleep syz-executor.0
93495 443540 11907 0 3 0x82 thrsleep syz-fuzzer
93495 444326 11907 0 3 0x4000082 nanosleep syz-fuzzer
93495 61395 11907 0 3 0x4000082 thrsleep syz-fuzzer
93495 350292 11907 0 3 0x4000082 thrsleep syz-fuzzer
93495 240003 11907 0 3 0x4000082 thrsleep syz-fuzzer
93495 357812 11907 0 3 0x4000082 thrsleep syz-fuzzer
93495 228237 11907 0 3 0x4000082 thrsleep syz-fuzzer
93495 230131 11907 0 3 0x4000082 thrsleep syz-fuzzer
93495 376943 11907 0 3 0x4000082 kqread syz-fuzzer
93495 263966 11907 0 3 0x4000082 thrsleep syz-fuzzer
11907 204567 99097 0 3 0x10008a pause ksh
99097 499343 43235 0 3 0x92 select sshd
67180 152687 1 0 3 0x100083 ttyin getty
43235 363062 1 0 3 0x80 select sshd
18094 523962 79405 74 3 0x100092 bpf pflogd
79405 511073 1 0 3 0x80 netio pflogd
58675 213090 68979 73 3 0x100090 kqread syslogd
68979 5725 1 0 3 0x100082 netio syslogd
66048 29406 1 77 3 0x100090 poll dhclient
72727 281921 1 0 7 0 dhclient
14804 78993 0 0 3 0x14200 bored smr
67873 299594 0 0 2 0x14200 zerothread
91219 480507 0 0 3 0x14200 aiodoned aiodoned
92243 140376 0 0 3 0x14200 syncer update
34783 486935 0 0 3 0x14200 cleaner cleaner
18588 39378 0 0 3 0x14200 reaper reaper
39521 41550 0 0 3 0x14200 pgdaemon pagedaemon
91534 90706 0 0 3 0x14200 bored crynlk
7177 207021 0 0 3 0x14200 bored crypto
41644 412700 0 0 3 0x40014200 acpi0 acpi0
46175 188781 0 0 3 0x40014200 idle1
47916 377407 0 0 3 0x14200 bored softnet
40311 282705 0 0 3 0x14200 bored systqmp
17752 511806 0 0 3 0x14200 bored systq
21312 41946 0 0 3 0x40014200 bored softclock
31643 91315 0 0 3 0x40014200 idle0
1 100069 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
Process 2142 (syz-executor.1) thread 0xffff800020ec64f8 (311666)
exclusive rrwlock inode r = 0 (0xfffffd806e3156f8)
#0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164
#1 rw_enter+0x453 sys/kern/kern_rwlock.c:311
#2 rrw_enter+0x88 sys/kern/kern_rwlock.c:462
#3 ufs_ihashins+0x45 sys/ufs/ufs/ufs_ihash.c:140
#4 ffs_vget+0x13e sys/ufs/ffs/ffs_vfsops.c:1358
#5 ffs_inode_alloc+0x1cf sys/ufs/ffs/ffs_alloc.c:392
#6 ufs_makeinode+0xaa sys/ufs/ufs/ufs_vnops.c:1830
#7 ufs_create+0x41 sys/ufs/ufs/ufs_vnops.c:152
#8 VOP_CREATE+0xc0 sys/kern/vfs_vops.c:112
#9 vn_open+0x2a4 sys/kern/vfs_vnops.c:122
#10 doopenat+0x28b sys/kern/vfs_syscalls.c:1141
#11 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#11 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570
#12 Xsyscall+0x128
exclusive rrwlock inode r = 0 (0xfffffd806b5a9918)
#0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164
#1 rw_enter+0x453 sys/kern/kern_rwlock.c:311
#2 rrw_enter+0x88 sys/kern/kern_rwlock.c:462
#3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:603
#4 vn_lock+0x81 sys/kern/vfs_vnops.c:575
#5 vfs_lookup+0xe6 sys/kern/vfs_lookup.c:419
#6 namei+0x63c sys/kern/vfs_lookup.c:249
#7 vn_open+0x1a6 sys/kern/vfs_vnops.c:113
#8 doopenat+0x28b sys/kern/vfs_syscalls.c:1141
#9 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#9 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570
#10 Xsyscall+0x128
Process 72727 (dhclient) thread 0xffff800020e6c278 (281921)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8266f830)
#0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164
#1 solock+0x66 sys/kern/uipc_socket2.c:292
#2 soreceive+0x114 sys/kern/uipc_socket.c:731
#3 soo_read+0x53 sys/kern/sys_socket.c:70
#4 dofilereadv+0x1a1 sys/kern/sys_generic.c:237
#5 sys_read+0x83 sys/kern/sys_generic.c:157
#6 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#6 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570
#7 Xsyscall+0x128
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 9495 6469K 6667K 78643K 10682 0
pcb 13 8K 8K 78643K 37 0
rtable 105 3K 3K 78643K 229 0
ifaddr 56 12K 12K 78643K 60 0
counters 43 33K 33K 78643K 43 0
ioctlops 0 0K 4K 78643K 1469 0
iov 0 0K 32K 78643K 8 0
mount 1 1K 1K 78643K 1 0
vnodes 1220 77K 77K 78643K 1260 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 5K 78643K 4 0
VM map 2 1K 1K 78643K 2 0
sem 8 0K 0K 78643K 10 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1809 196K 290K 78643K 12766 0
file desc 6 17K 25K 78643K 119 0
proc 61 63K 83K 78643K 445 0
subproc 32 2K 2K 78643K 34 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
ip_moptions 0 0K 0K 78643K 16 0
in_multi 40 2K 2K 78643K 55 0
ether_multi 1 0K 0K 78643K 6 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 43 201K 201K 78643K 43 0
exec 0 0K 1K 78643K 221 0
pagedep 1 8K 8K 78643K 1 0
inodedep 1 32K 32K 78643K 1 0
newblk 1 0K 0K 78643K 1 0
VM swap 7 26K 26K 78643K 7 0
UVM amap 138 23K 24K 78643K 1338 0
UVM aobj 12 2K 2K 78643K 12 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
ip6_options 0 0K 0K 78643K 21 0
NDP 8 0K 0K 78643K 12 0
temp 82 3037K 3101K 78643K 2407 0
kqueue 3 4K 8K 78643K 12 0
SYN cache 2 16K 16K 78643K 2 0
ddb{1}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
arp 64 7 0 1 1 0 1 1 0 8 0
plcache 128 20 0 0 1 0 1 1 0 8 0
rtpcb 80 23 0 21 1 0 1 1 0 8 0
rtentry 112 54 0 10 2 0 2 2 0 8 0
unpcb 120 45 0 35 1 0 1 1 0 8 0
syncache 264 4 0 4 1 1 0 1 0 8 0
tcpqe 32 62 0 62 1 1 0 1 0 8 0
tcpcb 544 96 0 92 2 0 2 2 0 8 1
inpcb 280 211 0 204 2 0 2 2 0 8 1
nd6 48 6 0 0 1 0 1 1 0 8 0
pffrag 232 2 0 2 1 0 1 1 0 482 1
pffrnode 88 2 0 2 1 0 1 1 0 8 1
pffrent 40 4 0 4 1 0 1 1 0 8 1
pfosfp 40 846 0 423 5 0 5 5 0 8 0
pfosfpen 112 1428 0 714 21 0 21 21 0 8 0
pfstitem 24 22 0 0 1 0 1 1 0 8 0
pfstkey 112 22 0 0 1 0 1 1 0 8 0
pfstate 328 22 0 0 2 0 2 2 0 8 0
pfrule 1360 21 0 16 2 1 1 2 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 217 0 19 13 0 13 13 0 8 0
art_table 32 218 0 19 2 0 2 2 0 8 0
art_node 16 53 0 13 1 0 1 1 0 8 0
sysvmsgpl 40 8 0 6 1 0 1 1 0 8 0
semupl 112 2 0 2 1 0 1 1 0 8 1
semapl 112 6 0 0 1 0 1 1 0 8 0
shmpl 112 10 0 0 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 1563 0 158 89 0 89 89 0 8 0
ffsino 272 1563 0 158 94 0 94 94 0 8 0
nchpl 144 1911 0 301 60 0 60 60 0 8 0
uvmvnodes 72 1630 0 0 30 0 30 30 0 8 0
vnodes 208 1630 0 0 86 0 86 86 0 8 0
namei 1024 5106 0 5105 1 0 1 1 0 8 0
percpumem 16 32 0 0 1 0 1 1 0 8 0
scxspl 192 4862 0 4861 4 1 3 3 0 8 2
plimitpl 152 25 0 17 1 0 1 1 0 8 0
sigapl 424 337 0 304 4 0 4 4 0 8 0
futexpl 56 1628 0 1627 1 0 1 1 0 8 0
knotepl 112 70 0 51 1 0 1 1 0 8 0
kqueuepl 144 23 0 21 1 0 1 1 0 8 0
pipelkpl 48 85 0 75 1 0 1 1 0 8 0
pipepl 120 170 0 151 1 0 1 1 0 8 0
fdescpl 496 319 0 302 3 0 3 3 0 8 0
filepl 152 1730 0 1626 5 0 5 5 0 8 1
lockfpl 104 27 0 25 1 0 1 1 0 8 0
lockfspl 48 12 0 10 1 0 1 1 0 8 0
sessionpl 112 18 0 7 1 0 1 1 0 8 0
pgrppl 48 18 0 7 1 0 1 1 0 8 0
ucredpl 96 112 0 103 1 0 1 1 0 8 0
zombiepl 144 304 0 304 1 0 1 1 0 8 1
processpl 984 337 0 304 5 0 5 5 0 8 0
procpl 624 553 0 507 4 0 4 4 0 8 0
sosppl 128 3 0 3 1 0 1 1 0 8 1
sockpl 400 280 0 261 4 0 4 4 0 8 2
mcl64k 65536 3 0 0 1 0 1 1 0 8 0
mcl12k 12288 3 0 0 1 0 1 1 0 8 0
mcl9k 9216 2 0 0 1 0 1 1 0 8 0
mcl8k 8192 1 0 0 1 0 1 1 0 8 0
mcl4k 4096 3 0 0 1 0 1 1 0 8 0
mcl2k 2048 199 0 0 24 0 24 24 0 8 0
mtagpl 80 5 0 0 1 0 1 1 0 8 0
mbufpl 256 217 0 0 13 0 13 13 0 8 0
bufpl 280 3323 0 146 227 0 227 227 0 8 0
anonpl 16 45924 0 30242 73 1 72 72 0 124 8
amapchunkpl 152 1661 0 1527 11 0 11 11 0 158 5
amappl16 192 1207 0 367 43 0 43 43 0 8 1
amappl15 184 1 0 0 1 0 1 1 0 8 0
amappl14 176 114 0 106 1 0 1 1 0 8 0
amappl13 168 114 0 108 1 0 1 1 0 8 0
amappl12 160 13 0 10 1 0 1 1 0 8 0
amappl11 152 55 0 40 1 0 1 1 0 8 0
amappl10 144 30 0 20 1 0 1 1 0 8 0
amappl9 136 409 0 406 1 0 1 1 0 8 0
amappl8 128 352 0 312 2 0 2 2 0 8 0
amappl7 120 122 0 108 1 0 1 1 0 8 0
amappl6 112 26 0 20 2 1 1 1 0 8 0
amappl5 104 216 0 199 1 0 1 1 0 8 0
amappl4 96 486 0 455 1 0 1 1 0 8 0
amappl3 88 115 0 108 1 0 1 1 0 8 0
amappl2 80 1688 0 1599 2 0 2 2 0 8 0
amappl1 72 18466 0 17914 23 11 12 18 0 8 1
amappl 80 796 0 751 2 0 2 2 0 84 0
dma4096 4096 1 0 1 1 1 0 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 64 11 0 0 1 0 1 1 0 8 0
uaddrrnd 24 319 0 302 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 319 0 302 1 0 1 1 0 8 0
vmmpekpl 168 10170 0 10138 2 0 2 2 0 8 0
vmmpepl 168 52229 0 49867 116 8 108 109 0 357 5
vmsppl 368 318 0 302 2 0 2 2 0 8 0
pdppl 4096 646 0 604 6 0 6 6 0 8 0
pvpl 32 173952 0 154204 180 0 180 180 0 265 19
pmappl 232 318 0 302 2 0 2 2 0 8 1
extentpl 40 46 0 29 1 0 1 1 0 8 0
phpool 112 263 0 3 8 0 8 8 0 8 0
ddb{1}> machine ddbcpu 0
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
x86_ipi_db(ffffffff824e5ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352
x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
__mp_lock(ffffffff8266f628) at __mp_lock+0x127 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff8266f628) at __mp_lock+0x127 sys/kern/kern_lock.c:147
intr_handler(ffff800020eacdd0,ffff800000075200) at intr_handler+0x5e sys/arch/amd64/amd64/intr.c:525
Xintr_ioapic_edge17_untramp() at Xintr_ioapic_edge17_untramp+0x19f
Xspllower() at Xspllower+0x19
cnputc(70) at cnputc+0x4c sys/dev/cons.c:239
kputchar(70,5,0) at kputchar+0x219 sys/kern/subr_prf.c:343
kprintf() at kprintf+0x15c sys/kern/subr_prf.c:700
printf(ffffffff821fe90c) at printf+0x74 sys/kern/subr_prf.c:506
panic(ffffffff821e37fe) at panic+0xc6 sys/kern/subr_prf.c:196
soreceive(fffffd806f6db000,0,ffff800020ead3e8,0,0,ffff800020ead2f4) at soreceive+0x174a sys/kern/uipc_socket.c:977
soo_read(fffffd80737f3000,ffff800020ead3e8,0) at soo_read+0x53 sys/kern/sys_socket.c:70
end trace frame: 0xffff800020ead3d0, count: 0
ddb{0}> trace
x86_ipi_db(ffffffff824e5ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352
x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
__mp_lock(ffffffff8266f628) at __mp_lock+0x127 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff8266f628) at __mp_lock+0x127 sys/kern/kern_lock.c:147
intr_handler(ffff800020eacdd0,ffff800000075200) at intr_handler+0x5e sys/arch/amd64/amd64/intr.c:525
Xintr_ioapic_edge17_untramp() at Xintr_ioapic_edge17_untramp+0x19f
Xspllower() at Xspllower+0x19
cnputc(70) at cnputc+0x4c sys/dev/cons.c:239
kputchar(70,5,0) at kputchar+0x219 sys/kern/subr_prf.c:343
kprintf() at kprintf+0x15c sys/kern/subr_prf.c:700
printf(ffffffff821fe90c) at printf+0x74 sys/kern/subr_prf.c:506
panic(ffffffff821e37fe) at panic+0xc6 sys/kern/subr_prf.c:196
soreceive(fffffd806f6db000,0,ffff800020ead3e8,0,0,ffff800020ead2f4) at soreceive+0x174a sys/kern/uipc_socket.c:977
soo_read(fffffd80737f3000,ffff800020ead3e8,0) at soo_read+0x53 sys/kern/sys_socket.c:70
dofilereadv(ffff800020e6c278,6,ffff800020ead3e8,0,ffff800020ead4d0) at dofilereadv+0x1a1 sys/kern/sys_generic.c:237
sys_read(ffff800020e6c278,ffff800020ead480,ffff800020ead4d0) at sys_read+0x83 sys/kern/sys_generic.c:157
syscall(ffff800020ead550) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff800020ead550) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffce690, count: -18
ddb{0}> machine ddbcpu 1
Stopped at db_enter+0x18: addq $0x8,%rsp
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff821f86fc) at panic+0x15c sys/kern/subr_prf.c:207
__assert(ffffffff8224e08e,ffffffff8223c642,29e,ffffffff8221bc9f) at __assert+0x2b sys/kern/subr_prf.c:154
proc_trampoline_mp() at proc_trampoline_mp+0x123
end trace frame: 0x0, count: 11
ddb{1}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff821f86fc) at panic+0x15c sys/kern/subr_prf.c:207
__assert(ffffffff8224e08e,ffffffff8223c642,29e,ffffffff8221bc9f) at __assert+0x2b sys/kern/subr_prf.c:154
proc_trampoline_mp() at proc_trampoline_mp+0x123
end trace frame: 0x0, count: -4