panic: vput: ref cnt Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *139615 95763 0 0 0x4000000 0K syz-executor.0 474345 89348 0 0 0x4000000 1 syz-executor.1 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(fffffd8064229230) at vput+0x14b sys/kern/vfs_subr.c:750 vn_close(fffffd8064229230,2,fffffd807f7c6ae0,ffff800020b28ee8) at vn_close+0xfb sys/kern/vfs_vnops.c:291 sys_acct(ffff800020b28ee8,ffff800023c1fd98,ffff800023c1fe00) at sys_acct+0x15b sys/kern/kern_acct.c:134 syscall(ffff800023c1fe70) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800023c1fe70) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,fffffffffffffec0,0,1,46ed7835010) at Xsyscall+0x128 end of kernel end trace frame: 0x471740ac640, 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(fffffd8064229230) at vput+0x14b sys/kern/vfs_subr.c:750 vn_close(fffffd8064229230,2,fffffd807f7c6ae0,ffff800020b28ee8) at vn_close+0xfb sys/kern/vfs_vnops.c:291 sys_acct(ffff800020b28ee8,ffff800023c1fd98,ffff800023c1fe00) at sys_acct+0x15b sys/kern/kern_acct.c:134 syscall(ffff800023c1fe70) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800023c1fe70) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,fffffffffffffec0,0,1,46ed7835010) at Xsyscall+0x128 end of kernel end trace frame: 0x471740ac640, count: -7 ddb{0}> show registers rdi 0xffffffff81e595e7 db_enter+0x17 rsi 0x388a __ALIGN_SIZE+0x288a rbp 0xffff800023c1fb10 rbx 0xffff800023c1fbc0 rdx 0x388b __ALIGN_SIZE+0x288b rcx 0xffff800022dfe000 rax 0xffff800022dfe000 r8 0xffffffff815a9073 kprintf+0x173 r9 0x1 r10 0x25 r11 0x5c0b6a115bd0bab5 r12 0x3000000008 r13 0xffff800023c1fb20 r14 0x100 r15 0x1 rip 0xffffffff81e595e8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800023c1fb00 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=139615 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff800020b28508,0xffffffff8236fbe0 process=0xffff800020b7dc00 user=0xffff800023c1a000, vmspace=0xfffffd807effe000 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 95763 114704 37296 0 2 0 syz-executor.0 *95763 139615 37296 0 7 0x4000000 syz-executor.0 89348 73266 54527 0 2 0 syz-executor.1 89348 474345 54527 0 7 0x4000000 syz-executor.1 68795 261507 0 0 3 0x14200 acct acct 54527 290176 38728 0 3 0x82 nanosleep syz-executor.1 37296 408344 38728 0 3 0x82 nanosleep syz-executor.0 15010 426321 0 0 3 0x14200 bored sosplice 38728 72209 73321 0 3 0x82 thrsleep syz-fuzzer 38728 443641 73321 0 3 0x4000082 thrsleep syz-fuzzer 38728 293438 73321 0 3 0x4000082 thrsleep syz-fuzzer 38728 490033 73321 0 3 0x4000082 thrsleep syz-fuzzer 38728 438938 73321 0 3 0x4000082 kqread syz-fuzzer 38728 310657 73321 0 3 0x4000082 thrsleep syz-fuzzer 38728 50619 73321 0 3 0x4000082 thrsleep syz-fuzzer 38728 506600 73321 0 3 0x4000082 thrsleep syz-fuzzer 38728 455001 73321 0 3 0x4000082 thrsleep syz-fuzzer 38728 6439 73321 0 3 0x4000082 thrsleep syz-fuzzer 73321 81622 36389 0 3 0x10008a pause ksh 36389 371481 34289 0 3 0x92 select sshd 94413 409169 1 0 3 0x100083 ttyin getty 34289 449007 1 0 3 0x80 select sshd 33816 139027 24207 74 3 0x100092 bpf pflogd 24207 25565 1 0 3 0x80 netio pflogd 35164 228700 6543 73 2 0x100090 syslogd 6543 339115 1 0 3 0x100082 netio syslogd 79801 432426 0 0 2 0x14200 zerothread 49207 500403 0 0 3 0x14200 aiodoned aiodoned 80635 455687 0 0 3 0x14200 syncer update 27251 418433 0 0 3 0x14200 cleaner cleaner 41555 230132 0 0 3 0x14200 reaper reaper 48474 229335 0 0 3 0x14200 pgdaemon pagedaemon 18176 465260 0 0 3 0x14200 bored crynlk 43376 172324 0 0 3 0x14200 bored crypto 11370 387969 0 0 3 0x40014200 acpi0 acpi0 46988 107312 0 0 3 0x40014200 idle1 78606 399952 0 0 3 0x14200 bored softnet 84812 282391 0 0 3 0x14200 bored systqmp 3539 463163 0 0 3 0x14200 bored systq 3129 108022 0 0 3 0x40014200 bored softclock 99413 88054 0 0 3 0x40014200 idle0 52278 487947 0 0 3 0x14200 bored smr 1 272276 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 95763 (syz-executor.0) thread 0xffff800020b28ee8 (139615) exclusive rrwlock inode r = 0 (0xfffffd80641401b0) #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 (0xffffffff823822f8) #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 9575 6374K 7250K 78643K 22990 0 0 pcb 13 8K 8K 78643K 690 0 0 rtable 112 12K 12K 78643K 1756 0 0 ifaddr 81 27K 35K 78643K 2060 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1811 0 0 iov 0 0K 28K 78643K 1012 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 77K 78643K 6986 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 51 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 606 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 25K 78643K 14670 0 0 sigio 0 0K 0K 78643K 55 0 0 proc 53 50K 83K 78643K 2555 0 0 subproc 32 2K 2K 78643K 170 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 512 0 0 in_multi 33 2K 2K 78643K 448 0 0 ether_multi 1 0K 0K 78643K 61 0 0 mrt 0 0K 0K 78643K 334 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 96 424K 424K 78643K 96 0 0 exec 0 0K 1K 78643K 1014 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 128 23K 39K 78643K 38911 0 0 UVM aobj 130 5K 5K 78643K 157 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 206 0 0 NDP 19 0K 1K 78643K 574 0 0 temp 222 2752K 2876K 78643K 618739 0 0 kqueue 0 0K 0K 78643K 190 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 25 0 19 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 251 0 251 10 10 0 1 0 8 0 rtentry 112 285 0 241 2 0 2 2 0 8 0 unpcb 120 1477 0 1469 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 166 0 166 12 12 0 1 0 8 0 tcpcb 544 789 0 785 1 0 1 1 0 8 0 inpcb 280 4427 0 4415 2 0 2 2 0 8 0 rttmr 72 143 0 143 6 6 0 1 0 8 0 nd6 48 31 0 25 1 0 1 1 0 8 0 pkpcb 40 25 0 25 4 4 0 1 0 8 0 swfcl 56 1 0 0 1 0 1 1 0 8 0 ppxss 1128 499 0 499 14 14 0 1 0 8 0 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 473 0 468 3 2 1 3 0 8 0 pfstkey 112 473 0 468 11 10 1 11 0 8 0 pfstate 328 473 0 468 31 30 1 30 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 840 0 646 17 4 13 14 0 8 0 art_table 32 841 0 646 2 0 2 2 0 8 0 art_node 16 268 0 228 1 0 1 1 0 8 0 sysvmsgpl 40 22 0 0 1 0 1 1 0 8 0 semapl 112 604 0 594 1 0 1 1 0 8 0 shmpl 112 155 0 27 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 27093 0 25198 62 0 62 62 0 8 0 ffsino 272 27093 0 25198 128 1 127 127 0 8 0 nchpl 144 50945 0 49311 62 0 62 62 0 8 0 uvmvnodes 72 6902 0 0 126 0 126 126 0 8 0 vnodes 200 6902 0 0 364 0 364 364 0 8 0 namei 1024 135230 0 135230 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 17 0 17 6 6 0 1 0 8 0 scxspl 192 141810 0 141810 36 35 1 6 0 8 1 plimitpl 152 430 0 423 1 0 1 1 0 8 0 sigapl 432 14846 0 14832 3 1 2 3 0 8 0 futexpl 56 112498 0 112498 2 1 1 1 0 8 1 knotepl 112 1286 0 1267 1 0 1 1 0 8 0 kqueuepl 104 1329 0 1327 1 0 1 1 0 8 0 pipepl 112 3300 0 3281 3 2 1 2 0 8 0 fdescpl 488 14847 0 14832 3 0 3 3 0 8 0 filepl 152 60369 0 60278 20 16 4 6 0 8 0 lockfpl 104 3875 0 3875 17 16 1 1 0 8 1 lockfspl 48 1309 0 1309 17 16 1 1 0 8 1 sessionpl 112 26 0 17 1 0 1 1 0 8 0 pgrppl 48 92 0 83 1 0 1 1 0 8 0 ucredpl 96 9841 0 9833 1 0 1 1 0 8 0 zombiepl 144 14840 0 14840 2 1 1 1 0 8 1 processpl 896 14872 0 14840 4 0 4 4 0 8 0 procpl 632 37534 0 37491 20 16 4 5 0 8 0 srpgc 64 137 0 137 10 10 0 1 0 8 0 sosppl 128 80 0 80 6 5 1 1 0 8 1 sockpl 384 6218 0 6206 14 12 2 4 0 8 0 mcl64k 65536 511 0 0 64 13 51 64 0 8 1 mcl16k 16384 23 0 0 3 1 2 3 0 8 0 mcl12k 12288 25 0 0 2 0 2 2 0 8 0 mcl9k 9216 33 0 0 3 1 2 2 0 8 0 mcl8k 8192 33 0 0 4 1 3 3 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 9 0 0 1 0 1 1 0 8 0 mcl2k 2048 346 0 0 12 3 9 12 0 8 0 mtagpl 80 83 0 0 2 0 2 2 0 8 0 mbufpl 256 1030 0 0 43 0 43 43 0 8 0 bufpl 256 47424 0 40395 440 0 440 440 0 8 0 anonpl 16 1060739 0 1055404 184 161 23 50 0 125 0 amapchunkpl 152 64439 0 64351 36 32 4 14 0 158 0 amappl16 192 64784 0 64521 144 130 14 31 0 8 0 amappl15 184 3964 0 3963 3 2 1 1 0 8 0 amappl14 176 6444 0 6438 1 0 1 1 0 8 0 amappl13 168 153 0 153 2 2 0 1 0 8 0 amappl12 160 6105 0 6102 1 0 1 1 0 8 0 amappl11 152 611 0 600 1 0 1 1 0 8 0 amappl10 144 499 0 492 1 0 1 1 0 8 0 amappl9 136 1558 0 1554 1 0 1 1 0 8 0 amappl8 128 1202 0 1150 2 0 2 2 0 8 0 amappl7 120 481 0 471 1 0 1 1 0 8 0 amappl6 112 577 0 566 1 0 1 1 0 8 0 amappl5 104 6402 0 6390 1 0 1 1 0 8 0 amappl4 96 9197 0 9163 2 1 1 2 0 8 0 amappl3 88 8958 0 8948 1 0 1 1 0 8 0 amappl2 80 120449 0 120370 3 1 2 3 0 8 0 amappl1 72 282456 0 282033 26 16 10 20 0 8 0 amappl 80 37945 0 37911 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 156 0 27 3 0 3 3 0 8 0 uaddrrnd 24 14847 0 14832 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 14847 0 14832 1 0 1 1 0 8 0 vmmpekpl 168 74822 0 74793 2 0 2 2 0 8 0 vmmpepl 168 1700644 0 1699183 197 131 66 81 0 357 0 vmsppl 368 14846 0 14832 2 0 2 2 0 8 0 pdppl 4096 29702 0 29664 6 0 6 6 0 8 0 pvpl 32 3272140 0 3263572 418 348 70 130 0 265 0 pmappl 232 14846 0 14832 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 734 0 28 21 0 21 21 0 8 0