panic: kernel diagnostic assertion "p == curproc" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/vfs_vops.c", line 169 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 53573 84873 0 0 0x4000000 0 syz-executor.0 *316887 94760 0 0x14000 0x200 1K systq db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff821f472c) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8224a9ea,ffffffff8224bf14,a9,ffffffff8222a32f) at __assert+0x2b sys/kern/subr_prf.c:154 VOP_CLOSE(fffffd8063e3c418,1,fffffd807f7bf7e0,0) at VOP_CLOSE+0x12f sys/kern/vfs_vops.c:170 vn_closefile(fffffd8067e66ee0,0) at vn_closefile+0xd7 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8067e66ee0,0) at vn_closefile+0xd7 sys/kern/vfs_vnops.c:614 fdrop(fffffd8067e66ee0,0) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd8067e66ee0,0) at closef+0x11c sys/kern/kern_descrip.c:1260 unp_gc(0) at unp_gc+0x172 sys/kern/uipc_usrreq.c:944 taskq_thread(ffffffff8248bfb0) at taskq_thread+0x9c sys/kern/kern_task.c:369 end trace frame: 0x0, count: 6 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 kernel diagnostic assertion "p == curproc" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/vfs_vops.c", line 169 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff821f472c) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8224a9ea,ffffffff8224bf14,a9,ffffffff8222a32f) at __assert+0x2b sys/kern/subr_prf.c:154 VOP_CLOSE(fffffd8063e3c418,1,fffffd807f7bf7e0,0) at VOP_CLOSE+0x12f sys/kern/vfs_vops.c:170 vn_closefile(fffffd8067e66ee0,0) at vn_closefile+0xd7 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8067e66ee0,0) at vn_closefile+0xd7 sys/kern/vfs_vnops.c:614 fdrop(fffffd8067e66ee0,0) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd8067e66ee0,0) at closef+0x11c sys/kern/kern_descrip.c:1260 unp_gc(0) at unp_gc+0x172 sys/kern/uipc_usrreq.c:944 taskq_thread(ffffffff8248bfb0) at taskq_thread+0x9c sys/kern/kern_task.c:369 end trace frame: 0x0, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020a2d370 rbx 0xffff800020a2d420 rdx 0xffff800020a189c0 rcx 0 rax 0 r8 0xffffffff81e1786f kprintf+0x16f r9 0x1 r10 0x25 r11 0x9de215242e3e74f3 r12 0x3000000008 r13 0xffff800020a2d380 r14 0x100 r15 0x1 rip 0xffffffff81f88cf8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020a2d360 ss 0 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (systq) pid=316887 stat=onproc flags process=14000 proc=200 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020a18c30,0xffff800020a184f0 process=0xffff800020a1a7b0 user=0xffff800020a28000, vmspace=0xffffffff82648778 estcpu=0, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 84873 202957 79083 0 2 0 syz-executor.0 84873 53573 79083 0 7 0x4000000 syz-executor.0 11056 77329 43472 0 3 0x82 nanosleep syz-executor.1 79083 258210 43472 0 3 0x82 nanosleep syz-executor.0 35641 91843 0 0 3 0x14200 bored sosplice 43472 315140 92500 0 3 0x82 thrsleep syz-fuzzer 43472 306603 92500 0 3 0x4000082 nanosleep syz-fuzzer 43472 464479 92500 0 3 0x4000082 kqread syz-fuzzer 43472 1355 92500 0 3 0x4000082 thrsleep syz-fuzzer 43472 301097 92500 0 3 0x4000082 thrsleep syz-fuzzer 43472 256477 92500 0 3 0x4000082 thrsleep syz-fuzzer 43472 491574 92500 0 3 0x4000082 thrsleep syz-fuzzer 43472 299555 92500 0 3 0x4000082 thrsleep syz-fuzzer 43472 283939 92500 0 3 0x4000082 thrsleep syz-fuzzer 43472 262394 92500 0 3 0x4000082 thrsleep syz-fuzzer 43472 430179 92500 0 3 0x4000082 thrsleep syz-fuzzer 92500 52187 29413 0 3 0x10008a pause ksh 29413 508692 61354 0 3 0x92 select sshd 97577 154788 1 0 3 0x100083 ttyin getty 61354 486941 1 0 3 0x80 select sshd 39185 415461 69613 74 3 0x100092 bpf pflogd 69613 272117 1 0 3 0x80 netio pflogd 63816 20599 94425 73 3 0x100090 kqread syslogd 94425 291675 1 0 3 0x100082 netio syslogd 79461 261902 1 77 3 0x100090 poll dhclient 83445 320145 1 0 3 0x80 poll dhclient 53312 86005 0 0 3 0x14200 bored smr 95540 125712 0 0 3 0x14200 pgzero zerothread 70350 273485 0 0 3 0x14200 aiodoned aiodoned 97505 479829 0 0 3 0x14200 syncer update 86638 60117 0 0 3 0x14200 cleaner cleaner 28104 12999 0 0 3 0x14200 reaper reaper 25366 138228 0 0 3 0x14200 pgdaemon pagedaemon 56149 499408 0 0 3 0x14200 bored crynlk 50684 337529 0 0 3 0x14200 bored crypto 70749 517527 0 0 3 0x40014200 acpi0 acpi0 72968 207244 0 0 3 0x40014200 idle1 33447 93684 0 0 3 0x14200 bored softnet 63838 240239 0 0 3 0x14200 bored systqmp *94760 316887 0 0 7 0x14200 systq 22318 418105 0 0 3 0x40014200 bored softclock 46648 120724 0 0 3 0x40014200 idle0 1 31905 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 94760 (systq) thread 0xffff800020a189c0 (316887) exclusive rrwlock inode r = 0 (0xfffffd806e5fe808) #0 witness_lock+0x4c5 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:613 #4 vn_lock+0x81 sys/kern/vfs_vnops.c:575 #5 vn_closefile+0xc6 vn_close sys/kern/vfs_vnops.c:298 [inline] #5 vn_closefile+0xc6 sys/kern/vfs_vnops.c:614 #6 fdrop+0xc2 sys/kern/kern_descrip.c:1276 #7 closef+0x11c sys/kern/kern_descrip.c:1260 #8 unp_gc+0x172 sys/kern/uipc_usrreq.c:944 #9 taskq_thread+0x9c sys/kern/kern_task.c:369 #10 proc_trampoline+0x1c shared rwlock systq r = 0 (0xffffffff8248c010) #0 witness_lock+0x4c5 sys/kern/subr_witness.c:1164 #1 taskq_thread+0x8f sys/kern/kern_task.c:368 #2 proc_trampoline+0x1c exclusive kernel_lock &kernel_lock r = 1 (0xffffffff8267f3f0) #0 witness_lock+0x4c5 sys/kern/subr_witness.c:1164 #1 __mp_acquire_count+0x51 sys/kern/kern_lock.c:227 #2 mi_switch+0x392 sys/kern/sched_bsd.c:435 #3 sleep_finish+0x113 sys/kern/kern_synch.c:417 #4 sleep_finish_all+0x32 sleep_finish_timeout sys/kern/kern_synch.c:446 [inline] #4 sleep_finish_all+0x32 sys/kern/kern_synch.c:206 #5 msleep+0x20e sys/kern/kern_synch.c:273 #6 taskq_next_work+0xbe sys/kern/kern_task.c:323 #7 taskq_thread+0xe5 sys/kern/kern_task.c:366 #8 proc_trampoline+0x1c ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9548 6428K 6810K 78643K 11258 0 pcb 15 8K 8K 78643K 216 0 rtable 90 3K 3K 78643K 2748 0 ifaddr 94 17K 18K 78643K 459 0 counters 43 33K 34K 78643K 65 0 ioctlops 0 0K 4K 78643K 1529 0 iov 0 0K 32K 78643K 89 0 mount 1 1K 1K 78643K 1 0 vnodes 1237 78K 78K 78643K 1475 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 14 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 1K 78643K 98 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 196K 290K 78643K 12766 0 file desc 7 21K 29K 78643K 1362 0 sigio 0 0K 0K 78643K 19 0 proc 62 63K 83K 78643K 578 0 subproc 47 2K 3K 78643K 68 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 57 0 in_multi 89 4K 4K 78643K 1611 0 ether_multi 1 0K 0K 78643K 21 0 mrt 0 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 73 334K 334K 78643K 73 0 exec 0 0K 1K 78643K 288 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 130 144K 144K 78643K 5146 0 UVM aobj 42 3K 3K 78643K 45 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 1K 78643K 996 0 NDP 15 0K 0K 78643K 325 0 temp 144 3044K 3118K 78643K 11211 0 kqueue 3 4K 9K 78643K 28 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 11 0 5 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 71 0 69 1 0 1 1 0 8 0 rtentry 112 1238 0 1203 2 0 2 2 0 8 0 unpcb 120 353 0 325 1 0 1 1 0 8 0 syncache 264 8 0 8 2 2 0 1 0 8 0 tcpqe 32 340 0 340 1 1 0 1 0 8 0 tcpcb 544 895 0 889 1 0 1 1 0 8 0 inpcb 280 4145 0 4129 3 1 2 2 0 8 0 nd6 48 304 0 298 1 0 1 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 3 0 3 1 1 0 1 0 8 0 pffrag 232 9 0 9 2 2 0 1 0 482 0 pffrnode 88 9 0 9 2 2 0 1 0 8 0 pffrent 40 277 0 277 2 2 0 1 0 8 0 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 76 0 43 1 0 1 1 0 8 0 pfstkey 112 76 0 43 1 0 1 1 0 8 0 pfstate 328 76 0 43 3 0 3 3 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 7330 0 7144 18 6 12 13 0 8 0 art_table 32 7332 0 7144 2 0 2 2 0 8 0 art_node 16 1237 0 1206 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 11 1 0 1 1 0 8 0 semapl 112 86 0 76 1 0 1 1 0 8 0 shmpl 112 43 0 4 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2967 0 1558 46 0 46 46 0 8 0 ffsino 272 2967 0 1558 95 0 95 95 0 8 0 nchpl 144 4823 0 3211 61 0 61 61 0 8 0 uvmvnodes 72 3189 0 0 58 0 58 58 0 8 0 vnodes 208 3189 0 0 168 0 168 168 0 8 0 namei 1024 12422 0 12422 2 1 1 1 0 8 1 percpumem 16 43 0 11 1 0 1 1 0 8 0 vcpupl 1984 11 0 0 2 0 2 2 0 8 0 vmpool 560 12 0 1 1 0 1 1 0 8 0 scxspl 192 15098 0 15098 12 11 1 7 0 8 1 plimitpl 152 60 0 51 1 0 1 1 0 8 0 sigapl 424 1574 0 1540 5 1 4 5 0 8 0 futexpl 56 21004 0 21004 2 1 1 1 0 8 1 knotepl 112 117 0 98 1 0 1 1 0 8 0 kqueuepl 144 627 0 623 1 0 1 1 0 8 0 pipelkpl 48 800 0 789 1 0 1 1 0 8 0 pipepl 120 1600 0 1579 2 1 1 2 0 8 0 fdescpl 496 1556 0 1538 3 0 3 3 0 8 0 filepl 152 10456 0 10288 11 4 7 8 0 8 0 lockfpl 104 157 0 156 1 0 1 1 0 8 0 lockfspl 48 53 0 52 1 0 1 1 0 8 0 sessionpl 112 20 0 8 1 0 1 1 0 8 0 pgrppl 48 22 0 10 1 0 1 1 0 8 0 ucredpl 96 452 0 443 1 0 1 1 0 8 0 zombiepl 144 1542 0 1540 1 0 1 1 0 8 0 processpl 984 1574 0 1540 5 0 5 5 0 8 0 procpl 624 4270 0 4225 4 0 4 4 0 8 0 sosppl 128 12 0 12 2 1 1 1 0 8 1 sockpl 400 4573 0 4527 9 4 5 6 0 8 0 mcl64k 65536 17 0 0 3 0 3 3 0 8 0 mcl16k 16384 4 0 0 1 0 1 1 0 8 0 mcl12k 12288 10 0 0 1 0 1 1 0 8 0 mcl9k 9216 7 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 8 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 282 0 0 35 1 34 35 0 8 0 mtagpl 80 26 0 0 1 0 1 1 0 8 0 mbufpl 256 686 0 0 43 0 43 43 0 8 0 bufpl 280 8344 0 2079 448 0 448 448 0 8 0 anonpl 16 135680 0 116764 80 4 76 77 0 124 0 amapchunkpl 152 8324 0 8164 14 6 8 13 0 158 1 amappl16 192 6926 0 5871 60 7 53 53 0 8 0 amappl15 184 9 0 8 2 1 1 1 0 8 0 amappl14 176 91 0 88 3 2 1 1 0 8 0 amappl13 168 39 0 37 1 0 1 1 0 8 0 amappl12 160 586 0 586 2 2 0 1 0 8 0 amappl11 152 78 0 60 1 0 1 1 0 8 0 amappl10 144 558 0 550 1 0 1 1 0 8 0 amappl9 136 480 0 474 1 0 1 1 0 8 0 amappl8 128 434 0 415 1 0 1 1 0 8 0 amappl7 120 671 0 656 1 0 1 1 0 8 0 amappl6 112 28 0 24 1 0 1 1 0 8 0 amappl5 104 1440 0 1422 1 0 1 1 0 8 0 amappl4 96 535 0 503 2 1 1 2 0 8 0 amappl3 88 136 0 131 1 0 1 1 0 8 0 amappl2 80 11997 0 11910 3 1 2 3 0 8 0 amappl1 72 41436 0 40946 26 16 10 20 0 8 0 amappl 80 4563 0 4504 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 44 0 3 1 0 1 1 0 8 0 uaddrrnd 24 1568 0 1539 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1568 0 1539 1 0 1 1 0 8 0 vmmpekpl 168 17073 0 17036 2 0 2 2 0 8 0 vmmpepl 168 191390 0 188958 140 22 118 124 0 357 12 vmsppl 368 1567 0 1539 4 1 3 3 0 8 0 pdppl 4096 3144 0 3089 8 0 8 8 0 8 1 pvpl 32 435695 0 412968 191 7 184 185 0 265 0 pmappl 232 1567 0 1539 2 0 2 2 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 234 0 16 7 0 7 7 0 8 0