uvm_fault: wsevent_fini (3)

3 views
Skip to first unread message

syzbot

unread,
Dec 4, 2020, 1:21:14 AM12/4/20
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 2724571b cat(1): remove global 'filename' variable
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=159b644d500000
kernel config: https://syzkaller.appspot.com/x/.config?x=bf87b6915a88cd0d
dashboard link: https://syzkaller.appspot.com/bug?extid=684707f0312345a090ef

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+684707...@syzkaller.appspotmail.com

uvm_fault(0xfffffd800848e450, 0x28, 0, 1) -> e
kernel: page fault trap, code=0
Stopped at wsevent_fini+0x12: movq 0x28(%r14),%r15
ddb{1}>
ddb{1}> set $lines = 0
ddb{1}> set $maxwidth = 0
ddb{1}> show panic
kernel page fault
uvm_fault(0xfffffd800848e450, 0x28, 0, 1) -> e
wsevent_fini(0) at wsevent_fini+0x12 sys/dev/wscons/wsevent.c:130
end trace frame: 0xffff8000226d10c0, count: 0
ddb{1}> trace
wsevent_fini(0) at wsevent_fini+0x12 sys/dev/wscons/wsevent.c:130
wsmouseclose(4400,81,2000,ffff80002127aa58) at wsmouseclose+0x91 sys/dev/wscons/wsmouse.c:355
spec_close(ffff8000226d1140) at spec_close+0x311 sys/kern/spec_vnops.c:560
VOP_CLOSE(fffffd806e363c38,81,fffffd807f7b7960,ffff80002127aa58) at VOP_CLOSE+0xeb sys/kern/vfs_vops.c:177
vn_closefile(fffffd806b2eb4e0,ffff80002127aa58) at vn_closefile+0xd7 vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffffd806b2eb4e0,ffff80002127aa58) at vn_closefile+0xd7 sys/kern/vfs_vnops.c:614
fdrop(fffffd806b2eb4e0,ffff80002127aa58) at fdrop+0xc2 sys/kern/kern_descrip.c:1279
closef(fffffd806b2eb4e0,ffff80002127aa58) at closef+0x11c sys/kern/kern_descrip.c:1263
fdfree(ffff80002127aa58) at fdfree+0xf4 sys/kern/kern_descrip.c:1195
exit1(ffff80002127aa58,0,0,1) at exit1+0x340 sys/kern/kern_exit.c:197
sys_exit(ffff80002127aa58,ffff8000226d13d0,ffff8000226d1420) at sys_exit+0x16 sys/kern/kern_exit.c:95
syscall(ffff8000226d14a0) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff8000226d14a0) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffe3a50, count: -12
ddb{1}> show registers
rdi 0
rsi 0xffff80002127aa5c
rbp 0xffff8000226d1070
rbx 0
rdx 0
rcx 0
rax 0xffff80002127aa58
r8 0xffffffff81e5a2be witness_assert+0x1fe
r9 0x5
r10 0x294e55dcb0073214
r11 0x29bc207035f174d
r12 0x4000 __ALIGN_SIZE+0x3000
r13 0x2000 __ALIGN_SIZE+0x1000
r14 0
r15 0
rip 0xffffffff820a3782 wsevent_fini+0x12
cs 0x8
rflags 0x10246 __ALIGN_SIZE+0xf246
rsp 0xffff8000226d1050
ss 0x10
wsevent_fini+0x12: movq 0x28(%r14),%r15
ddb{1}> show proc
PROC (syz-executor.1) pid=60031 stat=onproc
flags process=1008<EXITING,SINGLEEXIT> proc=2000<WEXIT>
pri=0, usrpri=74, nice=20
forw=0xffffffffffffffff, list=0xffff80002127b728,0xffffffff828ea588
process=0xffff800021235090 user=0xffff8000226cc000, vmspace=0xfffffd800848e450
estcpu=36, cpticks=4, pctcpu=0.0
user=0, sys=1, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
1045 343452 48749 0 3 0x82 nanosleep syz-executor.1
12348 233935 48749 0 3 0x82 nanosleep syz-executor.0
48749 522156 68142 0 3 0x82 thrsleep syz-fuzzer
48749 172268 68142 0 3 0x4000082 nanosleep syz-fuzzer
48749 345090 68142 0 3 0x4000082 thrsleep syz-fuzzer
48749 192295 68142 0 3 0x4000082 thrsleep syz-fuzzer
48749 330486 68142 0 3 0x4000082 thrsleep syz-fuzzer
48749 244764 68142 0 3 0x4000082 thrsleep syz-fuzzer
48749 150496 68142 0 3 0x4000082 thrsleep syz-fuzzer
48749 130391 68142 0 3 0x4000082 kqread syz-fuzzer
68142 306256 45520 0 3 0x10008a pause ksh
45520 92443 34186 0 3 0x92 select sshd
69737 162968 1 0 3 0x100083 ttyin getty
34186 491429 1 0 3 0x80 select sshd
69980 122940 30034 74 3 0x100092 bpf pflogd
30034 231106 1 0 3 0x80 netio pflogd
95476 295823 89564 73 3 0x100090 kqread syslogd
89564 6149 1 0 3 0x100082 netio syslogd
96455 149138 1 77 3 0x100090 poll dhclient
29480 424592 1 0 3 0x80 poll dhclient
13062 46498 0 0 3 0x14200 bored smr
92939 75015 0 0 3 0x14200 pgzero zerothread
14920 180076 0 0 3 0x14200 aiodoned aiodoned
29100 146522 0 0 3 0x14200 syncer update
34522 522196 0 0 3 0x14200 cleaner cleaner
25113 140559 0 0 3 0x14200 reaper reaper
88667 509653 0 0 3 0x14200 pgdaemon pagedaemon
18719 128584 0 0 3 0x14200 bored crynlk
90366 284977 0 0 3 0x14200 bored crypto
34847 24397 0 0 3 0x14200 bored viomb
14612 13291 0 0 3 0x40014200 acpi0 acpi0
47987 189274 0 0 3 0x40014200 idle1
14486 28722 0 0 3 0x14200 bored softnet
53929 205422 0 0 3 0x14200 bored systqmp
912 301013 0 0 3 0x14200 bored systq
54090 298898 0 0 3 0x40014200 bored softclock
81375 151611 0 0 7 0x40014200 idle0
1 150388 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 9487 6425K 6444K 78643K 13428 0
pcb 13 8K 8K 78643K 13 0
rtable 105 3K 3K 78643K 199 0
ifaddr 44 10K 10K 78643K 45 0
counters 43 33K 33K 78643K 43 0
ioctlops 0 0K 4K 78643K 1469 0
mount 1 1K 1K 78643K 1 0
vnodes 1219 77K 77K 78643K 1686 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 1825 197K 290K 78643K 13109 0
file desc 5 13K 25K 78643K 1617 0
proc 59 63K 95K 78643K 447 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 19 95K 95K 78643K 19 0
exec 0 0K 2K 78643K 358 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 78 21K 21K 78643K 3920 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 6 0K 0K 78643K 10 0
temp 66 3959K 4023K 78643K 6404 0
kqueue 3 4K 4K 78643K 3 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 19 0 17 1 0 1 1 0 8 0
rtentry 112 45 0 1 2 0 2 2 0 8 0
unpcb 120 25 0 15 1 0 1 1 0 8 0
syncache 296 4 0 4 1 1 0 1 0 8 0
tcpcb 736 10 0 6 1 0 1 1 0 8 0
inpcb 296 39 0 32 1 0 1 1 0 8 0
nd6 48 6 0 0 1 0 1 1 0 8 0
kcovpl 48 2 0 0 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 3 1 0 1 1 0 8 0
pfstkey 112 11 0 3 1 0 1 1 0 8 0
pfstate 328 11 0 3 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 188 0 0 12 0 12 12 0 8 0
art_table 32 189 0 0 2 0 2 2 0 8 0
art_node 16 44 0 4 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 3007 0 1603 88 0 88 88 0 8 0
ffsino 272 3007 0 1603 94 0 94 94 0 8 0
nchpl 144 6112 0 4506 60 0 60 60 0 8 0
uvmvnodes 72 3515 0 0 64 0 64 64 0 8 0
vnodes 208 3515 0 0 185 0 185 185 0 8 0
namei 1024 15181 0 15181 1 0 1 1 0 8 1
percpumem 16 32 0 0 1 0 1 1 0 8 0
scxspl 216 14535 0 14535 9 8 1 8 0 8 1
plimitpl 152 15 0 7 1 0 1 1 0 8 0
sigapl 424 1833 0 1801 4 0 4 4 0 8 0
futexpl 56 10163 0 10163 1 0 1 1 0 8 1
knotepl 112 62 0 42 1 0 1 1 0 8 0
kqueuepl 152 2 0 0 1 0 1 1 0 8 0
pipepl 304 76 0 65 1 0 1 1 0 8 0
fdescpl 496 1817 0 1801 3 0 3 3 0 8 0
filepl 152 7273 0 7169 5 0 5 5 0 8 0
lockfpl 104 3464 0 3462 1 0 1 1 0 8 0
lockfspl 48 1732 0 1730 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 53 0 44 1 0 1 1 0 8 0
zombiepl 144 1802 0 1800 1 0 1 1 0 8 0
processpl 1056 1833 0 1800 3 0 3 3 0 8 0
procpl 656 3435 0 3395 4 0 4 4 0 8 0
sockpl 400 83 0 64 3 1 2 3 0 8 0
mcl4k 4096 11 0 0 2 0 2 2 0 8 0
mcl2k2 2112 4 0 0 1 0 1 1 0 8 0
mcl2k 2048 98 0 0 13 0 13 13 0 8 0
mtagpl 96 1 0 0 1 0 1 1 0 8 0
mbufpl 256 190 0 0 11 0 11 11 0 8 0
bufpl 280 5121 0 181 353 0 353 353 0 8 0
anonpl 16 119771 0 115734 18 1 17 17 0 124 0
amapchunkpl 152 5857 0 5726 7 1 6 7 0 158 0
amappl16 192 5040 0 4913 7 0 7 7 0 8 0
amappl15 184 1 0 0 1 0 1 1 0 8 0
amappl14 176 23 0 19 1 0 1 1 0 8 0
amappl13 168 816 0 811 1 0 1 1 0 8 0
amappl12 160 13 0 8 1 0 1 1 0 8 0
amappl11 152 861 0 844 1 0 1 1 0 8 0
amappl10 144 8 0 6 1 0 1 1 0 8 0
amappl9 136 388 0 387 1 0 1 1 0 8 0
amappl8 128 108 0 86 1 0 1 1 0 8 0
amappl7 120 243 0 236 1 0 1 1 0 8 0
amappl6 112 69 0 59 1 0 1 1 0 8 0
amappl5 104 1954 0 1935 1 0 1 1 0 8 0
amappl4 96 1073 0 1051 1 0 1 1 0 8 0
amappl3 88 914 0 905 1 0 1 1 0 8 0
amappl2 80 12070 0 12003 3 1 2 3 0 8 0
amappl1 72 57658 0 57172 24 14 10 19 0 8 0
amappl 80 3680 0 3636 1 0 1 1 0 84 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 1817 0 1801 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 1817 0 1801 1 0 1 1 0 8 0
vmmpekpl 168 11153 0 11131 2 0 2 2 0 8 0
vmmpepl 168 220971 0 219674 81 19 62 77 0 357 0
vmsppl 368 1816 0 1801 2 0 2 2 0 8 0
pdppl 4096 3641 0 3602 57 16 41 45 0 8 2
pvpl 32 415640 0 408376 119 21 98 119 0 265 38
pmappl 232 1816 0 1801 2 1 1 2 0 8 0
extentpl 40 58 0 40 1 0 1 1 0 8 0
phpool 112 293 0 20 8 0 8 8 0 8 0
ddb{1}> machine ddbcpu 0
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
ddb{0}> trace
x86_ipi_db(ffffffff826b7ff0) 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+0x37 kd_curproc sys/dev/kcov.c:570 [inline]
__sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x37 sys/dev/kcov.c:143
__mp_lock(ffffffff828ea210) at __mp_lock+0x133 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff828ea210) at __mp_lock+0x133 sys/kern/kern_lock.c:147
softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:90
Xsoftclock() at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffffffff826b7ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: -9
ddb{0}> machine ddbcpu 1
Stopped at wsevent_fini+0x12: movq 0x28(%r14),%r15
ddb{1}> trace
wsevent_fini(0) at wsevent_fini+0x12 sys/dev/wscons/wsevent.c:130
wsmouseclose(4400,81,2000,ffff80002127aa58) at wsmouseclose+0x91 sys/dev/wscons/wsmouse.c:355
spec_close(ffff8000226d1140) at spec_close+0x311 sys/kern/spec_vnops.c:560
VOP_CLOSE(fffffd806e363c38,81,fffffd807f7b7960,ffff80002127aa58) at VOP_CLOSE+0xeb sys/kern/vfs_vops.c:177
vn_closefile(fffffd806b2eb4e0,ffff80002127aa58) at vn_closefile+0xd7 vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffffd806b2eb4e0,ffff80002127aa58) at vn_closefile+0xd7 sys/kern/vfs_vnops.c:614
fdrop(fffffd806b2eb4e0,ffff80002127aa58) at fdrop+0xc2 sys/kern/kern_descrip.c:1279
closef(fffffd806b2eb4e0,ffff80002127aa58) at closef+0x11c sys/kern/kern_descrip.c:1263
fdfree(ffff80002127aa58) at fdfree+0xf4 sys/kern/kern_descrip.c:1195
exit1(ffff80002127aa58,0,0,1) at exit1+0x340 sys/kern/kern_exit.c:197
sys_exit(ffff80002127aa58,ffff8000226d13d0,ffff8000226d1420) at sys_exit+0x16 sys/kern/kern_exit.c:95
syscall(ffff8000226d14a0) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff8000226d14a0) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffe3a50, count: -12


---
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,
Dec 4, 2020, 1:37:23 AM12/4/20
to syzkaller-o...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 2724571b cat(1): remove global 'filename' variable
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=16a5553b500000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10d0606d500000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1609364b500000

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

uvm_fault(0xfffffd800848ea10, 0x28, 0, 1) -> e
kernel: page fault trap, code=0
Stopped at wsevent_fini+0x12: movq 0x28(%r14),%r15
ddb{1}>
ddb{1}> set $lines = 0
ddb{1}> set $maxwidth = 0
ddb{1}> show panic
kernel page fault
uvm_fault(0xfffffd800848ea10, 0x28, 0, 1) -> e
wsevent_fini(0) at wsevent_fini+0x12 sys/dev/wscons/wsevent.c:130
end trace frame: 0xffff80002126d490, count: 0
ddb{1}> trace
wsevent_fini(0) at wsevent_fini+0x12 sys/dev/wscons/wsevent.c:130
wsmouseclose(4400,81,2000,ffff8000211c2008) at wsmouseclose+0x91 sys/dev/wscons/wsmouse.c:355
spec_close(ffff80002126d510) at spec_close+0x311 sys/kern/spec_vnops.c:560
VOP_CLOSE(fffffd806e678688,81,fffffd807f7b7b40,ffff8000211c2008) at VOP_CLOSE+0xeb sys/kern/vfs_vops.c:177
vn_closefile(fffffd806eb25e48,ffff8000211c2008) at vn_closefile+0xd7 vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffffd806eb25e48,ffff8000211c2008) at vn_closefile+0xd7 sys/kern/vfs_vnops.c:614
fdrop(fffffd806eb25e48,ffff8000211c2008) at fdrop+0xc2 sys/kern/kern_descrip.c:1279
closef(fffffd806eb25e48,ffff8000211c2008) at closef+0x11c sys/kern/kern_descrip.c:1263
fdfree(ffff8000211c2008) at fdfree+0xf4 sys/kern/kern_descrip.c:1195
exit1(ffff8000211c2008,0,0,1) at exit1+0x340 sys/kern/kern_exit.c:197
sys_exit(ffff8000211c2008,ffff80002126d7a0,ffff80002126d7f0) at sys_exit+0x16 sys/kern/kern_exit.c:95
syscall(ffff80002126d870) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff80002126d870) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffd3cc0, count: -12
ddb{1}> show registers
rdi 0
rsi 0xffff8000211c200c
rbp 0xffff80002126d440
rbx 0
rdx 0x8b
rcx 0
rax 0x1
r8 0xffffffff81e5a2be witness_assert+0x1fe
r9 0x5
r10 0x50c3f31ce569cd00
r11 0x2f780684fcac36fb
r12 0x4000 __ALIGN_SIZE+0x3000
r13 0x2000 __ALIGN_SIZE+0x1000
r14 0
r15 0
rip 0xffffffff820a3782 wsevent_fini+0x12
cs 0x8
rflags 0x10246 __ALIGN_SIZE+0xf246
rsp 0xffff80002126d420
ss 0x10
wsevent_fini+0x12: movq 0x28(%r14),%r15
ddb{1}> show proc
PROC (syz-executor0371) pid=500180 stat=onproc
flags process=8<EXITING> proc=2000<WEXIT>
pri=0, usrpri=86, nice=20
forw=0xffffffffffffffff, list=0xffff8000ffff6a50,0xffffffff828ea588
process=0xffff8000212354b0 user=0xffff800021268000, vmspace=0xfffffd800848ea10
estcpu=36, cpticks=1, pctcpu=0.0
user=0, sys=1, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
16899 517590 12473 0 3 0x80 nanosleep syz-executor0371
34123 340221 12473 0 3 0x80 nanosleep syz-executor0371
12473 45085 97766 0 3 0x82 nanosleep syz-executor0371
97766 145901 46949 0 3 0x10008a pause ksh
46949 424433 20250 0 3 0x92 select sshd
67443 31530 1 0 3 0x100083 ttyin getty
20250 130389 1 0 3 0x80 select sshd
94938 246857 56078 74 3 0x100092 bpf pflogd
56078 428767 1 0 3 0x80 netio pflogd
6573 209361 15465 73 3 0x100090 kqread syslogd
15465 200168 1 0 3 0x100082 netio syslogd
93692 422475 1 77 3 0x100090 poll dhclient
97424 443748 1 0 3 0x80 poll dhclient
29576 292105 0 0 3 0x14200 bored smr
13589 162249 0 0 3 0x14200 pgzero zerothread
75563 234572 0 0 3 0x14200 aiodoned aiodoned
59858 369105 0 0 3 0x14200 syncer update
99626 66242 0 0 3 0x14200 cleaner cleaner
45536 319786 0 0 3 0x14200 reaper reaper
74126 402768 0 0 3 0x14200 pgdaemon pagedaemon
35159 72372 0 0 3 0x14200 bored crynlk
73122 121579 0 0 3 0x14200 bored crypto
85253 11926 0 0 3 0x14200 bored viomb
4407 462083 0 0 3 0x40014200 acpi0 acpi0
61668 10261 0 0 3 0x40014200 idle1
50376 42577 0 0 3 0x14200 bored softnet
92225 523081 0 0 3 0x14200 bored systqmp
63796 338259 0 0 3 0x14200 bored systq
53062 169768 0 0 3 0x40014200 bored softclock
28312 42800 0 0 7 0x40014200 idle0
1 146310 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 9480 6413K 6431K 78643K 10669 0
pcb 13 8K 8K 78643K 13 0
rtable 61 2K 2K 78643K 127 0
ifaddr 29 8K 8K 78643K 30 0
counters 39 33K 33K 78643K 39 0
ioctlops 0 0K 4K 78643K 1467 0
mount 1 1K 1K 78643K 1 0
vnodes 1185 75K 75K 78643K 1224 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 1825 197K 290K 78643K 13109 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 19 95K 95K 78643K 19 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 41 2K 2K 78643K 633 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 3957K 4021K 78643K 1791 0
kqueue 2 2K 2K 78643K 2 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 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 296 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 328 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 96 0 0 6 0 6 6 0 8 0
art_table 32 97 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 1436 0 50 87 0 87 87 0 8 0
ffsino 272 1436 0 50 93 0 93 93 0 8 0
nchpl 144 1646 0 103 59 1 58 58 0 8 0
uvmvnodes 72 1482 0 0 27 0 27 27 0 8 0
vnodes 208 1482 0 0 78 0 78 78 0 8 0
namei 1024 4034 0 4034 2 1 1 1 0 8 1
percpumem 16 30 0 0 1 0 1 1 0 8 0
scxspl 216 3771 0 3771 10 9 1 8 0 8 1
plimitpl 152 14 0 8 1 0 1 1 0 8 0
sigapl 424 259 0 227 4 0 4 4 0 8 0
knotepl 112 5 0 0 1 0 1 1 0 8 0
kqueuepl 152 1 0 0 1 0 1 1 0 8 0
pipepl 304 64 0 60 2 1 1 1 0 8 0
fdescpl 496 243 0 227 3 0 3 3 0 8 0
filepl 152 1099 0 1050 3 0 3 3 0 8 1
lockfpl 104 75 0 74 1 0 1 1 0 8 0
lockfspl 48 38 0 37 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 62 0 53 1 0 1 1 0 8 0
zombiepl 144 228 0 226 2 1 1 1 0 8 0
processpl 1056 259 0 226 3 0 3 3 0 8 0
procpl 656 259 0 226 3 0 3 3 0 8 0
sockpl 400 73 0 55 2 0 2 2 0 8 0
mcl4k 4096 1 0 0 1 0 1 1 0 8 0
mcl2k 2048 81 0 0 10 0 10 10 0 8 0
mtagpl 96 1 0 0 1 0 1 1 0 8 0
mbufpl 256 100 0 0 6 0 6 6 0 8 0
bufpl 280 2014 0 112 136 0 136 136 0 8 0
anonpl 16 20020 0 18751 8 2 6 7 0 124 0
amapchunkpl 152 549 0 509 2 0 2 2 0 158 0
amappl16 192 119 0 108 1 0 1 1 0 8 0
amappl15 184 1 0 0 1 0 1 1 0 8 0
amappl14 176 22 0 19 1 0 1 1 0 8 0
amappl13 168 14 0 13 2 1 1 1 0 8 0
amappl12 160 7 0 7 1 1 0 1 0 8 0
amappl11 152 54 0 39 1 0 1 1 0 8 0
amappl10 144 9 0 7 1 0 1 1 0 8 0
amappl9 136 220 0 220 2 1 1 1 0 8 1
amappl8 128 58 0 57 1 0 1 1 0 8 0
amappl7 120 209 0 208 1 0 1 1 0 8 0
amappl6 112 57 0 50 1 0 1 1 0 8 0
amappl5 104 356 0 336 1 0 1 1 0 8 0
amappl4 96 279 0 254 1 0 1 1 0 8 0
amappl3 88 139 0 131 1 0 1 1 0 8 0
amappl2 80 873 0 818 3 1 2 2 0 8 0
amappl1 72 14350 0 13911 15 6 9 15 0 8 0
amappl 80 440 0 417 1 0 1 1 0 84 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 243 0 227 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 243 0 227 1 0 1 1 0 8 0
vmmpekpl 168 5656 0 5639 1 0 1 1 0 8 0
vmmpepl 168 30905 0 29986 55 13 42 48 0 357 0
vmsppl 368 242 0 227 2 0 2 2 0 8 0
pdppl 4096 493 0 454 59 18 41 41 0 8 2
pvpl 32 82242 0 79109 33 4 29 29 0 265 2
pmappl 232 242 0 227 1 0 1 1 0 8 0
extentpl 40 58 0 40 1 0 1 1 0 8 0
phpool 112 278 0 22 8 0 8 8 0 8 0
ddb{1}> machine ddbcpu 0
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
ddb{0}> trace
x86_ipi_db(ffffffff826b7ff0) 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(ffffffff828ea210) at __mp_lock+0x133 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff828ea210) at __mp_lock+0x133 sys/kern/kern_lock.c:147
softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:90
Xsoftclock() at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffffffff826b7ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: -8
ddb{0}> machine ddbcpu 1
Stopped at wsevent_fini+0x12: movq 0x28(%r14),%r15
ddb{1}> trace
wsevent_fini(0) at wsevent_fini+0x12 sys/dev/wscons/wsevent.c:130
wsmouseclose(4400,81,2000,ffff8000211c2008) at wsmouseclose+0x91 sys/dev/wscons/wsmouse.c:355
spec_close(ffff80002126d510) at spec_close+0x311 sys/kern/spec_vnops.c:560
VOP_CLOSE(fffffd806e678688,81,fffffd807f7b7b40,ffff8000211c2008) at VOP_CLOSE+0xeb sys/kern/vfs_vops.c:177
vn_closefile(fffffd806eb25e48,ffff8000211c2008) at vn_closefile+0xd7 vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffffd806eb25e48,ffff8000211c2008) at vn_closefile+0xd7 sys/kern/vfs_vnops.c:614
fdrop(fffffd806eb25e48,ffff8000211c2008) at fdrop+0xc2 sys/kern/kern_descrip.c:1279
closef(fffffd806eb25e48,ffff8000211c2008) at closef+0x11c sys/kern/kern_descrip.c:1263
fdfree(ffff8000211c2008) at fdfree+0xf4 sys/kern/kern_descrip.c:1195
exit1(ffff8000211c2008,0,0,1) at exit1+0x340 sys/kern/kern_exit.c:197
sys_exit(ffff8000211c2008,ffff80002126d7a0,ffff80002126d7f0) at sys_exit+0x16 sys/kern/kern_exit.c:95
syscall(ffff80002126d870) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff80002126d870) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffd3cc0, count: -12
ddb{1}>

Greg Steuck

unread,
Dec 5, 2020, 12:22:57 AM12/5/20
to syzbot, 'Dmitry Vyukov' via syzkaller-openbsd-bugs
The repro causes these complaints in dmesg (but no crash so far):

wsmouse0: can't attach mux (error=16)
wsevent_fini: already invoked
wsmouse0: can't attach mux (error=16)
wsevent_fini: already invoked

16 is EBUSY, so this appears to be a race of some sort.

Anton Lindqvist

unread,
Dec 5, 2020, 2:55:36 AM12/5/20
to Greg Steuck, syzbot, 'Dmitry Vyukov' via syzkaller-openbsd-bugs
Correct, I'm on this one and managed to get it crashing more reliably
(what a sentence!) with some kernel tweaks.

syzbot

unread,
Dec 5, 2020, 4:53:04 AM12/5/20
to an...@basename.se, syzkaller-o...@googlegroups.com
Hello,

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

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

Tested on:

commit: 0432766f tentative fix
git tree: https://github.com/mptre/openbsd-src wscons
compiler:

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