panic: vref used where vget required
Stopped at db_enter+0x25: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*447909 1666 0 0x8000002 0 0K syz-executor
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff8305b392) at panic+0x1e5 sys/kern/subr_prf.c:198
vref(fffffd80617e1a80) at vref+0x109 sys/kern/vfs_subr.c:698
namei(ffff800036f9f178) at namei+0x533 sys/kern/vfs_lookup.c:221
vn_open(ffff800036f9f178,30001,0) at vn_open+0x13f sys/kern/vfs_vnops.c:140
doopenat(ffff800029fe71f8,ffffff9c,78073a006400,30000,0,ffff800036f9f320) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123
syscall(ffff800036f9f3d0) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline]
syscall(ffff800036f9f3d0) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x78073a005f00, 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{0}>
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
*cpu0: vref used where vget required
ddb{0}> trace
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff8305b392) at panic+0x1e5 sys/kern/subr_prf.c:198
vref(fffffd80617e1a80) at vref+0x109 sys/kern/vfs_subr.c:698
namei(ffff800036f9f178) at namei+0x533 sys/kern/vfs_lookup.c:221
vn_open(ffff800036f9f178,30001,0) at vn_open+0x13f sys/kern/vfs_vnops.c:140
doopenat(ffff800029fe71f8,ffffff9c,78073a006400,30000,0,ffff800036f9f320) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123
syscall(ffff800036f9f3d0) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline]
syscall(ffff800036f9f3d0) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x78073a005f00, count: -8
ddb{0}> show registers
rdi 0
rsi 0x1
rbp 0xffff800036f9ee10
rbx 0xffffffff8345ed87 cpu_info_full_primary+0x2d87
rdx 0
rcx 0xffff800029fe71f8
rax 0xffffffff8345dff0 cpu_info_full_primary+0x1ff0
r8 0x101010101010101
r9 0x8080808080808080
r10 0x9ee598af6ded129c
r11 0x61486ae2460f75c9
r12 0xffffffff8345eb88 cpu_info_full_primary+0x2b88
r13 0
r14 0
r15 0x1
rip 0xffffffff829f5c45 db_enter+0x25
cs 0x8
rflags 0x246
rsp 0xffff800036f9ee00
ss 0x10
db_enter+0x25: addq $0x8,%rsp
ddb{0}> show proc
PROC (syz-executor) tid=447909 pid=1666 tcnt=1 stat=onproc
flags process=8000002<EXEC,PIN> proc=0
runpri=32, usrpri=84, slppri=32, nice=20
wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0
forw=0xffffffffffffffff, list=0xffff800029fe7990,0xffff800029fe7718
process=0xffff8000371bd6a8 user=0xffff800036f9a000, vmspace=0xfffffd80606f4c18
estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=1, intr=0
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
20575 296880 64590 0 2 0x8000000 syz-executor
20575 433574 64590 0 3 0xc000080 sbwait syz-executor
20575 89567 64590 0 3 0xc000080 fsleep syz-executor
13816 247422 72947 0 2 0x8000000 syz-executor
13816 458970 72947 0 3 0xc000080 fsleep syz-executor
13816 135743 72947 0 2 0xc000000 syz-executor
34099 119123 83669 0 2 0x8000000 syz-executor
34099 523071 83669 0 3 0xc000080 fsleep syz-executor
64590 396507 86291 0 3 0x8000082 nanoslp syz-executor
49630 360500 86291 0 3 0x8000082 piperd syz-executor
54339 352162 86291 0 3 0x8000082 nanoslp syz-executor
* 1666 447909 86291 0 7 0x8000002 syz-executor
83669 464714 86291 0 3 0x8000082 nanoslp syz-executor
67709 175374 86291 0 2 0x8000082 syz-executor
12363 245922 86291 0 3 0x8000082 nanoslp syz-executor
72947 191278 86291 0 3 0x8000082 nanoslp syz-executor
23576 355571 1 0 3 0x18100083 ttyin getty
14843 101076 0 0 3 0x14280 nfsidl nfsio
6076 244777 0 0 3 0x14280 nfsidl nfsio
67084 291496 0 0 3 0x14280 nfsidl nfsio
47038 386663 0 0 3 0x14280 nfsidl nfsio
13192 257805 0 0 3 0x14280 nfsidl nfsio
45764 193343 0 0 3 0x14280 nfsidl nfsio
37729 215557 0 0 3 0x14280 nfsidl nfsio
51558 455358 0 0 3 0x14280 nfsidl nfsio
14938 453561 0 0 3 0x14280 nfsidl nfsio
30568 522588 0 0 3 0x14280 nfsidl nfsio
85686 515138 0 0 3 0x14280 nfsidl nfsio
41186 40525 0 0 3 0x14280 nfsidl nfsio
82014 130776 0 0 3 0x14280 nfsidl nfsio
26594 436330 0 0 3 0x14280 nfsidl nfsio
15378 518259 0 0 3 0x14280 nfsidl nfsio
29264 485126 0 0 3 0x14280 nfsidl nfsio
1528 145628 0 0 3 0x14280 nfsidl nfsio
35875 207404 0 0 3 0x14280 nfsidl nfsio
60255 238105 0 0 3 0x14280 nfsidl nfsio
12198 115773 0 0 3 0x14280 nfsidl nfsio
81465 59583 0 0 3 0x14200 bored sosplice
86291 142575 51318 0 2 0x8000002 syz-executor
51318 282788 3512 0 3 0x810008a sigsusp ksh
3512 343437 49710 0 3 0x18000098 kqread sshd-session
49710 215886 54277 0 3 0x18000092 kqread sshd-session
54277 145409 1 0 3 0x18000088 kqread sshd
62854 466287 55843 74 3 0x19100092 bpf pflogd
55843 90855 1 0 3 0x18000080 sbwait pflogd
30585 384568 42885 73 2 0x19100010 syslogd
42885 384406 1 0 3 0x18100082 sbwait syslogd
3817 333174 1 0 3 0x18100080 kqread resolvd
70564 234429 88003 77 3 0x18100092 kqread dhcpleased
43772 504694 88003 77 3 0x18100092 kqread dhcpleased
88003 85798 1 0 3 0x18000080 kqread dhcpleased
96573 283314 0 0 3 0x14200 bored smr
20357 253323 0 0 2 0x14200 zerothread
26237 266777 0 0 3 0x14200 aiodoned aiodoned
13324 262950 0 0 3 0x14200 syncer update
58645 264737 0 0 3 0x14200 cleaner cleaner
40300 92295 0 0 3 0x14200 reaper reaper
41416 169837 0 0 3 0x14200 pgdaemon pagedaemon
2282 157130 0 0 3 0x14200 bored viomb
92766 224851 0 0 3 0x40014200 acpi0 acpi0
70808 220394 0 0 7 0x40014200 idle1
14760 376362 0 0 3 0x14200 bored softnet3
37964 514649 0 0 3 0x14200 bored softnet2
85512 197584 0 0 3 0x14200 bored softnet1
80787 101045 0 0 3 0x14200 bored softnet0
85578 229263 0 0 3 0x14200 bored systqmp
47123 275837 0 0 3 0x14200 bored systq
73492 369750 0 0 3 0x14200 tmoslp softclockmp
26702 260475 0 0 3 0x40014200 tmoslp softclock
81137 13386 0 0 3 0x40014200 idle0
1 362811 0 0 3 0x8000082 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{0}> show all locks
Process 1666 (syz-executor) thread 0xffff800029fe71f8 (447909)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff835edd10)
#0 witness_lock+0x5b8 stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0 witness_lock+0x5b8 sys/kern/subr_witness.c:1151
#1 syscall+0xad6 mi_syscall sys/sys/syscall_mi.h:179 [inline]
#1 syscall+0xad6 sys/arch/amd64/amd64/trap.c:577
#2 Xsyscall+0x128
Process 30585 (syslogd) thread 0xffff8000ffffd6d8 (384568)
exclusive rrwlock inode r = 0 (0xfffffd806e4991b0)
#0 witness_lock+0x5b8 stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0 witness_lock+0x5b8 sys/kern/subr_witness.c:1151
#1 rw_enter+0x41b sys/kern/kern_rwlock.c:309
#2 rrw_enter+0xbe sys/kern/kern_rwlock.c:464
#3 VOP_LOCK+0xa6 sys/kern/vfs_vops.c:524
#4 vn_lock+0xa4 sys/kern/vfs_vnops.c:564
#5 sys_fsync+0x152 sys/kern/vfs_syscalls.c:2927
#6 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline]
#6 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577
#7 Xsyscall+0x128
ddb{0}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 10244 10244K 10677K 166960K 14419 0
pcb 18 18K 23K 166960K 578 0
rtable 241 18K 19K 166960K 3100 0
pf 43 19K 26K 166960K 462 0
ifaddr 45 8K 8K 166960K 389 0
ifgroup 61 2K 2K 166960K 439 0
sysctl 3 0K 0K 166960K 3 0
counters 68 36K 37K 166960K 264 0
ioctlops 0 0K 4K 166960K 1840 0
iov 0 0K 14K 166960K 163 0
mount 1 1K 1K 166960K 1 0
log 0 0K 0K 166960K 4 0
vnodes 1560 98K 98K 166960K 4556 0
UFS quota 1 32K 32K 166960K 1 0
UFS mount 5 36K 36K 166960K 5 0
shm 2 1K 13K 166960K 36 0
VM map 2 1K 1K 166960K 2 0
sem 12 0K 0K 166960K 168 0
dirhash 18 3K 3K 166960K 45 0
ACPI 1697 195K 286K 166960K 12548 0
file desc 15 53K 89K 166960K 2464 0
sigio 0 0K 0K 166960K 28 0
proc 70 91K 140K 166960K 2859 0
subproc 104 6K 6K 166960K 1121 0
NFS srvsock 1 0K 0K 166960K 1 0
NFS daemon 1 16K 16K 166960K 1 0
ip_moptions 0 0K 0K 166960K 198 0
in_multi 100 7K 7K 166960K 989 0
ether_multi 1 0K 0K 166960K 3 0
mrt 0 0K 0K 166960K 3 0
ISOFS mount 1 32K 32K 166960K 1 0
MSDOSFS mount 1 16K 16K 166960K 1 0
ttys 295 1314K 1314K 166960K 295 0
exec 0 0K 1K 166960K 1690 0
pfkey data 0 0K 0K 166960K 3 0
tdb 3 0K 0K 166960K 3 0
VM swap 8 62K 64K 166960K 10 0
UVM amap 229 76K 117K 166960K 19876 0
UVM aobj 56 7K 7K 166960K 59 0
pinsyscall 40 80K 101K 166960K 5573 0
memdesc 1 4K 4K 166960K 1 0
crypto data 1 1K 1K 166960K 1 0
ip6_options 0 0K 1K 166960K 143 0
NDP 16 0K 2K 166960K 286 0
temp 74 6820K 6956K 166960K 83812 0
kqueue 13 20K 30K 166960K 242 0
SYN cache 2 16K 16K 166960K 2 0
ddb{0}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache 128 24 0 0 1 0 1 1 0 8 0
rtpcb 120 387 0 384 3 2 1 2 0 8 0
rtentry 112 1025 0 925 4 1 3 4 0 8 0
unpcb 144 1973 0 1954 23 21 2 8 0 8 1
syncache 336 12 0 12 8 8 0 1 0 8 0
tcpqe 32 1 0 1 1 1 0 1 0 8 0
tcpcb 808 1185 0 1181 50 46 4 14 0 8 3
arp 120 189 0 171 1 0 1 1 0 8 0
inpcb 336 3550 0 3542 56 52 4 18 0 8 3
nd6 136 273 0 248 1 0 1 1 0 8 0
pkpcb 40 13 0 13 6 6 0 1 0 8 0
kcovpl 48 86 0 78 1 0 1 1 0 8 0
ppxss 1168 13 0 12 6 5 1 1 0 8 0
pfstscr 40 10 0 9 2 1 1 1 0 8 0
pffrag 232 12 0 7 1 0 1 1 0 482 0
pffrnode 88 11 0 6 1 0 1 1 0 8 0
pffrent 40 16 0 10 1 0 1 1 0 8 0
pfosfp 40 1430 0 1005 5 0 5 5 0 8 0
pfosfpen 112 1430 0 714 21 0 21 21 0 8 0
pfrktable 1344 43 0 37 4 3 1 1 0 8 0
pfanchor 1288 19 0 13 2 1 1 1 0 8 0
pftag 88 12 0 7 3 2 1 1 0 8 0
pfqueue 264 2 0 1 1 0 1 1 0 8 0
pfstitem 24 198 0 162 1 0 1 1 0 8 0
pfstkey 128 219 0 183 2 0 2 2 0 8 0
pfstate 376 207 0 172 5 0 5 5 0 8 0
pfrule 1344 109 0 36 9 2 7 7 0 8 0
art_heap8 4096 2 0 0 2 0 2 2 0 8 0
art_heap4 256 4003 0 3554 38 9 29 30 0 8 0
art_table 32 4005 0 3554 4 0 4 4 0 8 0
art_node 16 1019 0 929 1 0 1 1 0 8 0
sysvmsgpl 40 11 0 7 1 0 1 1 0 8 0
semapl 112 166 0 156 1 0 1 1 0 8 0
shmpl 112 56 0 3 2 0 2 2 0 8 0
dirhash 1024 39 0 18 3 0 3 3 0 8 0
dino2pl 256 4299 0 2630 105 0 105 105 0 8 0
ffsino 272 4299 0 2630 113 1 112 112 0 8 0
nchpl 144 6424 0 4636 67 0 67 67 0 8 0
uvmvnodes 80 6964 0 0 143 0 143 143 0 8 0
vnodes 216 6964 0 0 387 0 387 387 0 8 0
vnodes: pool(0xffffffff8357c0d0:vnodes): page inconsistency: page 0x0; at page head addr 0xfffffd80617e1f90 (p 0xfffffd80617e1000)
namei 1024 35219 0 35218 11 10 1 2 0 8 0
percpumem 16 146 0 98 1 0 1 1 0 8 0
vcpupl 3904 3 0 1 1 0 1 1 0 8 0
vmpool 696 8 0 6 1 0 1 1 0 8 0
pfiaddrpl 120 78 0 10 5 2 3 3 0 8 0
kstatmem 264 224 0 196 3 1 2 3 0 8 0
scsiplug 72 5 0 5 4 3 1 1 0 8 1
scxspl 216 53179 0 53179 14 12 2 8 1 8 2
plimitpl 152 810 0 791 1 0 1 1 0 8 0
sigapl 424 2637 0 2568 10 1 9 9 0 8 0
futexpl 64 28094 0 28091 9 8 1 1 0 8 0
knotepl 120 481 0 0 12 1 11 12 0 8 0
kqueuepl 216 522 0 513 4 1 3 3 0 8 2
pipepl 320 567 0 540 8 5 3 8 0 8 0
fdescpl 496 2591 0 2562 8 3 5 5 0 8 0
filepl 152 20997 0 20746 69 54 15 31 0 8 0
lockfpl 104 506 0 504 1 0 1 1 0 8 0
lockfspl 48 224 0 222 1 0 1 1 0 8 0
sessionpl 144 103 0 94 1 0 1 1 0 8 0
pgrppl 48 210 0 193 1 0 1 1 0 8 0
ucredpl 104 3169 0 3155 1 0 1 1 0 8 0
zombiepl 144 2571 0 2568 2 1 1 1 0 8 0
processpl 1160 2637 0 2568 6 0 6 6 0 8 0
procpl 648 4554 0 4480 9 1 8 8 0 8 0
srpgc 96 6 0 6 2 2 0 1 0 8 0
sosppl 168 12 0 12 6 6 0 1 0 8 0
sockpl 664 6069 0 6039 91 84 7 29 0 8 4
mcl64k 65536 2 0 0 1 0 1 1 0 8 0
mcl16k 16384 2 0 0 1 0 1 1 0 8 0
mcl12k 12288 2 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 3 0 0 1 0 1 1 0 8 0
mcl2k 2048 236 0 0 28 1 27 28 0 8 0
mtagpl 96 9 0 0 1 0 1 1 0 8 0
mbufpl 256 763 0 0 45 0 45 45 0 8 0
bufpl 280 12091 0 3412 621 0 621 621 0 8 0
anonpl 24 393073 0 389637 136 60 76 81 0 185 42
amapchunkpl 152 64219 0 63754 59 28 31 43 0 158 9
amappl16 200 6650 0 6629 48 39 9 14 0 8 7
amappl15 192 12 0 12 1 1 0 1 0 8 0
amappl14 184 278 0 266 1 0 1 1 0 8 0
amappl13 176 6 0 6 1 1 0 1 0 8 0
amappl12 168 4473 0 4444 3 1 2 2 0 8 0
amappl11 160 58 0 44 1 0 1 1 0 8 0
amappl10 152 51 0 51 1 1 0 1 0 8 0
amappl9 144 155 0 155 1 1 0 1 0 8 0
amappl8 136 32 0 29 1 0 1 1 0 8 0
amappl7 128 264 0 252 1 0 1 1 0 8 0
amappl6 120 946 0 944 1 0 1 1 0 8 0
amappl5 112 450 0 438 1 0 1 1 0 8 0
amappl4 104 551 0 530 1 0 1 1 0 8 0
amappl3 96 12328 0 12221 6 2 4 4 0 8 0
amappl2 88 1724 0 1660 2 0 2 2 0 8 0
amappl1 80 19470 0 18883 15 1 14 14 0 8 1
amappl 88 18838 0 18673 6 1 5 5 0 92 0
dma4096 4096 1 0 1 1 1 0 1 0 8 0
dma2048 2048 3 0 3 3 3 0 1 0 8 0
dma1024 1024 2 0 1 1 0 1 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 7 0 7 2 2 0 1 0 8 0
dma32 32 8 0 8 2 2 0 1 0 8 0
dma16 16 19 0 18 1 0 1 1 0 8 0
aobjpl 72 58 0 3 1 0 1 1 0 8 0
uaddrrnd 24 2599 0 2568 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 2599 0 2568 1 0 1 1 0 8 0
vmmpekpl 168 21845 0 21785 4 0 4 4 0 8 0
vmmpepl 168 162638 0 160834 121 25 96 97 0 357 11
vmsppl 440 2598 0 2568 7 3 4 5 0 8 0
rwobjpl 56 53097 0 45136 115 1 114 114 0 8 1
pdppl 4096 5205 0 5138 223 148 75 85 0 8 8
pvpl 32 45767 0 0 370 1 369 369 0 265 0
pmappl 248 2598 0 2568 3 0 3 3 0 8 0
extentpl 40 56 0 38 1 0 1 1 0 8 0
phpool 112 698 0 285 13 0 13 13 0 8 0
ddb{0}> machine ddbcpu 0
Invalid cpu 0
ddb{0}> trace
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff8305b392) at panic+0x1e5 sys/kern/subr_prf.c:198
vref(fffffd80617e1a80) at vref+0x109 sys/kern/vfs_subr.c:698
namei(ffff800036f9f178) at namei+0x533 sys/kern/vfs_lookup.c:221
vn_open(ffff800036f9f178,30001,0) at vn_open+0x13f sys/kern/vfs_vnops.c:140
doopenat(ffff800029fe71f8,ffffff9c,78073a006400,30000,0,ffff800036f9f320) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123
syscall(ffff800036f9f3d0) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline]
syscall(ffff800036f9f3d0) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x78073a005f00, count: -8
ddb{0}> machine ddbcpu 1
Stopped at x86_ipi_db+0x27: addq $0x8,%rsp
x86_ipi_db(ffff800029b7bff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27
acpicpu_idle() at acpicpu_idle+0x41e sys/dev/acpi/acpicpu.c:1219
sched_idle(ffff800029b7bff0) at sched_idle+0x558 sys/kern/kern_sched.c:182
end trace frame: 0x0, count: 10
ddb{1}> trace
x86_ipi_db(ffff800029b7bff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27
acpicpu_idle() at acpicpu_idle+0x41e sys/dev/acpi/acpicpu.c:1219
sched_idle(ffff800029b7bff0) at sched_idle+0x558 sys/kern/kern_sched.c:182
end trace frame: 0x0, count: -5