panic: kernel diagnostic assertion "p == curproc" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/vfs_vops.c", line 169 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 308074 5741 0 0x14000 0x200 0 reaper *472920 993 0 0x14000 0x200 1K systq db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff821efc13) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff82249f12,ffffffff822695b4,a9,ffffffff8222b23a) at __assert+0x2b sys/kern/subr_prf.c:154 VOP_CLOSE(fffffd807efc38f0,1,fffffd807f7bf8a0,0) at VOP_CLOSE+0x12f sys/kern/vfs_vops.c:170 vn_closefile(fffffd8068f28278,0) at vn_closefile+0xd7 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8068f28278,0) at vn_closefile+0xd7 sys/kern/vfs_vnops.c:614 fdrop(fffffd8068f28278,0) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd8068f28278,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(ffffffff8251f4f0) 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/setuid/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(ffffffff821efc13) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff82249f12,ffffffff822695b4,a9,ffffffff8222b23a) at __assert+0x2b sys/kern/subr_prf.c:154 VOP_CLOSE(fffffd807efc38f0,1,fffffd807f7bf8a0,0) at VOP_CLOSE+0x12f sys/kern/vfs_vops.c:170 vn_closefile(fffffd8068f28278,0) at vn_closefile+0xd7 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd8068f28278,0) at vn_closefile+0xd7 sys/kern/vfs_vnops.c:614 fdrop(fffffd8068f28278,0) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd8068f28278,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(ffffffff8251f4f0) 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 0xffff800020a2cf80 rbx 0xffff800020a2d030 rdx 0xffff800020a19110 rcx 0 rax 0 r8 0xffffffff810939af kprintf+0x16f r9 0x1 r10 0x25 r11 0x3910cf1a2d9d312d r12 0x3000000008 r13 0xffff800020a2cf90 r14 0x100 r15 0x1 rip 0xffffffff81146c58 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020a2cf70 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (systq) pid=472920 stat=onproc flags process=14000 proc=200 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020a195f0,0xffff800020a18eb0 process=0xffff800020a1a000 user=0xffff800020a28000, vmspace=0xffffffff8266bc88 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 24090 257487 68859 32767 3 0x90 nanosleep syz-executor.0 68859 491680 99236 0 3 0x82 wait syz-executor.0 32188 211058 86791 32767 3 0x90 nanosleep syz-executor.1 86791 279395 99236 0 3 0x82 wait syz-executor.1 75674 163226 0 0 3 0x14200 bored sosplice 99236 62508 63062 0 3 0x82 thrsleep syz-fuzzer 99236 80893 63062 0 3 0x4000082 thrsleep syz-fuzzer 99236 27751 63062 0 3 0x4000082 thrsleep syz-fuzzer 99236 267111 63062 0 3 0x4000082 kqread syz-fuzzer 99236 323506 63062 0 3 0x4000082 thrsleep syz-fuzzer 99236 478093 63062 0 3 0x4000082 thrsleep syz-fuzzer 99236 15362 63062 0 3 0x4000082 thrsleep syz-fuzzer 99236 251713 63062 0 3 0x4000082 thrsleep syz-fuzzer 99236 26695 63062 0 3 0x4000082 thrsleep syz-fuzzer 99236 157824 63062 0 3 0x4000082 thrsleep syz-fuzzer 63062 518157 90364 0 3 0x10008a pause ksh 90364 13925 81943 0 3 0x92 select sshd 7131 86272 1 0 3 0x100083 ttyin getty 81943 409355 1 0 3 0x80 select sshd 65650 506157 69524 73 3 0x100090 kqread syslogd 69524 330377 1 0 3 0x100082 netio syslogd 22667 435444 1 77 3 0x100090 poll dhclient 90824 324795 1 0 3 0x80 poll dhclient 8532 472495 0 0 3 0x14200 bored smr 47714 183462 0 0 3 0x14200 pgzero zerothread 86003 457436 0 0 3 0x14200 aiodoned aiodoned 96204 113381 0 0 3 0x14200 syncer update 76728 382760 0 0 3 0x14200 cleaner cleaner 5741 308074 0 0 7 0x14200 reaper 64271 216204 0 0 3 0x14200 pgdaemon pagedaemon 53694 234658 0 0 3 0x14200 bored crynlk 66647 492279 0 0 3 0x14200 bored crypto 79763 251355 0 0 3 0x40014200 acpi0 acpi0 62703 119457 0 0 3 0x40014200 idle1 95339 13174 0 0 3 0x14200 bored softnet 57913 188497 0 0 3 0x14200 bored systqmp * 993 472920 0 0 7 0x14200 systq 95159 130676 0 0 3 0x40014200 bored softclock 5253 422134 0 0 3 0x40014200 idle0 1 34282 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks CPU 0: exclusive mutex &uvm.fpageqlock r = 0 (0xffffffff82680018) #0 witness_lock+0x4c5 sys/kern/subr_witness.c:1164 #1 mtx_enter_try+0x102 #2 mtx_enter+0x4b sys/kern/kern_lock.c:266 #3 uvm_pmr_freepages+0x126 sys/uvm/uvm_pmemrange.c:1254 #4 pmap_do_remove+0x68b sys/arch/amd64/amd64/pmap.c:1871 #5 uvm_map_teardown+0x195 uvm_map_addr_RBT_LEFT sys/uvm/uvm_map.h:176 [inline] #5 uvm_map_teardown+0x195 sys/uvm/uvm_map.c:2739 #6 uvmspace_free+0x86 sys/uvm/uvm_map.c:3646 #7 uvm_exit+0x29 sys/uvm/uvm_glue.c:297 #8 reaper+0x189 sys/kern/kern_exit.c:456 #9 proc_trampoline+0x1c Process 993 (systq) thread 0xffff800020a19110 (472920) exclusive rrwlock inode r = 0 (0xfffffd807ecc44d8) #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 (0xffffffff8251f550) #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 (0xffffffff8263a520) #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 9468 6332K 6332K 78643K 10695 0 pcb 13 8K 8K 78643K 13 0 rtable 105 3K 3K 78643K 1586 0 ifaddr 39 10K 10K 78643K 283 0 counters 43 33K 33K 78643K 111 0 ioctlops 0 0K 2K 78643K 421 0 iov 0 0K 24K 78643K 83 0 mount 1 1K 1K 78643K 1 0 vnodes 1216 76K 76K 78643K 1820 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 5 0 VM map 2 1K 1K 78643K 2 0 sem 12 1K 1K 78643K 15 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 196K 290K 78643K 12766 0 file desc 6 17K 33K 78643K 1554 0 sigio 0 0K 0K 78643K 11 0 proc 48 50K 83K 78643K 1800 0 subproc 34 2K 2K 78643K 612 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 33 2K 2K 78643K 411 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 43 201K 201K 78643K 43 0 exec 0 0K 1K 78643K 713 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 105 21K 37K 78643K 5563 0 UVM aobj 94 3K 3K 78643K 95 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 23 0 NDP 7 0K 0K 78643K 111 0 temp 85 3045K 3109K 78643K 8600 0 kqueue 3 4K 12K 78643K 49 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 77 0 71 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 1301 0 1299 1 0 1 1 0 8 0 rtentry 112 424 0 380 2 0 2 2 0 8 0 unpcb 120 307 0 297 1 0 1 1 0 8 0 syncache 264 9 0 9 3 2 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 544 210 0 206 1 0 1 1 0 8 0 ipq 40 3 0 3 2 1 1 1 0 8 1 ipqe 40 137 0 137 2 1 1 1 0 8 1 inpcb 280 646 0 639 4 2 2 2 0 8 1 ip6q 72 2 0 2 1 1 0 1 0 8 0 ip6af 40 6 0 6 1 1 0 1 0 8 0 nd6 48 110 0 104 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1732 0 1538 14 1 13 13 0 8 0 art_table 32 1733 0 1538 2 0 2 2 0 8 0 art_node 16 423 0 383 1 0 1 1 0 8 0 sysvmsgpl 40 19 0 11 2 1 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 11 0 1 1 0 1 1 0 8 0 shmpl 112 93 0 1 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2601 0 1202 46 0 46 46 0 8 0 ffsino 272 2601 0 1202 94 0 94 94 0 8 0 nchpl 144 4310 0 2712 60 0 60 60 0 8 0 uvmvnodes 72 3222 0 0 59 0 59 59 0 8 0 vnodes 208 3222 0 0 170 0 170 170 0 8 0 namei 1024 14705 0 14705 1 0 1 1 0 8 1 percpumem 16 66 0 34 1 0 1 1 0 8 0 scxspl 192 13424 0 13424 12 9 3 7 0 8 3 plimitpl 152 154 0 145 1 0 1 1 0 8 0 sigapl 424 1640 0 1609 4 0 4 4 0 8 0 futexpl 56 10503 0 10503 1 0 1 1 0 8 1 knotepl 112 514 0 495 1 0 1 1 0 8 0 kqueuepl 144 690 0 688 1 0 1 1 0 8 0 pipelkpl 48 288 0 278 1 0 1 1 0 8 0 pipepl 120 576 0 557 1 0 1 1 0 8 0 fdescpl 496 1624 0 1609 3 0 3 3 0 8 1 filepl 152 7607 0 7507 6 1 5 5 0 8 0 lockfpl 104 83 0 82 1 0 1 1 0 8 0 lockfspl 48 34 0 33 1 0 1 1 0 8 0 sessionpl 112 51 0 41 1 0 1 1 0 8 0 pgrppl 48 53 0 43 1 0 1 1 0 8 0 ucredpl 96 565 0 556 1 0 1 1 0 8 0 zombiepl 144 1609 0 1607 1 0 1 1 0 8 0 processpl 984 1640 0 1607 5 0 5 5 0 8 0 procpl 624 3441 0 3399 4 0 4 4 0 8 0 sosppl 128 16 0 16 3 2 1 1 0 8 1 sockpl 400 2281 0 2262 5 2 3 4 0 8 0 mcl64k 65536 13 0 0 2 0 2 2 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 3 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 9 0 0 2 0 2 2 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 151 0 0 18 0 18 18 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 359 0 0 18 0 18 18 0 8 0 bufpl 280 6129 0 165 426 0 426 426 0 8 0 anonpl 16 162758 0 156644 58 25 33 47 0 124 0 amapchunkpl 152 13517 0 13415 33 27 6 18 0 158 1 amappl16 192 5800 0 5401 47 26 21 32 0 8 0 amappl15 184 9 0 8 1 0 1 1 0 8 0 amappl14 176 474 0 468 2 1 1 1 0 8 0 amappl13 168 479 0 478 1 0 1 1 0 8 0 amappl12 160 37 0 36 1 0 1 1 0 8 0 amappl11 152 232 0 219 1 0 1 1 0 8 0 amappl10 144 211 0 207 1 0 1 1 0 8 0 amappl9 136 473 0 468 1 0 1 1 0 8 0 amappl8 128 959 0 934 1 0 1 1 0 8 0 amappl7 120 519 0 503 1 0 1 1 0 8 0 amappl6 112 93 0 85 1 0 1 1 0 8 0 amappl5 104 1107 0 1096 1 0 1 1 0 8 0 amappl4 96 1197 0 1170 1 0 1 1 0 8 0 amappl3 88 588 0 583 1 0 1 1 0 8 0 amappl2 80 8715 0 8648 3 1 2 3 0 8 0 amappl1 72 50250 0 49809 26 17 9 20 0 8 0 amappl 80 4196 0 4157 1 0 1 1 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 94 0 1 2 0 2 2 0 8 0 uaddrrnd 24 1624 0 1609 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1624 0 1609 1 0 1 1 0 8 0 vmmpekpl 168 14190 0 14162 2 0 2 2 0 8 0 vmmpepl 168 207339 0 205778 103 24 79 90 0 357 5 vmsppl 368 1623 0 1608 2 0 2 2 0 8 0 pdppl 4096 3256 0 3216 6 0 6 6 0 8 1 pvpl 32 480714 0 471581 142 46 96 123 0 265 1 pmappl 232 1623 0 1608 3 2 1 2 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 175 0 5 5 0 5 5 0 8 0