uvm_fault: pmap_page_remove (5)

0 views
Skip to first unread message

syzbot

unread,
Dec 9, 2023, 12:23:26 PM12/9/23
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 102443c78d43 Following a failed fetch, use a previously ca..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=10fcd56ce80000
kernel config: https://syzkaller.appspot.com/x/.config?x=1bc15e68cd2a49e5
dashboard link: https://syzkaller.appspot.com/bug?extid=0e8e99dda7054813071b

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/bb8037b70396/disk-102443c7.raw.xz
bsd.gdb: https://storage.googleapis.com/syzbot-assets/c9ee40b5fcf0/bsd-102443c7.gdb.xz
kernel image: https://storage.googleapis.com/syzbot-assets/35b804c1dd6c/kernel-102443c7.xz

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

uvm_fault(0xffffffff82c71320, 0x7fba76dc3ff8, 0, 2) -> e
kernel: page fault trap, code=2
Stopped at pmap_page_remove+0x30d: xchgq %rax,0(%r15,%rcx,1)
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*265606 39917 0 0x14000 0x200 0 reaper
pmap_page_remove(fffffd80067c1780) at pmap_page_remove+0x30d _atomic_swap_64 machine/atomic.h:117 [inline]
pmap_page_remove(fffffd80067c1780) at pmap_page_remove+0x30d sys/arch/amd64/amd64/pmap.c:1984
uvm_anfree_list(fffffd8069600a20,ffff8000216322b8) at uvm_anfree_list+0x98
amap_wipeout(fffffd806b737170) at amap_wipeout+0x1c1 sys/uvm/uvm_amap.c:504
uvm_unmap_detach(ffff800021632380,1) at uvm_unmap_detach+0x7d sys/uvm/uvm_map.c:1366
uvm_map_teardown(fffffd80702d12e8) at uvm_map_teardown+0x28f sys/uvm/uvm_map.c:2587
uvmspace_free(fffffd80702d12e8) at uvmspace_free+0x96 sys/uvm/uvm_map.c:3503
reaper(ffff800021634548) at reaper+0x15d sys/kern/kern_exit.c:458
end trace frame: 0x0, count: 8
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: uvm_fault(0xffffffff82c71320, 0x7fba76dc3ff8, 0, 2) -> e
ddb> trace
pmap_page_remove(fffffd80067c1780) at pmap_page_remove+0x30d _atomic_swap_64 machine/atomic.h:117 [inline]
pmap_page_remove(fffffd80067c1780) at pmap_page_remove+0x30d sys/arch/amd64/amd64/pmap.c:1984
uvm_anfree_list(fffffd8069600a20,ffff8000216322b8) at uvm_anfree_list+0x98
amap_wipeout(fffffd806b737170) at amap_wipeout+0x1c1 sys/uvm/uvm_amap.c:504
uvm_unmap_detach(ffff800021632380,1) at uvm_unmap_detach+0x7d sys/uvm/uvm_map.c:1366
uvm_map_teardown(fffffd80702d12e8) at uvm_map_teardown+0x28f sys/uvm/uvm_map.c:2587
uvmspace_free(fffffd80702d12e8) at uvmspace_free+0x96 sys/uvm/uvm_map.c:3503
reaper(ffff800021634548) at reaper+0x15d sys/kern/kern_exit.c:458
end trace frame: 0x0, count: -7
ddb> show registers
rdi 0
rsi 0
rbp 0xffff800021632260
rbx 0
rdx 0
rcx 0x7f8000000000
rax 0
r8 0
r9 0
r10 0xc095109198c891ec
r11 0x5f697c917d76fd80
r12 0x7fbfc0000000
r13 0xfffffd80697b41c0
r14 0x800000007f7cb000
r15 0x3a76dc3ff8
rip 0xffffffff826d65dd pmap_page_remove+0x30d
cs 0x8
rflags 0x10246 __ALIGN_SIZE+0xf246
rsp 0xffff8000216321d0
ss 0x10
pmap_page_remove+0x30d: xchgq %rax,0(%r15,%rcx,1)
ddb> show proc
PROC (reaper) tid=265606 pid=39917 tcnt=1 stat=onproc
flags process=14000<NOZOMBIE,SYSTEM> proc=200<SYSTEM>
runpri=86, usrpri=86, slppri=17, nice=20
wchan=0x0, wmesg=, ps_single=0x0
forw=0xffffffffffffffff, list=0xffff8000215ead38,0xffff800021633ab8
process=0xffff8000ffffcbd8 user=0xffff80002162d000, vmspace=0xffffffff82c71320
estcpu=36, cpticks=74, pctcpu=20.36, user=0, sys=23, intr=0
ddb> ps
PID TID PPID UID S FLAGS WAIT COMMAND
86807 44286 0 0 3 0x14280 nfsidl nfsio
47647 291684 0 0 3 0x14280 nfsidl nfsio
6100 434567 0 0 3 0x14280 nfsidl nfsio
57353 98168 0 0 3 0x14280 nfsidl nfsio
2400 402321 0 0 3 0x14280 nfsidl nfsio
90133 376765 0 0 3 0x14280 nfsidl nfsio
46930 238 0 0 3 0x14280 nfsidl nfsio
80358 161371 0 0 3 0x14280 nfsidl nfsio
54527 47051 0 0 3 0x14280 nfsidl nfsio
92198 196463 0 0 3 0x14280 nfsidl nfsio
43438 311151 0 0 3 0x14280 nfsidl nfsio
7784 409303 0 0 3 0x14280 nfsidl nfsio
83817 388101 0 0 3 0x14280 nfsidl nfsio
55530 245402 0 0 3 0x14280 nfsidl nfsio
88875 89000 0 0 3 0x14280 nfsidl nfsio
6613 91939 0 0 3 0x14280 nfsidl nfsio
41638 451344 0 0 3 0x14280 nfsidl nfsio
58129 78920 0 0 3 0x14280 nfsidl nfsio
35010 168219 0 0 3 0x14280 nfsidl nfsio
65490 92943 0 0 3 0x14280 nfsidl nfsio
42672 338432 0 0 3 0x14200 bored sosplice
77033 20682 88742 0 3 0x82 wait syz-executor.6
78051 309690 88742 0 3 0x82 wait syz-executor.4
66796 156536 88742 0 3 0x82 wait syz-executor.2
88742 401025 96686 0 3 0x2000002 inode syz-fuzzer
88742 263930 96686 0 2 0x6000482 syz-fuzzer
88742 260397 96686 0 2 0x6000002 syz-fuzzer
88742 130927 96686 0 3 0x6000082 wait syz-fuzzer
88742 137786 96686 0 3 0x6000082 wait syz-fuzzer
88742 391960 96686 0 3 0x6000082 thrsleep syz-fuzzer
88742 389098 96686 0 3 0x6000082 thrsleep syz-fuzzer
88742 402356 96686 0 3 0x6000082 thrsleep syz-fuzzer
88742 515999 96686 0 3 0x6000082 wait syz-fuzzer
88742 500062 96686 0 3 0x6000002 inode syz-fuzzer
88742 367015 96686 0 3 0x6000082 thrsleep syz-fuzzer
88742 113396 96686 0 3 0x6000082 wait syz-fuzzer
88742 515982 96686 0 3 0x6000082 thrsleep syz-fuzzer
88742 241196 96686 0 3 0x6000082 wait syz-fuzzer
96686 513770 35145 0 3 0x10008a sigsusp ksh
35145 167099 46218 0 3 0x9a kqread sshd
18131 483350 1 0 3 0x100083 ttyin getty
46218 406026 1 0 3 0x88 kqread sshd
73750 105395 70444 73 2 0x1100010 syslogd
70444 403347 1 0 3 0x100082 netio syslogd
24326 240319 1 0 3 0x100080 kqread resolvd
34743 190699 22603 77 3 0x100092 kqread dhcpleased
96689 338135 22603 77 3 0x100092 kqread dhcpleased
22603 61276 1 0 3 0x80 kqread dhcpleased
67815 369476 0 0 3 0x14200 bored smr
79595 310922 0 0 2 0x14200 zerothread
44088 350548 0 0 3 0x14200 aiodoned aiodoned
23781 498425 0 0 3 0x14200 syncer update
35215 455734 0 0 3 0x14200 cleaner cleaner
*39917 265606 0 0 7 0x14200 reaper
39025 433597 0 0 3 0x14200 pgdaemon pagedaemon
98853 90857 0 0 3 0x14200 bored viomb
7072 217931 0 0 3 0x40014200 acpi0 acpi0
75243 291516 0 0 3 0x14200 bored softnet3
38731 354361 0 0 3 0x14200 bored softnet2
50821 52442 0 0 3 0x14200 bored softnet1
77485 127349 0 0 3 0x14200 bored softnet0
7399 433454 0 0 3 0x14200 bored systqmp
22740 430755 0 0 3 0x14200 bored systq
26830 385697 0 0 3 0x40014200 tmoslp softclock
16285 94804 0 0 3 0x40014200 idle0
1 117439 0 0 3 0x82 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 10169 6469K 8148K 78643K 12513 0
pcb 13 8K 8K 78643K 104 0
rtable 146 4K 7K 78643K 417 0
pf 24 8K 9K 78643K 34 0
ifaddr 28 8K 11K 78643K 50 0
ifgroup 39 1K 2K 78643K 59 0
sysctl 2 0K 0K 78643K 2 0
counters 25 17K 17K 78643K 30 0
ioctlops 0 0K 2K 78643K 38 0
iov 0 0K 8K 78643K 64 0
mount 1 1K 1K 78643K 1 0
log 0 0K 0K 78643K 4 0
vnodes 1288 81K 81K 78643K 1820 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 135 0
dirhash 12 2K 3K 78643K 51 0
ACPI 1697 195K 286K 78643K 12548 0
file desc 6 17K 65K 78643K 1749 0
sigio 0 0K 0K 78643K 7 0
proc 57 59K 83K 78643K 510 0
subproc 52 3K 6K 78643K 121 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
ip_moptions 0 0K 0K 78643K 67 0
in_multi 55 4K 7K 78643K 110 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 79 360K 360K 78643K 79 0
exec 0 0K 1K 78643K 426 0
tdb 3 0K 0K 78643K 3 0
pagedep 1 8K 8K 78643K 1 0
inodedep 1 32K 32K 78643K 1 0
newblk 1 0K 0K 78643K 1 0
VM swap 8 62K 64K 78643K 10 0
UVM amap 256 54K 90K 78643K 17202 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 1K 78643K 110 0
NDP 8 0K 2K 78643K 31 0
temp 32 5907K 6094K 78643K 9956 0
kqueue 12 18K 26K 78643K 121 0
SYN cache 2 16K 16K 78643K 2 0
ddb> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
rtpcb 120 68 0 65 1 0 1 1 0 8 0
rtentry 112 127 0 61 4 0 4 4 0 8 0
unpcb 144 613 0 600 3 2 1 2 0 8 0
syncache 312 99 0 99 3 3 0 1 0 8 0
tcpqe 32 230 0 230 6 6 0 1 0 8 0
tcpcb 808 490 0 470 9 5 4 7 0 8 0
arp 88 21 0 11 1 0 1 1 0 8 0
ipq 40 1 0 1 1 1 0 1 0 8 0
ipqe 40 4 0 4 1 1 0 1 0 8 0
inpcb 336 1022 0 999 9 6 3 7 0 8 0
nd6 104 31 0 19 1 0 1 1 0 8 0
pkpcb 40 21 0 21 2 2 0 1 0 8 0
kcovpl 48 9 0 5 1 0 1 1 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 520 0 243 29 6 23 29 0 8 0
art_table 32 521 0 243 4 0 4 4 0 8 0
art_node 16 126 0 66 1 0 1 1 0 8 0
sysvmsgpl 40 10 0 0 1 0 1 1 0 8 0
semapl 112 133 0 123 1 0 1 1 0 8 0
dirhash 1024 43 0 26 3 0 3 3 0 8 0
dino2pl 256 3789 0 2345 92 0 92 92 0 8 0
ffsino 240 3789 0 2345 86 0 86 86 0 8 0
nchpl 144 5931 0 4300 63 0 63 63 0 8 0
uvmvnodes 80 4171 0 0 86 0 86 86 0 8 0
vnodes 216 4171 0 0 232 0 232 232 0 8 0
namei 1024 16334 0 16331 7 6 1 2 0 8 0
kstatmem 264 26 0 10 2 0 2 2 0 8 0
scxspl 216 19733 0 19733 10 9 1 8 1 8 1
plimitpl 152 122 0 109 1 0 1 1 0 8 0
sigapl 424 2068 0 2008 8 0 8 8 0 8 0
futexpl 64 13913 0 13913 3 3 0 1 0 8 0
knotepl 120 16382 0 16322 4 0 4 4 0 8 0
kqueuepl 184 177 0 169 1 0 1 1 0 8 0
pipepl 288 174 0 156 5 3 2 3 0 8 0
fdescpl 432 2031 0 2014 4 0 4 4 0 8 0
filepl 120 6591 0 6437 8 0 8 8 0 8 0
lockfpl 104 492 0 490 1 0 1 1 0 8 0
lockfspl 48 183 0 181 1 0 1 1 0 8 0
sessionpl 144 24 0 11 1 0 1 1 0 8 0
pgrppl 48 28 0 15 1 0 1 1 0 8 0
ucredpl 104 833 0 823 1 0 1 1 0 8 0
zombiepl 144 2015 0 2008 1 0 1 1 0 8 0
processpl 1008 2068 0 2008 10 1 9 9 0 8 0
procpl 680 3971 0 3892 10 2 8 8 0 8 0
sosppl 168 45 0 45 2 2 0 1 0 8 0
sockpl 456 1724 0 1685 15 7 8 12 0 8 0
mcl64k 65536 217 0 217 3 3 0 2 0 8 0
mcl16k 16384 60 0 60 1 1 0 1 0 8 0
mcl12k 12288 64 0 64 1 1 0 1 0 8 0
mcl9k 9216 44 0 44 2 2 0 1 0 8 0
mcl8k 8192 57 0 57 2 2 0 1 0 8 0
mcl4k 4096 75 0 75 1 1 0 1 0 8 0
mcl2k2 2112 10 0 10 1 1 0 1 0 8 0
mcl2k 2048 23483 0 23424 39 28 11 29 0 8 0
mtagpl 96 175 0 113 5 1 4 4 0 8 0
mbufpl 256 95307 0 95100 235 199 36 173 0 8 2
bufpl 288 9032 0 2583 461 0 461 461 0 8 0
anonpl 24 432810 0 419482 362 76 286 346 0 188 188
amapchunkpl 152 60030 0 58931 155 25 130 146 0 158 78
amappl16 200 9504 0 9363 60 52 8 59 0 8 0
amappl15 192 7 0 7 1 1 0 1 0 8 0
amappl14 184 155 0 143 2 1 1 2 0 8 0
amappl13 176 5 0 5 1 1 0 1 0 8 0
amappl12 168 2670 0 2647 2 0 2 2 0 8 0
amappl11 160 62 0 51 1 0 1 1 0 8 0
amappl10 152 33 0 27 1 0 1 1 0 8 0
amappl9 144 185 0 184 1 0 1 1 0 8 0
amappl8 136 214 0 159 2 0 2 2 0 8 0
amappl7 128 227 0 208 2 0 2 2 0 8 0
amappl6 120 273 0 263 1 0 1 1 0 8 0
amappl5 112 138 0 129 1 0 1 1 0 8 0
amappl4 104 425 0 404 2 1 1 2 0 8 0
amappl3 96 11323 0 11253 3 0 3 3 0 8 0
amappl2 88 2536 0 2470 3 1 2 3 0 8 0
amappl1 80 15018 0 14529 22 10 12 22 0 8 0
amappl 88 16648 0 16486 5 0 5 5 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 72 2 0 0 1 0 1 1 0 8 0
uaddrrnd 24 2031 0 2009 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 2031 0 2009 1 0 1 1 0 8 0
vmmpekpl 168 17472 0 17421 3 0 3 3 0 8 0
vmmpepl 168 134618 0 132919 145 43 102 128 0 357 18
vmsppl 368 2030 0 2008 3 0 3 3 0 8 0
rwobjpl 24 42854 0 37638 35 1 34 35 0 8 0
pdppl 4096 4069 0 4016 105 52 53 65 0 8 0
pvpl 32 1000208 0 989282 688 294 394 657 0 265 265
pmappl 216 2030 0 2008 2 0 2 2 0 8 0
extentpl 40 56 0 38 1 0 1 1 0 8 0
phpool 112 1107 0 319 28 0 28 28 0 8 0
ddb> machine ddbcpu 0
No such command
ddb> trace
pmap_page_remove(fffffd80067c1780) at pmap_page_remove+0x30d _atomic_swap_64 machine/atomic.h:117 [inline]
pmap_page_remove(fffffd80067c1780) at pmap_page_remove+0x30d sys/arch/amd64/amd64/pmap.c:1984
uvm_anfree_list(fffffd8069600a20,ffff8000216322b8) at uvm_anfree_list+0x98
amap_wipeout(fffffd806b737170) at amap_wipeout+0x1c1 sys/uvm/uvm_amap.c:504
uvm_unmap_detach(ffff800021632380,1) at uvm_unmap_detach+0x7d sys/uvm/uvm_map.c:1366
uvm_map_teardown(fffffd80702d12e8) at uvm_map_teardown+0x28f sys/uvm/uvm_map.c:2587
uvmspace_free(fffffd80702d12e8) at uvmspace_free+0x96 sys/uvm/uvm_map.c:3503
reaper(ffff800021634548) at reaper+0x15d sys/kern/kern_exit.c:458
end trace frame: 0x0, count: -7
ddb> machine ddbcpu 1
No such command
ddb> trace
pmap_page_remove(fffffd80067c1780) at pmap_page_remove+0x30d _atomic_swap_64 machine/atomic.h:117 [inline]
pmap_page_remove(fffffd80067c1780) at pmap_page_remove+0x30d sys/arch/amd64/amd64/pmap.c:1984
uvm_anfree_list(fffffd8069600a20,ffff8000216322b8) at uvm_anfree_list+0x98
amap_wipeout(fffffd806b737170) at amap_wipeout+0x1c1 sys/uvm/uvm_amap.c:504
uvm_unmap_detach(ffff800021632380,1) at uvm_unmap_detach+0x7d sys/uvm/uvm_map.c:1366
uvm_map_teardown(fffffd80702d12e8) at uvm_map_teardown+0x28f sys/uvm/uvm_map.c:2587
uvmspace_free(fffffd80702d12e8) at uvmspace_free+0x96 sys/uvm/uvm_map.c:3503
reaper(ffff800021634548) at reaper+0x15d sys/kern/kern_exit.c:458
end trace frame: 0x0, count: -7


---
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.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages