panic: vput: v_writecount != 0 (2)

0 views
Skip to first unread message

syzbot

unread,
Jul 30, 2019, 7:09:06 PM7/30/19
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 75866a61 shorten the failure message, it should not wrap a..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=138f82e8600000
kernel config: https://syzkaller.appspot.com/x/.config?x=60e2b7157576c8d7
dashboard link: https://syzkaller.appspot.com/bug?extid=a430606fd528645559db

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

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

panic: vput: v_writecount != 0
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
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(fffffd802fd2e9a8) at vput+0x187 sys/kern/vfs_subr.c:759
vn_closefile(fffffd802bf16018,ffff8000ffff2780) at vn_closefile+0x15b
sys/kern/vfs_vnops.c:584
fdrop(fffffd802bf16018,ffff8000ffff2780) at fdrop+0xc9
sys/kern/kern_descrip.c:1269
closef(fffffd802bf16018,ffff8000ffff2780) at closef+0x118
sys/kern/kern_descrip.c:1253
fdfree(ffff8000ffff2780) at fdfree+0xf7 sys/kern/kern_descrip.c:1185
exit1(ffff8000ffff2780,0,1) at exit1+0x32f sys/kern/kern_exit.c:196
sys_exit(ffff8000ffff2780,ffff800017bf9f50,ffff800017bf9fc0) at
sys_exit+0x17 sys/kern/kern_exit.c:94
syscall(ffff800017bfa020) at syscall+0x508
Xsyscall(6,1,0,1,0,7f7ffffd4d44) at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffd4d10, count: 4
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports. Insufficient info makes it difficult to find and fix bugs.


---
This bug 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 bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jul 30, 2019, 7:32:06 PM7/30/19
to syzkaller-o...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 75866a61 shorten the failure message, it should not wrap a..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=14d85fc8600000
kernel config: https://syzkaller.appspot.com/x/.config?x=7f659e47e42d9641
dashboard link: https://syzkaller.appspot.com/bug?extid=a430606fd528645559db
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10fb9d92600000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17a1a6d8600000

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

panic: vput: v_writecount != 0
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*343042 52182 0 0x2 0x4000000 1K syz-executor3546
385272 52182 0 0x2 0x4000000 0 syz-executor3546
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(fffffd806fbe28a8) at vput+0x187 sys/kern/vfs_subr.c:759
vn_closefile(fffffd80739f1558,ffff800020b60778) at vn_closefile+0x15b
sys/kern/vfs_vnops.c:583
fdrop(fffffd80739f1558,ffff800020b60778) at fdrop+0xc9
sys/kern/kern_descrip.c:1269
closef(fffffd80739f1558,ffff800020b60778) at closef+0x11d
sys/kern/kern_descrip.c:1253
finishdup(ffff800020b60778,fffffd80739f1ab0,5,4,ffff800020bb0f30,1) at
finishdup+0x2b6 sys/kern/kern_descrip.c:682
dodup3(ffff800020b60778,5,4,0,ffff800020bb0f30) at dodup3+0x5c5
sys/kern/kern_descrip.c:377
syscall(ffff800020bb0fa0) at syscall+0x552 mi_syscall
sys/sys/syscall_mi.h:92 [inline]
syscall(ffff800020bb0fa0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555
Xsyscall(6,0,d57649310c8,0,d57649310a8,d57649310a0) at Xsyscall+0x128
end of kernel
end trace frame: 0xd5a444b1250, count: 5
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
vput: v_writecount != 0
ddb{1}> 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(fffffd806fbe28a8) at vput+0x187 sys/kern/vfs_subr.c:759
vn_closefile(fffffd80739f1558,ffff800020b60778) at vn_closefile+0x15b
sys/kern/vfs_vnops.c:583
fdrop(fffffd80739f1558,ffff800020b60778) at fdrop+0xc9
sys/kern/kern_descrip.c:1269
closef(fffffd80739f1558,ffff800020b60778) at closef+0x11d
sys/kern/kern_descrip.c:1253
finishdup(ffff800020b60778,fffffd80739f1ab0,5,4,ffff800020bb0f30,1) at
finishdup+0x2b6 sys/kern/kern_descrip.c:682
dodup3(ffff800020b60778,5,4,0,ffff800020bb0f30) at dodup3+0x5c5
sys/kern/kern_descrip.c:377
syscall(ffff800020bb0fa0) at syscall+0x552 mi_syscall
sys/sys/syscall_mi.h:92 [inline]
syscall(ffff800020bb0fa0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:555
Xsyscall(6,0,d57649310c8,0,d57649310a8,d57649310a0) at Xsyscall+0x128
end of kernel
end trace frame: 0xd5a444b1250, count: -10
ddb{1}> show registers
rdi 0
rsi 0x1
rbp 0xffff800020bb0b60
rbx 0xffff800020bb0c10
rdx 0x8b
rcx 0x2
rax 0x1
r8 0xffffffff810fe383 kprintf+0x173
r9 0x1
r10 0xc6e378f897b7ab32
r11 0x13a8e4cbfc24ce31
r12 0x3000000008
r13 0xffff800020bb0b70
r14 0x100
r15 0x1
rip 0xffffffff813f8388 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff800020bb0b50
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor3546) pid=343042 stat=onproc
flags process=2<EXEC> proc=4000000<THREAD>
pri=50, usrpri=50, nice=20
forw=0xffffffffffffffff, list=0xffff800020b60500,0xffff800020b61168
process=0xffff800020b2b890 user=0xffff800020bac000,
vmspace=0xfffffd806e7ffb88
estcpu=0, cpticks=3, pctcpu=0.0
user=0, sys=3, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
52182 285429 28407 0 2 0x2 syz-executor3546
*52182 343042 28407 0 7 0x4000002 syz-executor3546
52182 385272 28407 0 7 0x4000002 syz-executor3546
52182 405141 28407 0 3 0x4000082 fsleep syz-executor3546
28407 493611 57876 0 3 0x10008a pause ksh
57876 504283 59973 0 3 0x92 select sshd
79334 484390 1 0 3 0x100083 ttyin getty
59973 448246 1 0 3 0x80 select sshd
86142 279575 96140 74 3 0x100092 bpf pflogd
96140 252745 1 0 3 0x80 netio pflogd
50077 267536 56216 73 3 0x100090 kqread syslogd
56216 485677 1 0 3 0x100082 netio syslogd
7259 414662 1 77 3 0x100090 poll dhclient
59653 354381 1 0 3 0x80 poll dhclient
95526 421686 0 0 2 0x14200 zerothread
18060 396887 0 0 3 0x14200 aiodoned aiodoned
72987 13600 0 0 3 0x14200 syncer update
11601 443441 0 0 3 0x14200 cleaner cleaner
95967 71678 0 0 3 0x14200 reaper reaper
53677 463976 0 0 3 0x14200 pgdaemon pagedaemon
79625 101036 0 0 3 0x14200 bored crynlk
95903 403288 0 0 3 0x14200 bored crypto
88527 245058 0 0 3 0x40014200 acpi0 acpi0
53368 128566 0 0 3 0x40014200 idle1
12459 385885 0 0 3 0x14200 bored softnet
40031 217364 0 0 3 0x14200 bored systqmp
88657 519499 0 0 3 0x14200 bored systq
64224 322875 0 0 3 0x40014200 bored softclock
17821 113176 0 0 3 0x40014200 idle0
48983 393327 0 0 3 0x14200 bored smr
1 447981 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
Process 52182 (syz-executor3546) thread 0xffff800020b60778 (343042)
exclusive rrwlock inode r = 0 (0xfffffd806db60b48)
#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_closefile+0x119 vn_lock sys/kern/vfs_vnops.c:556 [inline]
#4 vn_closefile+0x119 vn_close sys/kern/vfs_vnops.c:288 [inline]
#4 vn_closefile+0x119 sys/kern/vfs_vnops.c:582
#5 fdrop+0xc9 sys/kern/kern_descrip.c:1269
#6 closef+0x11d sys/kern/kern_descrip.c:1253
#7 finishdup+0x2b6 sys/kern/kern_descrip.c:682
#8 dodup3+0x5c5 sys/kern/kern_descrip.c:377
#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
exclusive rwlock fdlock r = 0 (0xfffffd806f11d9e8)
#0 witness_lock+0x52e sys/kern/subr_witness.c:1163
#1 dodup3+0x1a1 sys/kern/kern_descrip.c:362
#2 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#2 syscall+0x552 sys/arch/amd64/amd64/trap.c:555
#3 Xsyscall+0x128
exclusive kernel_lock &kernel_lock r = 2 (0xffffffff82381420)
#0 witness_lock+0x52e sys/kern/subr_witness.c:1163
#1 syscall+0x412 mi_syscall sys/sys/syscall_mi.h:83 [inline]
#1 syscall+0x412 sys/arch/amd64/amd64/trap.c:555
#2 Xsyscall+0x128
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim
devbuf 9452 6383K 6385K 78643K 10541 0 0
pcb 13 8K 8K 78643K 13 0 0
rtable 61 2K 2K 78643K 125 0 0
ifaddr 25 7K 7K 78643K 26 0 0
counters 39 33K 33K 78643K 39 0 0
ioctlops 0 0K 4K 78643K 1467 0 0
mount 1 1K 1K 78643K 1 0 0
vnodes 1182 74K 74K 78643K 1187 0 0
UFS quota 1 32K 32K 78643K 1 0 0
UFS mount 5 36K 36K 78643K 5 0 0
shm 2 1K 1K 78643K 2 0 0
VM map 2 1K 1K 78643K 2 0 0
sem 2 0K 0K 78643K 2 0 0
dirhash 12 2K 2K 78643K 12 0 0
ACPI 1808 196K 290K 78643K 12765 0 0
file desc 1 0K 0K 78643K 1 0 0
proc 52 50K 58K 78643K 334 0 0
NFS srvsock 1 0K 0K 78643K 1 0 0
NFS daemon 1 16K 16K 78643K 1 0 0
in_multi 11 0K 0K 78643K 11 0 0
ether_multi 1 0K 0K 78643K 1 0 0
ISOFS mount 1 32K 32K 78643K 1 0 0
MSDOSFS mount 1 16K 16K 78643K 1 0 0
ttys 18 79K 79K 78643K 18 0 0
exec 0 0K 1K 78643K 179 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 64 3K 3K 78643K 821 0 0
UVM aobj 2 2K 2K 78643K 2 0 0
memdesc 1 4K 4K 78643K 1 0 0
crypto data 1 1K 1K 78643K 1 0 0
NDP 4 0K 0K 78643K 4 0 0
temp 39 2728K 2792K 78643K 1993 0 0
SYN cache 2 16K 16K 78643K 2 0 0
ddb{1}> 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 80 15 0 13 1 0 1 1 0
8 0
rtentry 112 23 0 1 1 0 1 1 0
8 0
unpcb 120 31 0 19 1 0 1 1 0
8 0
syncache 264 5 0 5 1 0 1 1 0
8 1
tcpqe 32 9 0 9 1 1 0 1 0
8 0
tcpcb 544 8 0 5 1 0 1 1 0
8 0
inpcb 280 29 0 23 1 0 1 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 8 0 0 1 0 1 1 0
8 0
pfstkey 112 8 0 0 1 0 1 1 0
8 0
pfstate 328 8 0 0 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
dino1pl 128 1402 0 18 45 0 45 45 0
8 0
ffsino 272 1402 0 18 93 0 93 93 0
8 0
nchpl 144 1587 0 45 58 0 58 58 0
8 0
uvmvnodes 72 1412 0 0 26 0 26 26 0
8 0
vnodes 200 1412 0 0 75 0 75 75 0
8 0
namei 1024 3650 0 3650 1 0 1 1 0
8 1
percpumem 16 30 0 0 1 0 1 1 0
8 0
scxspl 192 2341 0 2341 2 1 1 2 0
8 1
plimitpl 152 14 0 8 1 0 1 1 0
8 0
sigapl 432 205 0 193 2 0 2 2 0
8 0
futexpl 56 5 0 4 1 0 1 1 0
8 0
knotepl 112 5 0 0 1 0 1 1 0
8 0
kqueuepl 104 1 0 0 1 0 1 1 0
8 0
pipepl 112 134 0 127 2 1 1 1 0
8 0
fdescpl 488 206 0 193 3 0 3 3 0
8 0
filepl 152 987 0 936 2 0 2 2 0
8 0
lockfpl 104 6 0 6 1 1 0 1 0
8 0
lockfspl 48 3 0 3 1 1 0 1 0
8 0
sessionpl 112 18 0 9 1 0 1 1 0
8 0
pgrppl 48 18 0 9 1 0 1 1 0
8 0
ucredpl 96 52 0 43 1 0 1 1 0
8 0
zombiepl 144 193 0 193 2 1 1 1 0
8 1
processpl 896 221 0 193 4 0 4 4 0
8 0
procpl 632 224 0 193 3 0 3 3 0
8 0
sockpl 384 75 0 55 2 0 2 2 0
8 0
mcl4k 4096 3 0 0 1 0 1 1 0
8 0
mcl2k 2048 78 0 0 10 0 10 10 0
8 0
mtagpl 80 1 0 0 1 0 1 1 0
8 0
mbufpl 256 97 0 0 7 0 7 7 0
8 0
bufpl 256 2175 0 276 119 0 119 119 0
8 0
anonpl 16 20177 0 18869 8 2 6 7 0
125 0
amapchunkpl 152 547 0 504 2 0 2 2 0
158 0
amappl16 192 88 0 81 1 0 1 1 0
8 0
amappl14 176 38 0 34 1 0 1 1 0
8 0
amappl12 160 11 0 11 1 1 0 1 0
8 0
amappl11 152 47 0 32 1 0 1 1 0
8 0
amappl10 144 57 0 55 1 0 1 1 0
8 0
amappl9 136 434 0 433 1 0 1 1 0
8 0
amappl8 128 102 0 96 1 0 1 1 0
8 0
amappl7 120 19 0 18 1 0 1 1 0
8 0
amappl6 112 47 0 42 1 0 1 1 0
8 0
amappl5 104 128 0 115 1 0 1 1 0
8 0
amappl4 96 474 0 447 1 0 1 1 0
8 0
amappl3 88 154 0 143 1 0 1 1 0
8 0
amappl2 80 827 0 765 3 1 2 2 0
8 0
amappl1 72 13855 0 13410 15 5 10 15 0
8 0
amappl 80 426 0 402 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 1 0 0 1 0 1 1 0
8 0
uaddrrnd 24 206 0 193 1 0 1 1 0
8 0
uaddrbest 32 2 0 0 1 0 1 1 0
8 0
uaddr 24 206 0 193 1 0 1 1 0
8 0
vmmpekpl 168 5620 0 5600 1 0 1 1 0
8 0
vmmpepl 168 29316 0 28421 47 8 39 47 0
357 0
vmsppl 368 205 0 193 2 0 2 2 0
8 0
pdppl 4096 420 0 386 6 0 6 6 0
8 0
pvpl 32 80698 0 77625 31 3 28 28 0
265 3
pmappl 232 205 0 193 1 0 1 1 0
8 0
extentpl 40 41 0 26 1 0 1 1 0
8 0
phpool 112 255 0 3 8 0 8 8 0
8 0
ddb{1}>

Anton Lindqvist

unread,
Aug 2, 2019, 12:00:17 PM8/2/19
to syzbot, syzkaller-o...@googlegroups.com

syzbot

unread,
Aug 2, 2019, 12:17:01 PM8/2/19
to an...@basename.se, syzkaller-o...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger
crash:

Reported-and-tested-by:
syzbot+a43060...@syzkaller.appspotmail.com

Tested on:

commit: 5fc8cb76 potential diskmap fix
git tree: https://github.com/mptre/openbsd-src diskmap
kernel config: https://syzkaller.appspot.com/x/.config?x=7f659e47e42d9641
compiler:

Note: testing is done by a robot and is best-effort only.
Reply all
Reply to author
Forward
0 new messages