panic: vref used where vget required Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 29175 79943 0 0x8000002 0 0 syz-executor.2 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828af709) at panic+0x165 sys/kern/subr_prf.c:198 vref(fffffd806c969638) at vref+0x83 sys/kern/vfs_subr.c:698 namei(ffff800033bb52b8) at namei+0x3b2 sys/kern/vfs_lookup.c:221 vn_open(ffff800033bb52b8,30001,0) at vn_open+0x101 sys/kern/vfs_vnops.c:140 doopenat(ffff80002a68a038,ffffff9c,7350fbadde60,30000,0,ffff800033bb5460) at doopenat+0x269 sys/kern/vfs_syscalls.c:1127 syscall(ffff800033bb5510) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7350fbadd960, count: 7 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: vref used where vget required ddb> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828af709) at panic+0x165 sys/kern/subr_prf.c:198 vref(fffffd806c969638) at vref+0x83 sys/kern/vfs_subr.c:698 namei(ffff800033bb52b8) at namei+0x3b2 sys/kern/vfs_lookup.c:221 vn_open(ffff800033bb52b8,30001,0) at vn_open+0x101 sys/kern/vfs_vnops.c:140 doopenat(ffff80002a68a038,ffffff9c,7350fbadde60,30000,0,ffff800033bb5460) at doopenat+0x269 sys/kern/vfs_syscalls.c:1127 syscall(ffff800033bb5510) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7350fbadd960, count: -8 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800033bb4f60 rbx 0xffff80002a68a038 rdx 0 rcx 0 rax 0xffff80002a68a038 r8 0x101010101010101 r9 0x8080808080808080 r10 0x9641196e13119be8 r11 0x43facf227d9beb4f r12 0 r13 0xfffffd806c969638 r14 0 r15 0x1 rip 0xffffffff81a4798c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff800033bb4f50 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb> show proc PROC (syz-executor.2) tid=29175 pid=79943 tcnt=1 stat=onproc flags process=8000002 proc=0 runpri=83, usrpri=83, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a68a558,0xffff80002db70d10 process=0xffff80003782c020 user=0xffff800033bb0000, vmspace=0xfffffd8071235018 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 30048 396820 122 0 2 0x8000000 syz-executor.0 26066 311762 82875 0 2 0x8000000 syz-executor.4 26066 108942 82875 0 3 0xc000080 fsleep syz-executor.4 42822 435383 93489 0 2 0x8000000 syz-executor.6 32805 184492 12367 0 2 0x8000000 syz-executor.1 32805 323354 12367 0 3 0xc000080 msgwait syz-executor.1 66793 301130 37646 0 3 0x8000080 nanoslp syz-executor.7 66793 483796 37646 0 3 0xc000080 ttyopn syz-executor.7 66793 116499 37646 0 3 0xc000080 fsleep syz-executor.7 69844 154106 7851 0 3 0x8000080 nanoslp syz-executor.3 69844 507273 7851 0 3 0xc000080 msgwait syz-executor.3 69844 276932 7851 0 3 0xc000080 fsleep syz-executor.3 17062 269878 71187 0 3 0x8000080 nanoslp syz-executor.5 17062 98879 71187 0 3 0xc000080 lockf syz-executor.5 17062 65280 71187 0 3 0xc000080 fsleep syz-executor.5 *79943 29175 16273 0 7 0x8000002 syz-executor.2 37646 471743 16273 0 3 0x8000082 nanoslp syz-executor.7 11393 363668 0 0 3 0x14280 nfsidl nfsio 401 53010 0 0 3 0x14280 nfsidl nfsio 52722 16425 0 0 3 0x14280 nfsidl nfsio 82512 260816 0 0 3 0x14280 nfsidl nfsio 64882 48280 0 0 3 0x14280 nfsidl nfsio 60916 14232 0 0 3 0x14280 nfsidl nfsio 14497 320220 0 0 3 0x14280 nfsidl nfsio 33085 475132 0 0 3 0x14280 nfsidl nfsio 18111 514847 0 0 3 0x14280 nfsidl nfsio 78056 249024 0 0 3 0x14280 nfsidl nfsio 39449 115998 0 0 3 0x14280 nfsidl nfsio 97320 250317 0 0 3 0x14280 nfsidl nfsio 55607 459121 0 0 3 0x14280 nfsidl nfsio 32099 273244 0 0 3 0x14280 nfsidl nfsio 12128 57791 0 0 3 0x14280 nfsidl nfsio 15662 42912 0 0 3 0x14280 nfsidl nfsio 38433 56348 0 0 3 0x14280 nfsidl nfsio 84491 162834 0 0 3 0x14280 nfsidl nfsio 15450 192903 0 0 3 0x14280 nfsidl nfsio 58471 97394 0 0 3 0x14280 nfsidl nfsio 20497 447797 0 0 3 0x14200 bored sosplice 71187 226425 16273 0 3 0x8000082 nanoslp syz-executor.5 7851 122680 16273 0 3 0x8000082 nanoslp syz-executor.3 82875 35821 16273 0 3 0x8000082 nanoslp syz-executor.4 93489 55052 16273 0 3 0x8000082 nanoslp syz-executor.6 12367 53666 16273 0 3 0x8000082 nanoslp syz-executor.1 122 504574 16273 0 3 0x8000082 nanoslp syz-executor.0 16273 63367 76413 0 3 0x1a000082 wait syz-fuzzer 16273 368933 76413 0 3 0x1e000082 nanoslp syz-fuzzer 16273 328174 76413 0 3 0x1e000082 wait syz-fuzzer 16273 267057 76413 0 3 0x1e000082 kqread syz-fuzzer 16273 424961 76413 0 3 0x1e000082 wait syz-fuzzer 16273 28907 76413 0 3 0x1e000082 wait syz-fuzzer 16273 288858 76413 0 3 0x1e000082 thrsleep syz-fuzzer 16273 273291 76413 0 3 0x1e000082 wait syz-fuzzer 16273 317665 76413 0 3 0x1e000082 thrsleep syz-fuzzer 16273 190463 76413 0 3 0x1e000082 thrsleep syz-fuzzer 16273 87476 76413 0 3 0x1e000082 wait syz-fuzzer 16273 661 76413 0 3 0x1e000082 wait syz-fuzzer 16273 464176 76413 0 3 0x1e000082 wait syz-fuzzer 76413 489525 22824 0 3 0x810008a sigsusp ksh 22824 48565 19804 0 3 0x1800009a kqread sshd 54576 149086 1 0 3 0x18100083 ttyin getty 19804 521960 1 0 3 0x18000088 kqread sshd 22140 332045 56976 73 3 0x19100090 kqread syslogd 56976 498237 1 0 3 0x18100082 sbwait syslogd 13897 375856 1 0 3 0x18100080 kqread resolvd 16828 90545 49201 77 3 0x18100092 kqread dhcpleased 29024 370374 49201 77 3 0x18100092 kqread dhcpleased 49201 370144 1 0 3 0x18000080 kqread dhcpleased 47536 2707 0 0 3 0x14200 bored smr 43525 263457 0 0 2 0x14200 zerothread 75434 5349 0 0 3 0x14200 aiodoned aiodoned 35131 96742 0 0 3 0x14200 syncer update 63780 9816 0 0 3 0x14200 cleaner cleaner 34714 407887 0 0 3 0x14200 reaper reaper 34475 333246 0 0 3 0x14200 pgdaemon pagedaemon 92450 141266 0 0 3 0x14200 bored viomb 54856 63941 0 0 3 0x40014200 acpi0 acpi0 20525 436832 0 0 3 0x14200 bored softnet3 6016 324492 0 0 3 0x14200 bored softnet2 49971 355473 0 0 3 0x14200 bored softnet1 94518 303862 0 0 3 0x14200 bored softnet0 37529 454670 0 0 3 0x14200 bored systqmp 10600 187594 0 0 3 0x14200 bored systq 71930 10934 0 0 3 0x40014200 tmoslp softclock 83045 33391 0 0 3 0x40014200 idle0 1 302196 0 0 3 0x8000082 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10193 6615K 6996K 166960K 12518 0 pcb 17 12K 12K 166960K 122 0 rtable 202 7K 8K 166960K 569 0 pf 33 9K 10K 166960K 73 0 ifaddr 42 11K 11K 166960K 81 0 ifgroup 58 2K 2K 166960K 124 0 sysctl 2 0K 0K 166960K 2 0 counters 32 17K 17K 166960K 48 0 ioctlops 0 0K 2K 166960K 77 0 iov 0 0K 16K 166960K 24 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1412 89K 89K 166960K 1967 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 9 0 VM map 2 1K 1K 166960K 2 0 sem 12 1K 1K 166960K 27 0 dirhash 12 2K 2K 166960K 24 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 17 61K 77K 166960K 625 0 sigio 1 0K 0K 166960K 16 0 proc 58 59K 83K 166960K 623 0 subproc 104 6K 7K 166960K 169 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 2 0K 0K 166960K 61 0 in_multi 88 6K 7K 166960K 175 0 ether_multi 1 0K 0K 166960K 5 0 mrt 2 0K 0K 166960K 5 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 85 387K 387K 166960K 85 0 exec 0 0K 1K 166960K 477 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 272 80K 112K 166960K 7529 0 UVM aobj 17 2K 2K 166960K 18 0 pinsyscall 37 74K 100K 166960K 1895 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 39 0 NDP 13 0K 2K 166960K 55 0 temp 71 6795K 6862K 166960K 49138 0 kqueue 12 18K 29K 166960K 120 0 SYN cache 2 16K 16K 166960K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 86 0 82 1 0 1 1 0 8 0 rtentry 112 180 0 89 4 0 4 4 0 8 0 unpcb 144 439 0 422 2 0 2 2 0 8 0 syncache 336 5 0 5 1 0 1 1 0 8 1 sackhl 24 1 0 1 1 0 1 1 0 8 1 tcpqe 32 2 0 2 1 0 1 1 0 8 1 tcpcb 808 167 0 158 2 0 2 2 0 8 1 arp 88 28 0 12 1 0 1 1 0 8 0 ipq 40 2 0 0 1 0 1 1 0 8 0 ipqe 40 3 0 1 1 0 1 1 0 8 0 inpcb 352 595 0 581 5 0 5 5 0 8 3 nd6 104 42 0 19 1 0 1 1 0 8 0 pkpcb 40 3 0 3 1 0 1 1 0 8 1 kcovpl 48 13 0 5 1 0 1 1 0 8 0 ppxss 1072 4 0 4 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 713 0 307 29 0 29 29 0 8 3 art_table 32 714 0 307 4 0 4 4 0 8 0 art_node 16 169 0 87 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 5 1 0 1 1 0 8 0 semupl 112 5 0 5 1 0 1 1 0 8 1 semapl 112 24 0 14 1 0 1 1 0 8 0 shmpl 112 15 0 1 1 0 1 1 0 8 0 dirhash 1024 25 0 8 3 0 3 3 0 8 0 dino2pl 256 2470 0 953 96 0 96 96 0 8 0 ffsino 240 2470 0 953 90 0 90 90 0 8 0 nchpl 144 3411 0 1675 66 0 66 66 0 8 0 uvmvnodes 80 3015 0 0 62 0 62 62 0 8 0 vnodes 216 3015 0 0 168 0 168 168 0 8 0 vnodes: pool(0xffffffff82d66938:vnodes): page inconsistency: page 0x0; at page head addr 0xfffffd806c969f90 (p 0xfffffd806c969000) namei 1024 12204 0 12203 3 0 3 3 0 8 2 vcpupl 3904 4 0 1 1 0 1 1 0 8 0 vmpool 664 12 0 9 1 0 1 1 0 8 0 kstatmem 264 58 0 32 2 0 2 2 0 8 0 scsiplug 72 2 0 2 1 0 1 1 0 8 1 scxspl 216 16512 0 16512 8 0 8 8 1 8 8 plimitpl 152 102 0 87 1 0 1 1 0 8 0 sigapl 424 940 0 875 8 0 8 8 0 8 0 futexpl 64 9515 0 9511 1 0 1 1 0 8 0 knotepl 120 7835 0 7753 11 0 11 11 0 8 7 kqueuepl 184 285 0 275 4 0 4 4 0 8 3 pipepl 288 208 0 180 3 0 3 3 0 8 0 fdescpl 432 902 0 874 4 0 4 4 0 8 0 filepl 120 5256 0 5001 11 0 11 11 0 8 1 lockfpl 104 242 0 237 1 0 1 1 0 8 0 lockfspl 48 87 0 83 1 0 1 1 0 8 0 sessionpl 144 28 0 12 1 0 1 1 0 8 0 pgrppl 48 46 0 30 1 0 1 1 0 8 0 ucredpl 104 586 0 575 1 0 1 1 0 8 0 zombiepl 144 875 0 875 1 0 1 1 0 8 1 processpl 1080 940 0 875 5 0 5 5 0 8 0 procpl 656 1491 0 1406 8 0 8 8 0 8 0 sockpl 504 1129 0 1094 10 0 10 10 0 8 4 mcl64k 65536 108 0 108 1 0 1 1 0 8 1 mcl16k 16384 26 0 26 1 0 1 1 0 8 1 mcl12k 12288 30 0 30 1 0 1 1 0 8 1 mcl9k 9216 13 0 13 1 0 1 1 0 8 1 mcl8k 8192 53 0 53 1 0 1 1 0 8 1 mcl4k 4096 13 0 13 1 0 1 1 0 8 1 mcl2k 2048 17138 0 17034 38 17 21 38 0 8 6 mtagpl 96 31 0 15 1 0 1 1 0 8 0 mbufpl 256 31919 0 31678 22 5 17 20 0 8 0 bufpl 280 6634 0 308 452 0 452 452 0 8 0 anonpl 24 267807 0 261872 63 0 63 63 0 188 22 amapchunkpl 152 25490 0 24833 45 0 45 45 0 158 16 amappl16 200 7230 0 7100 14 0 14 14 0 8 6 amappl15 192 22 0 21 1 0 1 1 0 8 0 amappl14 184 210 0 200 2 0 2 2 0 8 1 amappl13 176 9 0 9 1 0 1 1 0 8 1 amappl12 168 1604 0 1576 2 0 2 2 0 8 0 amappl11 160 76 0 58 1 0 1 1 0 8 0 amappl10 152 57 0 56 1 0 1 1 0 8 0 amappl9 144 173 0 173 1 0 1 1 0 8 1 amappl8 136 151 0 122 2 0 2 2 0 8 0 amappl7 128 46 0 37 1 0 1 1 0 8 0 amappl6 120 367 0 355 2 0 2 2 0 8 1 amappl5 112 183 0 171 1 0 1 1 0 8 0 amappl4 104 559 0 528 2 0 2 2 0 8 0 amappl3 96 5340 0 5259 3 0 3 3 0 8 0 amappl2 88 1373 0 1299 4 0 4 4 0 8 2 amappl1 80 11260 0 10767 22 2 20 22 0 8 8 amappl 88 6937 0 6747 5 0 5 5 0 92 0 dma4096 4096 1 0 1 1 0 1 1 0 8 1 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 0 1 1 0 8 1 dma128 128 253 0 253 1 0 1 1 0 8 1 dma64 64 6 0 6 1 0 1 1 0 8 1 dma32 32 7 0 7 1 0 1 1 0 8 1 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 17 0 1 1 0 1 1 0 8 0 uaddrrnd 24 914 0 883 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 914 0 883 1 0 1 1 0 8 0 vmmpekpl 168 11173 0 11111 4 0 4 4 0 8 0 vmmpepl 168 77242 0 75385 114 0 114 114 0 357 29 vmsppl 344 913 0 883 4 0 4 4 0 8 0 rwobjpl 24 29655 0 25566 25 0 25 25 0 8 0 pdppl 4096 1834 0 1769 119 50 69 71 0 8 4 pvpl 32 605116 0 592884 397 43 354 397 0 265 242 pmappl 216 913 0 883 2 0 2 2 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 424 0 72 11 0 11 11 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828af709) at panic+0x165 sys/kern/subr_prf.c:198 vref(fffffd806c969638) at vref+0x83 sys/kern/vfs_subr.c:698 namei(ffff800033bb52b8) at namei+0x3b2 sys/kern/vfs_lookup.c:221 vn_open(ffff800033bb52b8,30001,0) at vn_open+0x101 sys/kern/vfs_vnops.c:140 doopenat(ffff80002a68a038,ffffff9c,7350fbadde60,30000,0,ffff800033bb5460) at doopenat+0x269 sys/kern/vfs_syscalls.c:1127 syscall(ffff800033bb5510) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7350fbadd960, count: -8 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828af709) at panic+0x165 sys/kern/subr_prf.c:198 vref(fffffd806c969638) at vref+0x83 sys/kern/vfs_subr.c:698 namei(ffff800033bb52b8) at namei+0x3b2 sys/kern/vfs_lookup.c:221 vn_open(ffff800033bb52b8,30001,0) at vn_open+0x101 sys/kern/vfs_vnops.c:140 doopenat(ffff80002a68a038,ffffff9c,7350fbadde60,30000,0,ffff800033bb5460) at doopenat+0x269 sys/kern/vfs_syscalls.c:1127 syscall(ffff800033bb5510) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7350fbadd960, count: -8