panic: vput: ref cnt Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *139603 51223 0 0 0x4000000 0K syz-executor.1 53815 16125 0 0x2 0x480 1 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 vput(fffffd8063ec6338) at vput+0x14b sys/kern/vfs_subr.c:750 vn_close(fffffd8063ec6338,2,fffffd807f7c6900,ffff800020b23678) at vn_close+0xfb sys/kern/vfs_vnops.c:291 sys_acct(ffff800020b23678,ffff800021a0d2f8,ffff800021a0d360) at sys_acct+0x15b sys/kern/kern_acct.c:134 syscall(ffff800021a0d3d0) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800021a0d3d0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,fffffffffffffec0,0,1,f3aea84c010) at Xsyscall+0x128 end of kernel end trace frame: 0xf3d70900250, count: 8 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic vput: ref cnt ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 vput(fffffd8063ec6338) at vput+0x14b sys/kern/vfs_subr.c:750 vn_close(fffffd8063ec6338,2,fffffd807f7c6900,ffff800020b23678) at vn_close+0xfb sys/kern/vfs_vnops.c:291 sys_acct(ffff800020b23678,ffff800021a0d2f8,ffff800021a0d360) at sys_acct+0x15b sys/kern/kern_acct.c:134 syscall(ffff800021a0d3d0) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800021a0d3d0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,fffffffffffffec0,0,1,f3aea84c010) at Xsyscall+0x128 end of kernel end trace frame: 0xf3d70900250, count: -7 ddb{0}> show registers rdi 0xffffffff81010db7 db_enter+0x17 rsi 0x37cf __ALIGN_SIZE+0x27cf rbp 0xffff800021a0d070 rbx 0xffff800021a0d120 rdx 0x37d0 __ALIGN_SIZE+0x27d0 rcx 0xffff800023c42000 rax 0xffff800023c42000 r8 0xffffffff81f21ae3 kprintf+0x173 r9 0x1 r10 0x25 r11 0xa77189546a61c643 r12 0x3000000008 r13 0xffff800021a0d080 r14 0x100 r15 0x1 rip 0xffffffff81010db8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021a0d060 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=139603 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b222b8,0xffff800020b22f20 process=0xffff800020b7ce00 user=0xffff800021a08000, vmspace=0xfffffd807f00bcf0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 51223 463984 4059 0 2 0 syz-executor.1 *51223 139603 4059 0 7 0x4000000 syz-executor.1 51223 64068 4059 0 3 0x4000080 fsleep syz-executor.1 90700 461778 1 0 3 0x100083 ttyin getty 16125 53815 20832 0 7 0x482 syz-executor.0 4059 128353 20832 0 2 0x482 syz-executor.1 89978 191718 0 0 3 0x14200 acct acct 57015 78281 0 0 3 0x14200 bored sosplice 20832 58262 95918 0 3 0x82 thrsleep syz-fuzzer 20832 483804 95918 0 2 0x4000482 syz-fuzzer 20832 33949 95918 0 3 0x4000082 thrsleep syz-fuzzer 20832 291446 95918 0 3 0x4000082 thrsleep syz-fuzzer 20832 430153 95918 0 3 0x4000082 thrsleep syz-fuzzer 20832 96346 95918 0 3 0x4000082 kqread syz-fuzzer 20832 142486 95918 0 3 0x4000082 thrsleep syz-fuzzer 20832 168823 95918 0 3 0x4000082 thrsleep syz-fuzzer 20832 109117 95918 0 3 0x4000082 thrsleep syz-fuzzer 20832 12524 95918 0 3 0x4000082 thrsleep syz-fuzzer 95918 26627 71655 0 3 0x10008a pause ksh 71655 181802 76656 0 3 0x92 select sshd 76656 16086 1 0 3 0x80 select sshd 49504 209153 82625 74 3 0x100092 bpf pflogd 82625 31202 1 0 3 0x80 netio pflogd 92804 460546 27114 73 2 0x100090 syslogd 27114 417986 1 0 3 0x100082 netio syslogd 65856 25051 1 77 3 0x100090 poll dhclient 20619 283387 1 0 3 0x80 poll dhclient 96205 83809 0 0 3 0x14200 pgzero zerothread 68293 359744 0 0 3 0x14200 aiodoned aiodoned 59130 358127 0 0 3 0x14200 syncer update 38476 258006 0 0 3 0x14200 cleaner cleaner 65043 519365 0 0 3 0x14200 reaper reaper 23407 418231 0 0 3 0x14200 pgdaemon pagedaemon 15237 495823 0 0 3 0x14200 bored crynlk 79144 508595 0 0 3 0x14200 bored crypto 49099 91979 0 0 3 0x40014200 acpi0 acpi0 80730 17951 0 0 3 0x40014200 idle1 88514 138815 0 0 3 0x14200 bored softnet 2624 104087 0 0 3 0x14200 bored systqmp 1435 248228 0 0 3 0x14200 bored systq 97118 402118 0 0 3 0x40014200 bored softclock 93071 30926 0 0 3 0x40014200 idle0 88409 135372 0 0 3 0x14200 bored smr 1 416127 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 51223 (syz-executor.1) thread 0xffff800020b23678 (139603) exclusive rrwlock inode r = 0 (0xfffffd80699a7c50) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x46d sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #4 vn_close+0xb9 vn_lock sys/kern/vfs_vnops.c:561 [inline] #4 vn_close+0xb9 sys/kern/vfs_vnops.c:288 #5 sys_acct+0x15b sys/kern/kern_acct.c:134 #6 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #6 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #7 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823953d0) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 __mp_acquire_count+0x51 sys/kern/kern_lock.c:227 #2 mi_switch+0x38f sys/kern/sched_bsd.c:441 #3 sleep_finish+0x113 sys/kern/kern_synch.c:373 #4 rw_enter+0x366 sys/kern/kern_rwlock.c:282 #5 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #6 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #7 vn_close+0xb9 vn_lock sys/kern/vfs_vnops.c:561 [inline] #7 vn_close+0xb9 sys/kern/vfs_vnops.c:288 #8 sys_acct+0x15b sys/kern/kern_acct.c:134 #9 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #9 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #10 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9593 6576K 7044K 78643K 15863 0 0 pcb 13 8K 8K 78643K 173 0 0 rtable 108 4K 4K 78643K 835 0 0 ifaddr 80 17K 17K 78643K 311 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1585 0 0 iov 0 0K 24K 78643K 295 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1207 76K 77K 78643K 3094 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 17 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 216 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 2175 0 0 sigio 0 0K 0K 78643K 16 0 0 proc 54 51K 83K 78643K 950 0 0 subproc 32 2K 2K 78643K 138 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 209 0 0 in_multi 33 2K 2K 78643K 159 0 0 ether_multi 2 0K 0K 78643K 4 0 0 mrt 1 0K 0K 78643K 12 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 437 0 0 pfkey data 0 0K 4K 78643K 2 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 107 22K 23K 78643K 8076 0 0 UVM aobj 71 3K 3K 78643K 78 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 148 0 0 NDP 19 0K 0K 78643K 91 0 0 temp 221 2752K 2824K 78643K 24803 0 0 kqueue 0 0K 0K 78643K 14 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 20 0 14 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 110 0 108 1 0 1 1 0 8 0 rtentry 112 114 0 70 2 0 2 2 0 8 0 unpcb 120 641 0 631 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 9550 0 9550 1 1 0 1 0 8 0 tcpcb 544 409 0 405 1 0 1 1 0 8 0 inpcb 280 1128 0 1119 2 1 1 2 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 24 0 18 1 0 1 1 0 8 0 pkpcb 40 16 0 16 5 5 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 50 0 50 5 5 0 1 0 8 0 pffrag 232 3 0 3 2 1 1 1 0 482 1 pffrnode 88 3 0 3 2 1 1 1 0 8 1 pffrent 40 7 0 7 2 1 1 1 0 8 1 pfosfp 40 846 0 846 5 5 0 5 0 8 0 pfosfpen 112 1428 0 1428 21 21 0 21 0 8 0 pfstitem 24 73 0 50 1 0 1 1 0 8 0 pfstkey 112 73 0 50 1 0 1 1 0 8 0 pfstate 328 73 0 50 3 0 3 3 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 470 0 278 16 4 12 13 0 8 0 art_table 32 471 0 278 2 0 2 2 0 8 0 art_node 16 113 0 73 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 4 1 0 1 1 0 8 0 semapl 112 214 0 204 1 0 1 1 0 8 0 shmpl 112 76 0 7 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4763 0 3341 47 0 47 47 0 8 0 ffsino 272 4763 0 3341 96 0 96 96 0 8 0 nchpl 144 8001 0 6360 62 0 62 62 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 24938 0 24938 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 2 0 2 2 2 0 1 0 8 0 scxspl 192 24826 0 24826 16 14 2 6 0 8 2 plimitpl 152 186 0 178 1 0 1 1 0 8 0 sigapl 432 2360 0 2345 3 1 2 3 0 8 0 futexpl 56 25253 0 25252 1 0 1 1 0 8 0 knotepl 112 481 0 462 1 0 1 1 0 8 0 kqueuepl 104 437 0 435 1 0 1 1 0 8 0 pipepl 112 1274 0 1255 4 3 1 2 0 8 0 fdescpl 488 2361 0 2345 3 0 3 3 0 8 0 filepl 152 13494 0 13393 10 5 5 7 0 8 1 lockfpl 104 769 0 769 3 2 1 1 0 8 1 lockfspl 48 267 0 267 3 2 1 1 0 8 1 sessionpl 112 27 0 16 1 0 1 1 0 8 0 pgrppl 48 55 0 44 1 0 1 1 0 8 0 ucredpl 96 2428 0 2419 1 0 1 1 0 8 0 zombiepl 144 2345 0 2344 4 3 1 1 0 8 0 processpl 896 2378 0 2344 4 0 4 4 0 8 0 procpl 632 6977 0 6932 9 4 5 5 0 8 0 srpgc 64 13 0 13 7 7 0 1 0 8 0 sosppl 128 25 0 25 10 9 1 1 0 8 1 sockpl 384 1910 0 1889 6 3 3 4 0 8 0 mcl64k 65536 264 0 0 33 0 33 33 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 13 0 0 2 0 2 2 0 8 0 mcl9k 9216 17 0 0 2 0 2 2 0 8 0 mcl8k 8192 8 0 0 1 0 1 1 0 8 0 mcl4k 4096 8 0 0 1 0 1 1 0 8 0 mcl2k2 2112 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 174 0 0 21 2 19 21 0 8 2 mtagpl 80 32 0 0 1 0 1 1 0 8 0 mbufpl 256 484 0 0 22 0 22 22 0 8 0 bufpl 256 11339 0 4310 440 0 440 440 0 8 0 anonpl 16 224466 0 213231 101 42 59 65 0 125 5 amapchunkpl 152 13804 0 13695 23 17 6 10 0 158 1 amappl16 192 12094 0 11429 88 46 42 46 0 8 8 amappl14 176 103 0 98 1 0 1 1 0 8 0 amappl13 168 716 0 713 4 3 1 1 0 8 0 amappl12 160 18 0 14 1 0 1 1 0 8 0 amappl11 152 316 0 301 1 0 1 1 0 8 0 amappl10 144 88 0 84 1 0 1 1 0 8 0 amappl9 136 1279 0 1276 1 0 1 1 0 8 0 amappl8 128 833 0 803 2 0 2 2 0 8 0 amappl7 120 65 0 56 1 0 1 1 0 8 0 amappl6 112 306 0 296 1 0 1 1 0 8 0 amappl5 104 201 0 185 1 0 1 1 0 8 0 amappl4 96 2640 0 2611 1 0 1 1 0 8 0 amappl3 88 270 0 258 1 0 1 1 0 8 0 amappl2 80 17920 0 17848 4 2 2 3 0 8 0 amappl1 72 61648 0 61199 27 17 10 20 0 8 0 amappl 80 7319 0 7281 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 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 77 0 7 2 0 2 2 0 8 0 uaddrrnd 24 2361 0 2345 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2361 0 2345 1 0 1 1 0 8 0 vmmpekpl 168 22560 0 22525 2 0 2 2 0 8 0 vmmpepl 168 291545 0 289737 209 110 99 106 0 357 16 vmsppl 368 2360 0 2345 2 0 2 2 0 8 0 pdppl 4096 4730 0 4690 6 0 6 6 0 8 0 pvpl 32 638375 0 623434 224 80 144 160 0 265 17 pmappl 232 2360 0 2345 3 2 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 650 0 10 19 0 19 19 0 8 0