panic: vrele: v_writecount != 0 (2)

2 views
Skip to first unread message

syzbot

unread,
Feb 4, 2021, 6:01:22 AM2/4/21
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: a1753de6 Eventhough most openssl includes include everythi..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=1606f908d00000
kernel config: https://syzkaller.appspot.com/x/.config?x=bf87b6915a88cd0d
dashboard link: https://syzkaller.appspot.com/bug?extid=b0e18235e96adf81883d

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+b0e182...@syzkaller.appspotmail.com

panic: vrele: v_writecount != 0
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
153857 58906 0 0 0 0 syz-executor.1
*315184 48870 0 0 0x4000000 1K syz-executor.0
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff8245fb0e) at panic+0x15e sys/kern/subr_prf.c:218
vrele(fffffd806ed3b950) at vrele+0x197 sys/kern/vfs_subr.c:803
ptmioctl(5100,40287401,ffff8000234c8f30,3,ffff80002123cd20) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225
VOP_IOCTL(fffffd806e25cc98,40287401,ffff8000234c8f30,3,fffffd807f7b7900,ffff80002123cd20) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:297
vn_ioctl(fffffd8069b33a38,40287401,ffff8000234c8f30,ffff80002123cd20) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531
sys_ioctl(ffff80002123cd20,ffff8000234c9040,ffff8000234c9090) at sys_ioctl+0x4b0
syscall(ffff8000234c9110) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff8000234c9110) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x45fd8ce650, 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
vrele: v_writecount != 0
ddb{1}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff8245fb0e) at panic+0x15e sys/kern/subr_prf.c:218
vrele(fffffd806ed3b950) at vrele+0x197 sys/kern/vfs_subr.c:803
ptmioctl(5100,40287401,ffff8000234c8f30,3,ffff80002123cd20) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225
VOP_IOCTL(fffffd806e25cc98,40287401,ffff8000234c8f30,3,fffffd807f7b7900,ffff80002123cd20) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:297
vn_ioctl(fffffd8069b33a38,40287401,ffff8000234c8f30,ffff80002123cd20) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531
sys_ioctl(ffff80002123cd20,ffff8000234c9040,ffff8000234c9090) at sys_ioctl+0x4b0
syscall(ffff8000234c9110) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff8000234c9110) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x45fd8ce650, count: -9
ddb{1}> show registers
rdi 0
rsi 0x1
rbp 0xffff8000234c8970
rbx 0xffff8000234c8980
rdx 0x8b
rcx 0x2
rax 0x1
r8 0xffffffff81b81665 kprintf+0x145
r9 0x1
r10 0xbeb8e991237a59a7
r11 0xeffce70da16ab778
r12 0x3000000008
r13 0xffff8000234c8a20
r14 0x100
r15 0x1
rip 0xffffffff81e4d228 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff8000234c8960
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor.0) pid=315184 stat=onproc
flags process=0 proc=4000000<THREAD>
pri=32, usrpri=86, nice=20
forw=0xffffffffffffffff, list=0xffff80002123d260,0xffff80002123cfd0
process=0xffff800021234880 user=0xffff8000234c4000, vmspace=0xfffffd807eff98a0
estcpu=36, cpticks=2, pctcpu=0.0
user=0, sys=2, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
58906 153857 17352 0 7 0 syz-executor.1
58906 342614 17352 0 2 0x4000000 syz-executor.1
48870 310420 20703 0 2 0 syz-executor.0
*48870 315184 20703 0 7 0x4000000 syz-executor.0
50078 112987 0 0 3 0x14200 bored sosplice
17352 216820 48840 0 3 0x82 nanoslp syz-executor.1
20703 84666 48840 0 3 0x82 nanoslp syz-executor.0
48840 485747 48012 0 3 0x82 thrsleep syz-fuzzer
48840 82142 48012 0 3 0x4000082 nanoslp syz-fuzzer
48840 507297 48012 0 3 0x4000082 thrsleep syz-fuzzer
48840 140172 48012 0 3 0x4000082 thrsleep syz-fuzzer
48840 287297 48012 0 3 0x4000082 thrsleep syz-fuzzer
48840 414176 48012 0 3 0x4000082 thrsleep syz-fuzzer
48840 187273 48012 0 3 0x4000082 kqread syz-fuzzer
48840 417209 48012 0 3 0x4000082 nanoslp syz-fuzzer
48012 360764 90550 0 3 0x10008a sigsusp ksh
90550 22358 36154 0 3 0x92 select sshd
2937 165905 1 0 3 0x100083 ttyin getty
36154 188583 1 0 3 0x80 select sshd
4676 483358 33451 74 3 0x100092 bpf pflogd
33451 350386 1 0 3 0x80 netio pflogd
20825 266537 97135 73 3 0x100090 kqread syslogd
97135 457256 1 0 3 0x100082 netio syslogd
47088 96909 1 77 3 0x100090 poll dhclient
65221 336325 1 0 3 0x80 poll dhclient
61433 294696 0 0 3 0x14200 bored smr
20384 149035 0 0 2 0x14200 zerothread
58535 497496 0 0 3 0x14200 aiodoned aiodoned
93719 321807 0 0 3 0x14200 syncer update
83838 69623 0 0 3 0x14200 cleaner cleaner
10436 345074 0 0 3 0x14200 reaper reaper
95422 335577 0 0 3 0x14200 pgdaemon pagedaemon
84948 167852 0 0 3 0x14200 bored crynlk
45350 111337 0 0 3 0x14200 bored crypto
31876 71612 0 0 3 0x14200 bored viomb
29440 123465 0 0 3 0x40014200 acpi0 acpi0
37882 117334 0 0 3 0x40014200 idle1
33043 287550 0 0 3 0x14200 bored softnet
52509 29684 0 0 3 0x14200 bored systqmp
30981 241251 0 0 3 0x14200 bored systq
36090 487011 0 0 3 0x40014200 bored softclock
47692 379493 0 0 3 0x40014200 idle0
1 38552 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
Process 48870 (syz-executor.0) thread 0xffff80002123cd20 (315184)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff828d4128)
#0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182
#1 vn_ioctl+0x40 sys/kern/vfs_vnops.c:514
#2 sys_ioctl+0x4b0
#3 syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#3 syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590
#4 Xsyscall+0x128
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 9487 6421K 7389K 78643K 11607 0
pcb 13 8K 8K 78643K 47 0
rtable 105 3K 3K 78643K 235 0
ifaddr 44 10K 11K 78643K 70 0
counters 44 34K 34K 78643K 56 0
ioctlops 0 0K 4K 78643K 1487 0
iov 0 0K 12K 78643K 16 0
mount 1 1K 1K 78643K 1 0
vnodes 1224 77K 77K 78643K 1541 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 1K 78643K 2 0
VM map 2 1K 1K 78643K 2 0
sem 12 0K 0K 78643K 37 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1697 195K 286K 78643K 12598 0
file desc 6 17K 25K 78643K 508 0
sigio 0 0K 0K 78643K 23 0
proc 60 63K 95K 78643K 448 0
subproc 32 2K 2K 78643K 34 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
in_multi 33 2K 2K 78643K 33 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 2K 78643K 372 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 92 22K 22K 78643K 1830 0
UVM aobj 3 2K 2K 78643K 3 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
ip6_options 0 0K 0K 78643K 59 0
NDP 6 0K 0K 78643K 16 0
temp 83 3976K 4040K 78643K 3936 0
kqueue 3 4K 6K 78643K 48 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 6 0 0 1 0 1 1 0 8 0
plcache 128 20 0 0 1 0 1 1 0 8 0
rtpcb 120 36 0 34 1 0 1 1 0 8 0
rtentry 112 45 0 1 2 0 2 2 0 8 0
unpcb 120 136 0 126 1 0 1 1 0 8 0
syncache 296 4 0 4 1 1 0 1 0 8 0
tcpqe 32 30 0 30 1 1 0 1 0 8 0
tcpcb 736 37 0 33 2 0 2 2 0 8 1
inpcb 304 229 0 222 2 0 2 2 0 8 1
nd6 48 6 0 0 1 0 1 1 0 8 0
pkpcb 40 8 0 8 1 0 1 1 0 8 1
kcovpl 48 2 0 0 1 0 1 1 0 8 0
pffrag 232 1 0 0 1 0 1 1 0 482 0
pffrnode 88 1 0 0 1 0 1 1 0 8 0
pffrent 40 5 0 4 1 0 1 1 0 8 0
pfosfp 40 1428 0 1005 5 0 5 5 0 8 0
pfosfpen 112 1428 0 714 21 0 21 21 0 8 0
pfstitem 24 11 0 5 1 0 1 1 0 8 0
pfstkey 112 11 0 5 1 0 1 1 0 8 0
pfstate 320 11 0 5 1 0 1 1 0 8 0
pfrule 1360 31 0 26 2 1 1 2 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 189 0 0 12 0 12 12 0 8 0
art_table 32 190 0 0 2 0 2 2 0 8 0
art_node 16 44 0 4 1 0 1 1 0 8 0
sysvmsgpl 40 48 0 16 1 0 1 1 0 8 0
semupl 112 9 0 9 1 0 1 1 0 8 1
semapl 112 25 0 15 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 2052 0 648 89 0 89 89 0 8 1
ffsino 272 2052 0 648 94 0 94 94 0 8 0
nchpl 144 2774 0 1169 60 0 60 60 0 8 0
uvmvnodes 72 2340 0 0 43 0 43 43 0 8 0
vnodes 224 2340 0 0 138 0 138 138 0 8 0
namei 1024 6938 0 6938 1 0 1 1 0 8 1
percpumem 16 39 0 6 1 0 1 1 0 8 0
scxspl 216 7981 0 7981 9 8 1 8 0 8 1
plimitpl 152 17 0 8 1 0 1 1 0 8 0
sigapl 424 725 0 691 4 0 4 4 0 8 0
futexpl 56 3385 0 3385 1 0 1 1 0 8 1
knotepl 112 108 0 88 1 0 1 1 0 8 0
kqueuepl 168 190 0 188 1 0 1 1 0 8 0
pipepl 336 99 0 88 2 1 1 2 0 8 0
fdescpl 496 708 0 691 3 0 3 3 0 8 0
filepl 152 2590 0 2484 5 0 5 5 0 8 0
lockfpl 104 55 0 54 1 0 1 1 0 8 0
lockfspl 48 27 0 26 1 0 1 1 0 8 0
sessionpl 144 18 0 7 1 0 1 1 0 8 0
pgrppl 48 18 0 7 1 0 1 1 0 8 0
ucredpl 96 123 0 114 1 0 1 1 0 8 0
zombiepl 144 691 0 691 1 0 1 1 0 8 1
processpl 1080 725 0 691 3 0 3 3 0 8 0
procpl 672 1295 0 1252 4 0 4 4 0 8 0
sosppl 168 40 0 40 1 0 1 1 0 8 1
sockpl 432 409 0 390 3 0 3 3 0 8 0
mcl64k 65536 2 0 0 1 0 1 1 0 8 0
mcl4k 4096 1 0 0 1 0 1 1 0 8 0
mcl2k2 2112 6 0 0 1 0 1 1 0 8 0
mcl2k 2048 102 0 0 12 0 12 12 0 8 0
mtagpl 96 139 0 0 4 0 4 4 0 8 0
mbufpl 256 475 0 0 29 0 29 29 0 8 0
bufpl 280 3830 0 181 261 0 261 261 0 8 0
anonpl 24 61201 0 57073 28 2 26 26 0 186 0
amapchunkpl 152 2715 0 2569 7 0 7 7 0 158 0
amappl16 200 2034 0 1903 8 1 7 8 0 8 0
amappl15 192 2 0 0 1 0 1 1 0 8 0
amappl14 184 271 0 266 1 0 1 1 0 8 0
amappl13 176 259 0 255 1 0 1 1 0 8 0
amappl12 168 2 0 0 1 0 1 1 0 8 0
amappl11 160 56 0 39 1 0 1 1 0 8 0
amappl10 152 17 0 12 1 0 1 1 0 8 0
amappl9 144 22 0 19 1 0 1 1 0 8 0
amappl8 136 128 0 99 2 0 2 2 0 8 0
amappl7 128 246 0 238 1 0 1 1 0 8 0
amappl6 120 65 0 54 1 0 1 1 0 8 0
amappl5 112 1145 0 1127 1 0 1 1 0 8 0
amappl4 104 520 0 496 1 0 1 1 0 8 0
amappl3 96 361 0 353 1 0 1 1 0 8 0
amappl2 88 5029 0 4945 3 1 2 3 0 8 0
amappl1 80 28558 0 28070 27 15 12 21 0 8 0
amappl 88 1549 0 1500 2 0 2 2 0 92 0
dma4096 4096 1 0 1 1 1 0 1 0 8 0
dma1024 1024 1 0 0 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 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 2 0 0 1 0 1 1 0 8 0
uaddrrnd 24 708 0 691 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 708 0 691 1 0 1 1 0 8 0
vmmpekpl 168 8137 0 8111 2 0 2 2 0 8 0
vmmpepl 168 93889 0 92462 83 19 64 76 0 357 1
vmsppl 368 707 0 691 2 0 2 2 0 8 0
rwobjpl 56 21572 0 20755 25 12 13 19 0 8 1
pdppl 4096 1423 0 1382 57 16 41 45 0 8 0
pvpl 32 277106 0 269599 117 23 94 117 0 265 33
pmappl 232 707 0 691 2 1 1 2 0 8 0
extentpl 40 58 0 40 1 0 1 1 0 8 0
phpool 112 311 0 20 9 0 9 9 0 8 0
ddb{1}> machine ddbcpu 0
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
x86_ipi_db(ffffffff826d1ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
__mp_lock(ffffffff828d3f20) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff828d3f20) at __mp_lock+0x122 sys/kern/kern_lock.c:147
intr_handler(ffff8000222b71f0,ffff800000255c80) at intr_handler+0x5e sys/arch/amd64/amd64/intr.c:532
Xintr_ioapic_edge19_untramp() at Xintr_ioapic_edge19_untramp+0x18f
end of kernel
end trace frame: 0x7f7ffffd7250, count: 9
ddb{0}> trace
x86_ipi_db(ffffffff826d1ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
__mp_lock(ffffffff828d3f20) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff828d3f20) at __mp_lock+0x122 sys/kern/kern_lock.c:147
intr_handler(ffff8000222b71f0,ffff800000255c80) at intr_handler+0x5e sys/arch/amd64/amd64/intr.c:532
Xintr_ioapic_edge19_untramp() at Xintr_ioapic_edge19_untramp+0x18f
end of kernel
end trace frame: 0x7f7ffffd7250, count: -6
ddb{0}> machine ddbcpu 1
Stopped at db_enter+0x18: addq $0x8,%rsp
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff8245fb0e) at panic+0x15e sys/kern/subr_prf.c:218
vrele(fffffd806ed3b950) at vrele+0x197 sys/kern/vfs_subr.c:803
ptmioctl(5100,40287401,ffff8000234c8f30,3,ffff80002123cd20) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225
VOP_IOCTL(fffffd806e25cc98,40287401,ffff8000234c8f30,3,fffffd807f7b7900,ffff80002123cd20) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:297
vn_ioctl(fffffd8069b33a38,40287401,ffff8000234c8f30,ffff80002123cd20) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531
sys_ioctl(ffff80002123cd20,ffff8000234c9040,ffff8000234c9090) at sys_ioctl+0x4b0
syscall(ffff8000234c9110) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff8000234c9110) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x45fd8ce650, count: 6
ddb{1}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff8245fb0e) at panic+0x15e sys/kern/subr_prf.c:218
vrele(fffffd806ed3b950) at vrele+0x197 sys/kern/vfs_subr.c:803
ptmioctl(5100,40287401,ffff8000234c8f30,3,ffff80002123cd20) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225
VOP_IOCTL(fffffd806e25cc98,40287401,ffff8000234c8f30,3,fffffd807f7b7900,ffff80002123cd20) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:297
vn_ioctl(fffffd8069b33a38,40287401,ffff8000234c8f30,ffff80002123cd20) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531
sys_ioctl(ffff80002123cd20,ffff8000234c9040,ffff8000234c9090) at sys_ioctl+0x4b0
syscall(ffff8000234c9110) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff8000234c9110) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x45fd8ce650, count: -9


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Feb 4, 2021, 8:52:22 AM2/4/21
to syzkaller-o...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: a1753de6 Eventhough most openssl includes include everythi..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=156f0e5f500000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13fe63e8d00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11ef29c4d00000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+b0e182...@syzkaller.appspotmail.com

panic: vrele: v_writecount != 0
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
156664 36912 0 0x2 0 1 syz-executor6022
*481199 36912 0 0x2 0x4000000 0K syz-executor6022
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff8245fb0e) at panic+0x15e sys/kern/subr_prf.c:218
vrele(fffffd806e85a870) at vrele+0x197 sys/kern/vfs_subr.c:803
ptmioctl(5100,40287401,ffff800021263860,3,ffff8000ffff6a90) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225
VOP_IOCTL(fffffd806e2c0838,40287401,ffff800021263860,3,fffffd807f7b7840,ffff8000ffff6a90) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:297
vn_ioctl(fffffd806d1f5bf0,40287401,ffff800021263860,ffff8000ffff6a90) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531
sys_ioctl(ffff8000ffff6a90,ffff800021263970,ffff8000212639c0) at sys_ioctl+0x4b0
syscall(ffff800021263a40) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff800021263a40) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x83a8ea95d10, 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{0}>
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
vrele: v_writecount != 0
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff8245fb0e) at panic+0x15e sys/kern/subr_prf.c:218
vrele(fffffd806e85a870) at vrele+0x197 sys/kern/vfs_subr.c:803
ptmioctl(5100,40287401,ffff800021263860,3,ffff8000ffff6a90) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225
VOP_IOCTL(fffffd806e2c0838,40287401,ffff800021263860,3,fffffd807f7b7840,ffff8000ffff6a90) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:297
vn_ioctl(fffffd806d1f5bf0,40287401,ffff800021263860,ffff8000ffff6a90) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531
sys_ioctl(ffff8000ffff6a90,ffff800021263970,ffff8000212639c0) at sys_ioctl+0x4b0
syscall(ffff800021263a40) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff800021263a40) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x83a8ea95d10, count: -9
ddb{0}> show registers
rdi 0
rsi 0x1
rbp 0xffff8000212632a0
rbx 0xffff8000212632b0
rdx 0x8b
rcx 0x2
rax 0x1
r8 0xffffffff81b81665 kprintf+0x145
r9 0x1
r10 0xd79a8ac55581a74f
r11 0x734275e47ec65dc7
r12 0x3000000008
r13 0xffff800021263350
r14 0x100
r15 0x1
rip 0xffffffff81e4d228 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff800021263290
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{0}> show proc
PROC (syz-executor6022) pid=481199 stat=onproc
flags process=2<EXEC,8ORPHAN> proc=4000000<THREAD>
pri=52, usrpri=53, nice=20
forw=0xffffffffffffffff, list=0xffff8000ffff7a50,0xffffffff828c76b0
process=0xffff800021237b20 user=0xffff80002125e000, vmspace=0xfffffd806e9605c8
estcpu=3, cpticks=2, pctcpu=0.0
user=0, sys=2, intr=0
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
36912 156664 61480 0 7 0x2 syz-executor6022
36912 277976 61480 0 3 0x4000082 fsleep syz-executor6022
*36912 481199 61480 0 7 0x4000002 syz-executor6022
61480 358942 40834 0 3 0x10008a sigsusp ksh
40834 183422 37382 0 3 0x92 select sshd
38471 439023 1 0 3 0x100083 ttyin getty
37382 346506 1 0 3 0x80 select sshd
2583 109319 37986 74 3 0x100092 bpf pflogd
37986 152025 1 0 3 0x80 netio pflogd
45521 255942 4455 73 3 0x100090 kqread syslogd
4455 12650 1 0 3 0x100082 netio syslogd
85648 250595 1 77 3 0x100090 poll dhclient
93153 138657 1 0 3 0x80 poll dhclient
87023 8762 0 0 3 0x14200 bored smr
53516 35952 0 0 3 0x14200 pgzero zerothread
56638 378284 0 0 3 0x14200 aiodoned aiodoned
91892 66361 0 0 3 0x14200 syncer update
36564 48584 0 0 3 0x14200 cleaner cleaner
72481 123448 0 0 3 0x14200 reaper reaper
48761 143765 0 0 3 0x14200 pgdaemon pagedaemon
81421 197349 0 0 3 0x14200 bored crynlk
21208 113589 0 0 3 0x14200 bored crypto
12120 475674 0 0 3 0x14200 bored viomb
9983 417220 0 0 3 0x40014200 acpi0 acpi0
60340 138797 0 0 3 0x40014200 idle1
20010 4661 0 0 3 0x14200 bored softnet
95827 229614 0 0 3 0x14200 bored systqmp
95812 1421 0 0 3 0x14200 bored systq
52556 412768 0 0 3 0x40014200 bored softclock
72478 181498 0 0 3 0x40014200 idle0
1 491036 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{0}> show all locks
Process 36912 (syz-executor6022) thread 0xffff8000ffff6a90 (481199)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff828d4128)
#0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182
#1 vn_ioctl+0x40 sys/kern/vfs_vnops.c:514
#2 sys_ioctl+0x4b0
#3 syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#3 syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590
#4 Xsyscall+0x128
ddb{0}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 9478 6412K 6412K 78643K 10568 0
pcb 13 8K 8K 78643K 13 0
rtable 61 2K 2K 78643K 127 0
ifaddr 29 8K 8K 78643K 30 0
counters 40 33K 33K 78643K 40 0
ioctlops 0 0K 4K 78643K 1467 0
mount 1 1K 1K 78643K 1 0
vnodes 1183 74K 75K 78643K 1188 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 1K 78643K 2 0
VM map 2 1K 1K 78643K 2 0
sem 2 0K 0K 78643K 2 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1697 195K 286K 78643K 12598 0
file desc 1 0K 0K 78643K 1 0
proc 59 63K 71K 78643K 367 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
in_multi 11 0K 0K 78643K 11 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 37 175K 175K 78643K 37 0
exec 0 0K 2K 78643K 302 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 38 2K 2K 78643K 595 0
UVM aobj 3 2K 2K 78643K 3 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
NDP 4 0K 0K 78643K 4 0
temp 23 3969K 4033K 78643K 1688 0
kqueue 2 2K 2K 78643K 2 0
SYN cache 2 16K 16K 78643K 2 0
ddb{0}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
arp 64 2 0 0 1 0 1 1 0 8 0
plcache 128 20 0 0 1 0 1 1 0 8 0
rtpcb 120 15 0 13 1 0 1 1 0 8 0
rtentry 112 23 0 1 1 0 1 1 0 8 0
unpcb 120 29 0 19 1 0 1 1 0 8 0
syncache 296 5 0 5 2 1 1 1 0 8 1
tcpcb 736 8 0 5 1 0 1 1 0 8 0
inpcb 304 29 0 23 1 0 1 1 0 8 0
pfosfp 40 1428 0 1005 5 0 5 5 0 8 0
pfosfpen 112 1428 0 714 21 0 21 21 0 8 0
pfstitem 24 9 0 2 1 0 1 1 0 8 0
pfstkey 112 9 0 2 1 0 1 1 0 8 0
pfstate 320 9 0 2 1 0 1 1 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 97 0 0 7 0 7 7 0 8 0
art_table 32 98 0 0 1 0 1 1 0 8 0
art_node 16 22 0 2 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 1398 0 16 87 0 87 87 0 8 0
ffsino 272 1398 0 16 93 0 93 93 0 8 0
nchpl 144 1572 0 33 59 1 58 58 0 8 0
uvmvnodes 72 1408 0 0 26 0 26 26 0 8 0
vnodes 224 1408 0 0 83 0 83 83 0 8 0
namei 1024 3792 0 3792 2 1 1 1 0 8 1
percpumem 16 31 0 0 1 0 1 1 0 8 0
scxspl 216 3626 0 3626 10 9 1 8 0 8 1
plimitpl 152 16 0 9 1 0 1 1 0 8 0
sigapl 424 221 0 192 4 0 4 4 0 8 0
futexpl 56 1 0 0 1 0 1 1 0 8 0
knotepl 112 5 0 0 1 0 1 1 0 8 0
kqueuepl 168 1 0 0 1 0 1 1 0 8 0
pipepl 336 64 0 60 2 1 1 1 0 8 0
fdescpl 496 205 0 192 3 0 3 3 0 8 0
filepl 152 965 0 912 3 0 3 3 0 8 0
lockfpl 104 5 0 4 1 0 1 1 0 8 0
lockfspl 48 3 0 2 1 0 1 1 0 8 0
sessionpl 144 18 0 9 1 0 1 1 0 8 0
pgrppl 48 18 0 9 1 0 1 1 0 8 0
ucredpl 96 71 0 62 1 0 1 1 0 8 0
zombiepl 144 192 0 192 2 1 1 1 0 8 1
processpl 1080 221 0 192 3 0 3 3 0 8 0
procpl 672 223 0 192 3 0 3 3 0 8 0
sockpl 432 73 0 55 4 1 3 3 0 8 0
mcl4k 4096 2 0 0 1 0 1 1 0 8 0
mcl2k 2048 92 0 0 11 0 11 11 0 8 0
mtagpl 96 1 0 0 1 0 1 1 0 8 0
mbufpl 256 107 0 0 6 0 6 6 0 8 0
bufpl 280 2005 0 112 136 0 136 136 0 8 0
anonpl 24 20082 0 18809 11 2 9 10 0 186 1
amapchunkpl 152 515 0 474 2 0 2 2 0 158 0
amappl16 200 84 0 79 1 0 1 1 0 8 0
amappl15 192 1 0 0 1 0 1 1 0 8 0
amappl14 184 22 0 19 1 0 1 1 0 8 0
amappl13 176 14 0 13 2 1 1 1 0 8 0
amappl12 168 4 0 4 2 1 1 1 0 8 1
amappl11 160 56 0 41 1 0 1 1 0 8 0
amappl10 152 11 0 9 1 0 1 1 0 8 0
amappl9 144 236 0 236 2 1 1 1 0 8 1
amappl8 136 61 0 59 1 0 1 1 0 8 0
amappl7 128 210 0 209 1 0 1 1 0 8 0
amappl6 120 59 0 51 1 0 1 1 0 8 0
amappl5 112 358 0 342 1 0 1 1 0 8 0
amappl4 104 277 0 255 1 0 1 1 0 8 0
amappl3 96 105 0 98 1 0 1 1 0 8 0
amappl2 88 859 0 799 2 0 2 2 0 8 0
amappl1 80 14175 0 13736 17 5 12 17 0 8 0
amappl 88 404 0 382 1 0 1 1 0 92 0
dma4096 4096 1 0 1 1 1 0 1 0 8 0
dma1024 1024 1 0 0 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 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 2 0 0 1 0 1 1 0 8 0
uaddrrnd 24 205 0 192 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 205 0 192 1 0 1 1 0 8 0
vmmpekpl 168 5582 0 5564 1 0 1 1 0 8 0
vmmpepl 168 30060 0 29183 50 11 39 48 0 357 0
vmsppl 368 204 0 192 2 0 2 2 0 8 0
rwobjpl 56 7783 0 7208 14 5 9 13 0 8 0
pdppl 4096 417 0 384 51 18 33 39 0 8 0
pvpl 32 81141 0 78068 35 6 29 29 0 265 4
pmappl 232 204 0 192 1 0 1 1 0 8 0
extentpl 40 58 0 40 1 0 1 1 0 8 0
phpool 112 272 0 23 8 0 8 8 0 8 0
ddb{0}> machine ddbcpu 0
Invalid cpu 0
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff8245fb0e) at panic+0x15e sys/kern/subr_prf.c:218
vrele(fffffd806e85a870) at vrele+0x197 sys/kern/vfs_subr.c:803
ptmioctl(5100,40287401,ffff800021263860,3,ffff8000ffff6a90) at ptmioctl+0x5b9 sys/kern/tty_pty.c:1225
VOP_IOCTL(fffffd806e2c0838,40287401,ffff800021263860,3,fffffd807f7b7840,ffff8000ffff6a90) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:297
vn_ioctl(fffffd806d1f5bf0,40287401,ffff800021263860,ffff8000ffff6a90) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531
sys_ioctl(ffff8000ffff6a90,ffff800021263970,ffff8000212639c0) at sys_ioctl+0x4b0
syscall(ffff800021263a40) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff800021263a40) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x83a8ea95d10, count: -9
ddb{0}> machine ddbcpu 1
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
x86_ipi_db(ffff800020d68ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
__sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x5f sys/dev/kcov.c:149
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffca980, count: 10
ddb{1}> trace
x86_ipi_db(ffff800020d68ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
__sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x5f sys/dev/kcov.c:149
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffca980, count: -5
ddb{1}>

Reply all
Reply to author
Forward
0 new messages