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 81943 4849 0 0x10 0x4000000 0 syz-executor.1 * 78196 1016 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(fffffd80660425d0,1,fffffd807f7bf8a0,0) at VOP_CLOSE+0x12f sys/kern/vfs_vops.c:170 vn_closefile(fffffd8065c21d30,0) at vn_closefile+0xd7 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8065c21d30,0) at vn_closefile+0xd7 sys/kern/vfs_vnops.c:614 fdrop(fffffd8065c21d30,0) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd8065c21d30,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(fffffd80660425d0,1,fffffd807f7bf8a0,0) at VOP_CLOSE+0x12f sys/kern/vfs_vops.c:170 vn_closefile(fffffd8065c21d30,0) at vn_closefile+0xd7 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8065c21d30,0) at vn_closefile+0xd7 sys/kern/vfs_vnops.c:614 fdrop(fffffd8065c21d30,0) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd8065c21d30,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 0xffff800020a2da50 rbx 0xffff800020a2db00 rdx 0xffff800020a19380 rcx 0 rax 0 r8 0xffffffff81e1786f kprintf+0x16f r9 0x1 r10 0x25 r11 0xdbf681512a7528eb r12 0x3000000008 r13 0xffff800020a2da60 r14 0x100 r15 0x1 rip 0xffffffff81f88cf8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020a2da40 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (systq) pid=78196 stat=onproc flags process=14000 proc=200 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020a195f0,0xffff800020a19120 process=0xffff800020a1a3d8 user=0xffff800020a28000, vmspace=0xffffffff82648778 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 27864 276728 16164 0 2 0 syz-executor.0 27864 39329 16164 0 3 0x4000000 biowait syz-executor.0 4849 452106 89765 0 2 0x10 syz-executor.1 4849 81943 89765 0 7 0x4000010 syz-executor.1 16164 233666 50743 0 3 0x82 nanosleep syz-executor.0 4170 225822 0 0 3 0x14200 bored sosplice 89765 183519 50743 0 3 0x82 nanosleep syz-executor.1 50743 399949 35056 0 3 0x82 thrsleep syz-fuzzer 50743 161811 35056 0 3 0x4000082 thrsleep syz-fuzzer 50743 308931 35056 0 3 0x4000082 thrsleep syz-fuzzer 50743 503515 35056 0 3 0x4000082 thrsleep syz-fuzzer 50743 169436 35056 0 3 0x4000082 kqread syz-fuzzer 50743 105379 35056 0 3 0x4000082 thrsleep syz-fuzzer 50743 48756 35056 0 3 0x4000082 thrsleep syz-fuzzer 50743 499525 35056 0 3 0x4000082 thrsleep syz-fuzzer 50743 488195 35056 0 3 0x4000082 thrsleep syz-fuzzer 50743 53849 35056 0 3 0x4000082 thrsleep syz-fuzzer 35056 285012 65654 0 3 0x10008a pause ksh 65654 174136 40413 0 3 0x92 select sshd 18209 209795 1 0 3 0x100083 ttyin getty 40413 325368 1 0 3 0x80 select sshd 57912 465372 54659 74 3 0x100092 bpf pflogd 54659 186796 1 0 3 0x80 netio pflogd 63932 360887 73327 73 3 0x100090 kqread syslogd 73327 212333 1 0 3 0x100082 netio syslogd 65925 313075 1 77 3 0x100090 poll dhclient 76255 67136 1 0 3 0x80 poll dhclient 87646 505051 0 0 3 0x14200 bored smr 98497 500492 0 0 2 0x14200 zerothread 41544 441455 0 0 3 0x14200 aiodoned aiodoned 91988 505382 0 0 3 0x14200 syncer update 3559 505590 0 0 3 0x14200 cleaner cleaner 67508 368661 0 0 3 0x14200 reaper reaper 56171 120532 0 0 3 0x14200 pgdaemon pagedaemon 73076 161037 0 0 3 0x14200 bored crynlk 33440 131992 0 0 3 0x14200 bored crypto 21119 61048 0 0 3 0x40014200 acpi0 acpi0 39718 350297 0 0 3 0x40014200 idle1 62424 114927 0 0 3 0x14200 bored softnet 12247 263891 0 0 3 0x14200 bored systqmp * 1016 78196 0 0 7 0x14200 systq 43242 296653 0 0 3 0x40014200 bored softclock 11800 454917 0 0 3 0x40014200 idle0 1 190596 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 27864 (syz-executor.0) thread 0xffff800020af29d8 (39329) exclusive rrwlock inode r = 0 (0xfffffd80644634e0) #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 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_mknod+0x4e sys/ufs/ufs/ufs_vnops.c:172 #8 VOP_MKNOD+0xc6 sys/kern/vfs_vops.c:134 #9 domknodat+0x31e sys/kern/vfs_syscalls.c:1633 #10 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] #10 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 #11 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd80644633d0) #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 vfs_lookup+0xe6 sys/kern/vfs_lookup.c:419 #6 namei+0x63c sys/kern/vfs_lookup.c:249 #7 domknodat+0x92 sys/kern/vfs_syscalls.c:1585 #8 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] #8 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 #9 Xsyscall+0x128 Process 1016 (systq) thread 0xffff800020a19380 (78196) exclusive rrwlock inode r = 0 (0xfffffd8064463f80) #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 9536 6548K 6800K 78643K 11049 0 pcb 13 8K 8K 78643K 90 0 rtable 86 3K 4K 78643K 313 0 ifaddr 85 16K 17K 78643K 120 0 counters 43 33K 34K 78643K 53 0 ioctlops 0 0K 4K 78643K 1500 0 iov 0 0K 16K 78643K 60 0 mount 1 1K 1K 78643K 1 0 vnodes 1214 76K 77K 78643K 1381 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 12 0K 1K 78643K 38 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 196K 290K 78643K 12766 0 file desc 6 17K 25K 78643K 318 0 sigio 0 0K 0K 78643K 4 0 proc 62 63K 95K 78643K 521 0 subproc 32 2K 2K 78643K 51 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 1054 0 in_multi 80 4K 4K 78643K 132 0 ether_multi 1 0K 0K 78643K 15 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 55 254K 254K 78643K 55 0 exec 0 0K 1K 78643K 265 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 115 87K 87K 78643K 2016 0 UVM aobj 13 2K 2K 78643K 14 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 56 0 NDP 13 0K 0K 78643K 24 0 temp 96 3036K 3116K 78643K 12692 0 kqueue 3 4K 9K 78643K 19 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 10 0 4 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 39 0 37 1 0 1 1 0 8 0 rtentry 112 63 0 30 2 0 2 2 0 8 0 unpcb 120 159 0 144 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 129 0 129 1 1 0 1 0 8 0 tcpcb 544 145 0 141 2 1 1 2 0 8 0 inpcb 280 866 0 856 3 1 2 3 0 8 1 nd6 48 9 0 3 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 ppxss 1128 3 0 3 1 0 1 1 0 8 1 pffrag 232 3 0 3 1 1 0 1 0 482 0 pffrnode 88 3 0 3 1 1 0 1 0 8 0 pffrent 40 6 0 6 1 1 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 45 0 2 1 0 1 1 0 8 0 pfstkey 112 45 0 2 2 0 2 2 0 8 0 pfstate 328 45 0 2 4 0 4 4 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 278 0 118 12 0 12 12 0 8 1 art_table 32 279 0 118 2 0 2 2 0 8 0 art_node 16 62 0 35 1 0 1 1 0 8 0 semupl 112 4 0 4 1 0 1 1 0 8 1 semapl 112 26 0 16 1 0 1 1 0 8 0 shmpl 112 12 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1842 0 439 46 0 46 46 0 8 0 ffsino 272 1842 0 439 95 0 95 95 0 8 0 nchpl 144 2488 0 884 61 0 61 61 0 8 0 uvmvnodes 72 1993 0 0 37 0 37 37 0 8 0 vnodes 208 1993 0 0 105 0 105 105 0 8 0 namei 1024 6667 0 6666 1 0 1 1 0 8 0 percpumem 16 37 0 5 1 0 1 1 0 8 0 vcpupl 1984 6 0 0 1 0 1 1 0 8 0 vmpool 560 7 0 1 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 7992 0 7991 9 6 3 7 0 8 2 plimitpl 152 37 0 29 1 0 1 1 0 8 0 sigapl 424 531 0 498 4 0 4 4 0 8 0 futexpl 56 4922 0 4922 1 0 1 1 0 8 1 knotepl 112 82 0 63 1 0 1 1 0 8 0 kqueuepl 144 52 0 50 1 0 1 1 0 8 0 pipelkpl 48 126 0 116 1 0 1 1 0 8 0 pipepl 120 252 0 233 1 0 1 1 0 8 0 fdescpl 496 515 0 498 4 1 3 3 0 8 0 filepl 152 3255 0 3146 5 0 5 5 0 8 0 lockfpl 104 85 0 84 1 0 1 1 0 8 0 lockfspl 48 31 0 30 1 0 1 1 0 8 0 sessionpl 112 19 0 8 1 0 1 1 0 8 0 pgrppl 48 21 0 10 1 0 1 1 0 8 0 ucredpl 96 224 0 213 1 0 1 1 0 8 0 zombiepl 144 498 0 498 1 0 1 1 0 8 1 processpl 984 531 0 498 5 0 5 5 0 8 0 procpl 624 1208 0 1164 4 0 4 4 0 8 0 sosppl 128 5 0 5 2 1 1 1 0 8 1 sockpl 400 1068 0 1041 5 1 4 5 0 8 1 mcl64k 65536 15 0 0 2 0 2 2 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 5 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 170 0 0 21 0 21 21 0 8 0 mtagpl 80 12 0 0 1 0 1 1 0 8 0 mbufpl 256 462 0 0 28 0 28 28 0 8 0 bufpl 280 4936 0 178 340 0 340 340 0 8 0 anonpl 16 65311 0 51376 68 1 67 67 0 124 3 amapchunkpl 152 3135 0 2996 15 2 13 13 0 158 6 amappl16 192 2453 0 1655 52 4 48 52 0 8 8 amappl15 184 10 0 9 1 0 1 1 0 8 0 amappl14 176 3 0 2 2 1 1 1 0 8 0 amappl13 168 39 0 37 1 0 1 1 0 8 0 amappl12 160 79 0 77 2 1 1 1 0 8 0 amappl11 152 76 0 58 1 0 1 1 0 8 0 amappl10 144 148 0 140 1 0 1 1 0 8 0 amappl9 136 455 0 451 1 0 1 1 0 8 0 amappl8 128 384 0 366 1 0 1 1 0 8 0 amappl7 120 253 0 240 1 0 1 1 0 8 0 amappl6 112 26 0 24 1 0 1 1 0 8 0 amappl5 104 410 0 392 1 0 1 1 0 8 0 amappl4 96 524 0 492 1 0 1 1 0 8 0 amappl3 88 121 0 114 1 0 1 1 0 8 0 amappl2 80 3210 0 3131 3 1 2 3 0 8 0 amappl1 72 21463 0 21013 26 16 10 20 0 8 0 amappl 80 1471 0 1423 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 13 0 1 1 0 1 1 0 8 0 uaddrrnd 24 522 0 499 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 522 0 499 1 0 1 1 0 8 0 vmmpekpl 168 7817 0 7778 2 0 2 2 0 8 0 vmmpepl 168 70791 0 68748 125 14 111 113 0 357 22 vmsppl 368 521 0 499 3 0 3 3 0 8 0 pdppl 4096 1052 0 1004 8 1 7 7 0 8 0 pvpl 32 206351 0 189207 165 0 165 165 0 265 13 pmappl 232 521 0 499 2 0 2 2 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 192 0 6 6 0 6 6 0 8 0