panic: vmmaplk: lock not shared

3 views
Skip to first unread message

syzbot

unread,
Jan 27, 2019, 12:19:03 AM1/27/19
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: fdee2cadce4b fix trustanchor path; from Caspar Schutijser...
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=17447128c00000
kernel config: https://syzkaller.appspot.com/x/.config?x=3303344588104330
dashboard link: https://syzkaller.appspot.com/bug?extid=9972088c1026668c6c5c
compiler:

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

panic: vmmaplk: lock not shared
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*364773 44897 0 0 0x4000000 1K syz-executor1
485634 13375 0 0 0 0 syz-executor0
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399
panic() at panic+0x16c sys/kern/subr_prf.c:208
_rw_exit_read(ffff800020b93530,30c,ffff800020cc8f78) at _rw_exit_read+0x12b
sys/kern/kern_rwlock.c:355
uvm_fault(a5ff9a4b8bc565a9,ffff800020b93530,0,ffffffff81156c90) at
uvm_fault+0x23bb uvmfault_unlockall sys/uvm/uvm_fault.c:1388 [inline]
uvm_fault(a5ff9a4b8bc565a9,ffff800020b93530,0,ffffffff81156c90) at
uvm_fault+0x23bb sys/uvm/uvm_fault.c:1266
pageflttrap() at pageflttrap+0x216 sys/arch/amd64/amd64/trap.c:200
kerntrap(42871b6ecba3ddc6) at kerntrap+0xeb sys/arch/amd64/amd64/trap.c:294
alltraps_kern(6,4,2,0,fffffd806768aad0,ffff800020b93530) at
alltraps_kern+0x7b
copyin(2067de70ff58326b,0,ffff800020b93530,4f7a2a99118,0,760) at copyin+0x56
syscall(aadab7a326e03d6f) at syscall+0x5a0 mi_syscall
sys/sys/syscall_mi.h:99 [inline]
syscall(aadab7a326e03d6f) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583
Xsyscall(6,0,ffffffffffffff43,0,5,4f55e6fd0d8) at Xsyscall+0x128
end of kernel
end trace frame: 0x4f7a2a991a0, 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}> show panic
vmmaplk: lock not shared
ddb{1}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399
panic() at panic+0x16c sys/kern/subr_prf.c:208
_rw_exit_read(ffff800020b93530,30c,ffff800020cc8f78) at _rw_exit_read+0x12b
sys/kern/kern_rwlock.c:355
uvm_fault(a5ff9a4b8bc565a9,ffff800020b93530,0,ffffffff81156c90) at
uvm_fault+0x23bb uvmfault_unlockall sys/uvm/uvm_fault.c:1388 [inline]
uvm_fault(a5ff9a4b8bc565a9,ffff800020b93530,0,ffffffff81156c90) at
uvm_fault+0x23bb sys/uvm/uvm_fault.c:1266
pageflttrap() at pageflttrap+0x216 sys/arch/amd64/amd64/trap.c:200
kerntrap(42871b6ecba3ddc6) at kerntrap+0xeb sys/arch/amd64/amd64/trap.c:294
alltraps_kern(6,4,2,0,fffffd806768aad0,ffff800020b93530) at
alltraps_kern+0x7b
copyin(2067de70ff58326b,0,ffff800020b93530,4f7a2a99118,0,760) at copyin+0x56
syscall(aadab7a326e03d6f) at syscall+0x5a0 mi_syscall
sys/sys/syscall_mi.h:99 [inline]
syscall(aadab7a326e03d6f) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583
Xsyscall(6,0,ffffffffffffff43,0,5,4f55e6fd0d8) at Xsyscall+0x128
end of kernel
end trace frame: 0x4f7a2a991a0, count: -10
ddb{1}> show registers
rdi 0xffffffff81724177 db_enter+0x17
rsi 0x141b __ALIGN_SIZE+0x41b
rbp 0xffff800020cc8de0
rbx 0xffff800020cc8e80
rdx 0x141c __ALIGN_SIZE+0x41c
rcx 0xffff800002d49000
rax 0xffff800002d49000
r8 0xffffffff81d43064 kprintf+0x174
r9 0x1
r10 0x762bcb41dd7ac5df
r11 0x14429afac89e0c89
r12 0x3000000008
r13 0xffff800020cc8df0
r14 0x100
r15 0x1
rip 0xffffffff81724178 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff800020cc8dd0
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor1) pid=364773 stat=onproc
flags process=0 proc=4000000<THREAD>
pri=32, usrpri=86, nice=20
forw=0xffffffffffffffff, list=0xffff800020b92720,0xffff800020b93090
process=0xffff800020b949e8 user=0xffff800020cc4000,
vmspace=0xfffffd807f00c708
estcpu=36, cpticks=1, pctcpu=0.0
user=0, sys=1, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
44897 217974 33632 0 2 0 syz-executor1
44897 41588 33632 0 2 0x4000000 syz-executor1
*44897 364773 33632 0 7 0x4000000 syz-executor1
44897 397917 33632 0 2 0x4000000 syz-executor1
13375 485634 75208 0 7 0 syz-executor0
13375 444735 75208 0 3 0x4000080 switchread syz-executor0
13375 281221 75208 0 3 0x4000080 fsleep syz-executor0
78459 265243 1 0 3 0x100083 ttyin getty
63846 84030 0 0 3 0x14200 bored sosplice
33632 76298 96117 0 3 0x82 nanosleep syz-executor1
75208 383550 96117 0 3 0x82 nanosleep syz-executor0
96117 169753 77743 0 3 0x82 thrsleep syz-fuzzer
96117 207354 77743 0 3 0x4000082 thrsleep syz-fuzzer
96117 180916 77743 0 3 0x4000082 thrsleep syz-fuzzer
96117 132194 77743 0 3 0x4000082 thrsleep syz-fuzzer
96117 332467 77743 0 3 0x4000082 thrsleep syz-fuzzer
96117 317396 77743 0 3 0x4000082 kqread syz-fuzzer
96117 394966 77743 0 3 0x4000082 thrsleep syz-fuzzer
96117 367360 77743 0 3 0x4000082 thrsleep syz-fuzzer
96117 461878 77743 0 3 0x4000082 thrsleep syz-fuzzer
96117 322288 77743 0 3 0x4000082 thrsleep syz-fuzzer
96117 74329 77743 0 3 0x4000082 thrsleep syz-fuzzer
77743 125855 50479 0 3 0x10008a pause ksh
50479 470097 41473 0 3 0x92 select sshd
41473 468183 1 0 3 0x80 select sshd
83343 196966 32186 73 3 0x100010 biowait syslogd
32186 180870 1 0 3 0x100082 netio syslogd
56981 462072 1 77 3 0x100090 poll dhclient
61558 255485 1 0 3 0x80 poll dhclient
92229 40308 0 0 2 0x14200 zerothread
27406 324943 0 0 3 0x14200 aiodoned aiodoned
26530 497492 0 0 3 0x14200 syncer update
81890 497028 0 0 3 0x14200 cleaner cleaner
35179 326641 0 0 3 0x14200 reaper reaper
79069 506837 0 0 3 0x14200 pgdaemon pagedaemon
92973 393044 0 0 3 0x14200 bored crynlk
56425 461379 0 0 3 0x14200 bored crypto
77680 67337 0 0 3 0x40014200 acpi0 acpi0
8462 60302 0 0 3 0x40014200 idle1
42249 238922 0 0 3 0x14200 bored softnet
6633 137580 0 0 3 0x14200 bored systqmp
94130 87400 0 0 3 0x14200 bored systq
35240 238194 0 0 3 0x40014200 bored softclock
95 47475 0 0 3 0x40014200 idle0
1 156382 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
Process 44897 (syz-executor1) thread 0xffff800020b93530 (364773)
exclusive kernel_lock &kernel_lock r = 1 (0xffffffff822d2378) locked @
/syzkaller/managers/multicore/kernel/sys/kern/sched_bsd.c:429
Process 83343 (syslogd) thread 0xffff800020be5780 (196966)
exclusive rrwlock inode r = 0 (0xfffffd806eb974d8) locked @
/syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim
devbuf 9599 10481K 10490K 78643K 16419 0 0
pcb 23 9K 11K 78643K 13345 0 0
rtable 100 3K 4K 78643K 2684 0 0
ifaddr 77 22K 26K 78643K 1535 0 0
counters 39 33K 33K 78643K 39 0 0
ioctlops 0 0K 2K 78643K 200 0 0
iov 0 0K 32K 78643K 2511 0 0
mount 1 1K 1K 78643K 1 0 0
vnodes 1201 75K 77K 78643K 17374 0 0
UFS quota 1 32K 32K 78643K 1 0 0
UFS mount 5 36K 36K 78643K 5 0 0
shm 2 1K 9K 78643K 488 0 0
VM map 2 1K 1K 78643K 2 0 0
sem 12 0K 0K 78643K 2742 0 0
dirhash 12 2K 2K 78643K 12 0 0
ACPI 1792 194K 288K 78643K 12592 0 0
file desc 6 17K 25K 78643K 27625 0 0
sigio 0 0K 0K 78643K 457 0 0
proc 42 38K 70K 78643K 4305 0 0
subproc 64 65538K 67586K 78643K 284 0 0
NFS srvsock 1 0K 0K 78643K 1 0 0
NFS daemon 1 16K 16K 78643K 1 0 0
ip_moptions 0 0K 0K 78643K 5192 0 0
in_multi 33 2K 2K 78643K 1138 0 0
ether_multi 1 0K 0K 78643K 142 0 0
ISOFS mount 1 32K 32K 78643K 1 0 0
MSDOSFS mount 1 16K 16K 78643K 1 0 0
ttys 156 689K 689K 78643K 156 0 0
exec 0 0K 1K 78643K 1884 0 0
pfkey data 0 0K 4K 78643K 16 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 167 24K 63K 78643K 88043 0 0
UVM aobj 130 5K 5K 78643K 147 0 0
memdesc 1 4K 4K 78643K 1 0 0
crypto data 1 1K 1K 78643K 1 0 0
ip6_options 0 0K 1K 78643K 806 0 0
NDP 18 0K 0K 78643K 437 0 0
temp 212 2364K 2444K 78643K 74501 0 0
kqueue 0 0K 0K 78643K 283 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 4 0 0 1 0 1 1 0
8 0
inpcbpl 280 13208 0 13199 1 0 1 1 0
8 0
plimitpl 152 303 0 296 1 0 1 1 0
8 0
plcache 128 20 0 0 1 0 1 1 0
8 0
rtentry 112 41 0 1 2 0 2 2 0
8 0
syncache 264 4 0 4 1 1 0 1 0
8 0
tcpcb 544 5866 0 5860 1 0 1 1 0
8 0
nd6 48 4 0 0 1 0 1 1 0
8 0
ppxss 1128 241 0 241 100 100 0 1 0
8 0
art_heap8 4096 1 0 0 1 0 1 1 0
8 0
art_heap4 256 184 0 0 12 0 12 12 0
8 0
art_table 32 185 0 0 2 0 2 2 0
8 0
art_node 16 40 0 6 1 0 1 1 0
8 0
sysvmsgpl 40 20 0 8 1 0 1 1 0
8 0
semapl 112 2740 0 2730 1 0 1 1 0
8 0
shmpl 112 145 0 17 4 0 4 4 0
8 0
dirhash 1024 17 0 0 3 0 3 3 0
8 0
dino1pl 128 53751 0 51733 67 1 66 66 0
8 0
ffsino 272 53751 0 51733 141 6 135 135 0
8 0
nchpl 144 93661 0 92072 63 3 60 60 0
8 0
uvmvnodes 72 5926 0 0 108 0 108 108 0
8 0
vnodes 200 5926 0 0 312 0 312 312 0
8 0
namei 1024 298353 0 298353 9 8 1 1 0
8 1
percpumem 16 30 0 0 1 0 1 1 0
8 0
scsiplug 64 90 0 90 57 57 0 1 0
8 0
scxspl 192 275546 0 275545 76 75 1 6 0
8 0
sigapl 432 27805 0 27791 2 0 2 2 0
8 0
futexpl 56 355743 0 355742 4 3 1 1 0
8 0
knotepl 112 7005 0 6978 53 52 1 2 0
8 0
kqueuepl 104 9027 0 9025 1 0 1 1 0
8 0
pipepl 112 18280 0 18261 58 56 2 2 0
8 1
fdescpl 488 27806 0 27791 3 1 2 3 0
8 0
filepl 152 175522 0 175422 75 69 6 7 0
8 2
lockfpl 96 8365 0 8364 20 19 1 1 0
8 0
lockfspl 24 14797 0 14796 19 18 1 1 0
8 0
sessionpl 112 30 0 20 1 0 1 1 0
8 0
pgrppl 48 316 0 306 1 0 1 1 0
8 0
ucredpl 96 59828 0 59821 1 0 1 1 0
8 0
zombiepl 144 27791 0 27791 13 12 1 1 0
8 1
processpl 840 27821 0 27791 4 0 4 4 0
8 0
procpl 600 86245 0 86200 6 2 4 5 0
8 0
sosppl 128 533 0 533 123 122 1 1 0
8 1
sockpl 384 25893 0 25874 63 59 4 4 0
8 2
mcl64k 65536 3174 0 0 181 126 55 66 0
8 0
mcl16k 16384 37 0 0 5 3 2 3 0
8 0
mcl12k 12288 84 0 0 2 0 2 2 0
8 0
mcl9k 9216 107 0 0 4 3 1 2 0
8 0
mcl8k 8192 67 0 0 8 6 2 3 0
8 0
mcl4k 4096 51 0 0 6 4 2 3 0
8 0
mcl2k2 2112 17 0 0 2 0 2 2 0
8 0
mcl2k 2048 209 0 0 12 4 8 12 0
8 0
mtagpl 80 5 0 0 1 0 1 1 0
8 0
mbufpl 256 3275 0 0 43 7 36 36 0
8 0
bufpl 256 49084 0 42115 436 0 436 436 0
8 0
anonpl 16 2821095 0 2813330 715 667 48 64 0
125 3
amapchunkpl 152 179735 0 179618 843 837 6 190 0
158 0
amappl16 192 180158 0 179780 1264 1233 31 43 0 8
12
amappl15 184 7 0 4 1 0 1 1 0
8 0
amappl14 176 7 0 5 2 1 1 1 0
8 0
amappl13 168 29 0 26 1 0 1 1 0
8 0
amappl12 160 13933 0 13931 1 0 1 1 0
8 0
amappl11 152 187 0 178 1 0 1 1 0
8 0
amappl10 144 75 0 73 2 1 1 1 0
8 0
amappl9 136 347 0 345 1 0 1 1 0
8 0
amappl8 128 14404 0 14308 5 1 4 4 0
8 0
amappl7 120 33 0 27 1 0 1 1 0
8 0
amappl6 112 53 0 47 1 0 1 1 0
8 0
amappl5 104 341 0 330 1 0 1 1 0
8 0
amappl4 96 506 0 481 2 1 1 2 0
8 0
amappl3 88 14909 0 14901 1 0 1 1 0
8 0
amappl2 80 280346 0 280282 2 0 2 2 0
8 0
amappl1 72 597571 0 597126 24 14 10 19 0
8 0
amappl 72 86798 0 86755 1 0 1 1 0
75 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 146 0 17 3 0 3 3 0
8 0
uaddrrnd 24 27806 0 27791 1 0 1 1 0
8 0
uaddrbest 32 2 0 0 1 0 1 1 0
8 0
uaddr 24 27806 0 27791 1 0 1 1 0
8 0
vmmpekpl 168 238719 0 238698 2 0 2 2 0
8 0
vmmpepl 168 2975981 0 2974455 662 585 77 86 0
357 5
vmsppl 360 27805 0 27791 2 0 2 2 0
8 0
pdppl 4096 55619 0 55582 6 1 5 6 0
8 0
pvpl 32 7434637 0 7423637 1646 1521 125 170 0 265
24
pmappl 224 27805 0 27791 1 0 1 1 0
8 0
extentpl 40 39 0 25 1 0 1 1 0
8 0
phpool 112 866 0 167 21 0 21 21 0
8 0


---
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#bug-status-tracking for how to communicate with
syzbot.

syzbot

unread,
Jan 27, 2019, 12:34:04 AM1/27/19
to syzkaller-o...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: fdee2cadce4b fix trustanchor path; from Caspar Schutijser...
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=11480ac0c00000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=153ac898c00000

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

panic: vmmaplk: lock not shared
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
* 23829 12980 0 0x1000 0x4080000 0K syz-executor1
126393 19992 0 0x14000 0x200 1 reaper
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399
panic() at panic+0x16c sys/kern/subr_prf.c:208
_rw_exit_read(ffff800020be4970,2b4,ffff800020c7eee8) at _rw_exit_read+0x12b
sys/kern/kern_rwlock.c:355
uvm_fault(a3135900ceed07de,ffff800020be4970,0,ffffffff81156dd0) at
uvm_fault+0x23bb uvmfault_unlockall sys/uvm/uvm_fault.c:1388 [inline]
uvm_fault(a3135900ceed07de,ffff800020be4970,0,ffffffff81156dd0) at
uvm_fault+0x23bb sys/uvm/uvm_fault.c:1266
pageflttrap() at pageflttrap+0x216 sys/arch/amd64/amd64/trap.c:200
kerntrap(5e1d10d99cfe8708) at kerntrap+0xeb sys/arch/amd64/amd64/trap.c:294
alltraps_kern(6,7f7fdfffbfc0,20000040,0,ffff800020be4970,ffff800020c7f440)
at alltraps_kern+0x7b
copyinstr(f8e0b697feec4fa6,ffff800020c7f400,201,0,0,4c) at copyinstr+0x50
vn_open(786d718768b9529a,201,205) at vn_open+0x147 sys/kern/vfs_vnops.c:103
doopenat(2507b7bc03de4628,0,ffff800020be4970,dc8a1e85b48,0,50) at
doopenat+0x2b9 sys/kern/vfs_syscalls.c:1045
syscall(77cf57e6203dcffd) at syscall+0x5a0 mi_syscall
sys/sys/syscall_mi.h:99 [inline]
syscall(77cf57e6203dcffd) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583
Xsyscall(6,0,ffffffffffffffac,0,3,dc67ee0a010) at Xsyscall+0x128
end of kernel
end trace frame: 0xdc8a1e85bd0, count: 3
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}> show panic
vmmaplk: lock not shared
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399
panic() at panic+0x16c sys/kern/subr_prf.c:208
_rw_exit_read(ffff800020be4970,2b4,ffff800020c7eee8) at _rw_exit_read+0x12b
sys/kern/kern_rwlock.c:355
uvm_fault(a3135900ceed07de,ffff800020be4970,0,ffffffff81156dd0) at
uvm_fault+0x23bb uvmfault_unlockall sys/uvm/uvm_fault.c:1388 [inline]
uvm_fault(a3135900ceed07de,ffff800020be4970,0,ffffffff81156dd0) at
uvm_fault+0x23bb sys/uvm/uvm_fault.c:1266
pageflttrap() at pageflttrap+0x216 sys/arch/amd64/amd64/trap.c:200
kerntrap(5e1d10d99cfe8708) at kerntrap+0xeb sys/arch/amd64/amd64/trap.c:294
alltraps_kern(6,7f7fdfffbfc0,20000040,0,ffff800020be4970,ffff800020c7f440)
at alltraps_kern+0x7b
copyinstr(f8e0b697feec4fa6,ffff800020c7f400,201,0,0,4c) at copyinstr+0x50
vn_open(786d718768b9529a,201,205) at vn_open+0x147 sys/kern/vfs_vnops.c:103
doopenat(2507b7bc03de4628,0,ffff800020be4970,dc8a1e85b48,0,50) at
doopenat+0x2b9 sys/kern/vfs_syscalls.c:1045
syscall(77cf57e6203dcffd) at syscall+0x5a0 mi_syscall
sys/sys/syscall_mi.h:99 [inline]
syscall(77cf57e6203dcffd) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583
Xsyscall(6,0,ffffffffffffffac,0,3,dc67ee0a010) at Xsyscall+0x128
end of kernel
end trace frame: 0xdc8a1e85bd0, count: -12
ddb{0}> show registers
rdi 0
rsi 0x1
rbp 0xffff800020c7ed50
rbx 0xffff800020c7edf0
rdx 0xffffffff81f31836 cy_pio_rec+0x3821
rcx 0x201
rax 0x1
r8 0xffffffff81d43064 kprintf+0x174
r9 0x1
r10 0x1400ded5664061e9
r11 0x4321904dc1b2cba7
r12 0x3000000008
r13 0xffff800020c7ed60
r14 0x100
r15 0x1
rip 0xffffffff81724178 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff800020c7ed40
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{0}> show proc
PROC (syz-executor1) pid=23829 stat=onproc
flags process=1000<SINGLEEXIT> proc=4080000<SUSPSINGLE,THREAD>
pri=32, usrpri=50, nice=20
forw=0xffffffffffffffff, list=0xffff800020b75070,0xffff800020be59e8
process=0xffff800020b94010 user=0xffff800020c7a000,
vmspace=0xfffffd807f00cca8
estcpu=0, cpticks=0, pctcpu=0.0
user=0, sys=0, intr=0
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
12980 290188 44993 0 3 0x3000 suspend syz-executor1
*12980 23829 44993 0 7 0x4081000 syz-executor1
12980 5261 44993 0 2 0x4081000 syz-executor1
91278 499211 66513 0 3 0x80 nanosleep syz-executor0
91278 246246 66513 0 3 0x4000080 fsleep syz-executor0
91278 161812 66513 0 3 0x4000080 fsleep syz-executor0
44993 226592 51315 0 3 0x82 nanosleep syz-executor1
66513 377546 51315 0 3 0x82 nanosleep syz-executor0
51315 7350 13370 0 3 0x82 thrsleep syz-execprog
51315 368707 13370 0 3 0x4000082 thrsleep syz-execprog
51315 167860 13370 0 3 0x4000082 thrsleep syz-execprog
51315 98025 13370 0 3 0x4000082 thrsleep syz-execprog
51315 158400 13370 0 3 0x4000082 thrsleep syz-execprog
51315 486233 13370 0 3 0x4000082 kqread syz-execprog
51315 449386 13370 0 3 0x4000082 thrsleep syz-execprog
51315 26736 13370 0 3 0x4000082 thrsleep syz-execprog
13370 304069 63843 0 3 0x10008a pause ksh
63843 290392 27292 0 3 0x92 select sshd
46016 521108 1 0 3 0x100083 ttyin getty
27292 414550 1 0 3 0x80 select sshd
54602 399140 21501 73 3 0x100090 kqread syslogd
21501 48578 1 0 3 0x100082 netio syslogd
21397 399170 1 77 3 0x100090 poll dhclient
50790 114446 1 0 3 0x80 poll dhclient
37925 448278 0 0 2 0x14200 zerothread
25954 176002 0 0 3 0x14200 aiodoned aiodoned
68042 460847 0 0 3 0x14200 syncer update
50284 78232 0 0 3 0x14200 cleaner cleaner
19992 126393 0 0 7 0x14200 reaper
16155 189160 0 0 3 0x14200 pgdaemon pagedaemon
5095 404182 0 0 3 0x14200 bored crynlk
52383 438754 0 0 3 0x14200 bored crypto
9613 513226 0 0 3 0x40014200 acpi0 acpi0
17201 160958 0 0 3 0x40014200 idle1
83327 445836 0 0 3 0x14200 bored softnet
76527 356774 0 0 3 0x14200 bored systqmp
31774 227163 0 0 3 0x14200 bored systq
58435 168303 0 0 3 0x40014200 bored softclock
17308 419364 0 0 3 0x40014200 idle0
1 294538 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{0}> show all locks
Process 12980 (syz-executor1) thread 0xffff800020be4970 (23829)
exclusive kernel_lock &kernel_lock r = 1 (0xffffffff822d2378) locked @
/syzkaller/managers/multicore/kernel/sys/kern/sched_bsd.c:429
ddb{0}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim
devbuf 9452 6320K 6320K 78643K 10539 0 0
pcb 23 9K 9K 78643K 55 0 0
rtable 97 3K 3K 78643K 167 0 0
ifaddr 34 9K 9K 78643K 34 0 0
counters 39 33K 33K 78643K 39 0 0
ioctlops 0 0K 2K 78643K 15 0 0
mount 1 1K 1K 78643K 1 0 0
vnodes 1166 73K 73K 78643K 1171 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 1792 194K 288K 78643K 12592 0 0
file desc 6 17K 25K 78643K 20 0 0
proc 40 38K 70K 78643K 241 0 0
NFS srvsock 1 0K 0K 78643K 1 0 0
NFS daemon 1 16K 16K 78643K 1 0 0
in_multi 33 2K 2K 78643K 33 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 165 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 74 19K 20K 78643K 796 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 9 0K 0K 78643K 9 0 0
temp 46 2346K 2409K 78643K 2690 0 0
SYN cache 2 16K 16K 78643K 2 0 0
ddb{0}>

syzbot

unread,
Feb 1, 2019, 5:41:04 AM2/1/19
to syzkaller-o...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: dc36d2c7c3b1 correct Cd for fdt
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=1542c730c00000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=173bb8ff400000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1261f1f8c00000

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

panic: vmmaplk: lock not shared
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
272167 86181 0 0 0x4000000 0 syz-executor5349
*458595 86181 0 0 0x4000000 1K syz-executor5349
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399
panic() at panic+0x16c sys/kern/subr_prf.c:208
_rw_exit_read(ffff800020be4268,2a4,ffff800020c3b9b8) at _rw_exit_read+0x12b
sys/kern/kern_rwlock.c:355
uvm_fault(b139956407eb0b2,ffff800020be4268,0,ffffffff8167c690) at
uvm_fault+0x23bb uvmfault_unlockall sys/uvm/uvm_fault.c:1388 [inline]
uvm_fault(b139956407eb0b2,ffff800020be4268,0,ffffffff8167c690) at
uvm_fault+0x23bb sys/uvm/uvm_fault.c:1266
pageflttrap() at pageflttrap+0x216 sys/arch/amd64/amd64/trap.c:200
kerntrap(32c9c977baf18ce4) at kerntrap+0xeb sys/arch/amd64/amd64/trap.c:294
alltraps_kern(6,14,c014575e,0,fffffd807a9f0980,20000000) at
alltraps_kern+0x7b
copyin(ac266adfd581996c,0,ffff800020be4268,da98e9b5b78,0,360) at copyin+0x4b
syscall(d47e3fa3a6c3d5de) at syscall+0x5a0 mi_syscall
sys/sys/syscall_mi.h:99 [inline]
syscall(d47e3fa3a6c3d5de) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583
Xsyscall(6,0,da722aec170,0,da722aec150,da722aec148) at Xsyscall+0x128
end of kernel
end trace frame: 0xda98e9b5b90, 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}> show panic
vmmaplk: lock not shared
ddb{1}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399
panic() at panic+0x16c sys/kern/subr_prf.c:208
_rw_exit_read(ffff800020be4268,2a4,ffff800020c3b9b8) at _rw_exit_read+0x12b
sys/kern/kern_rwlock.c:355
uvm_fault(b139956407eb0b2,ffff800020be4268,0,ffffffff8167c690) at
uvm_fault+0x23bb uvmfault_unlockall sys/uvm/uvm_fault.c:1388 [inline]
uvm_fault(b139956407eb0b2,ffff800020be4268,0,ffffffff8167c690) at
uvm_fault+0x23bb sys/uvm/uvm_fault.c:1266
pageflttrap() at pageflttrap+0x216 sys/arch/amd64/amd64/trap.c:200
kerntrap(32c9c977baf18ce4) at kerntrap+0xeb sys/arch/amd64/amd64/trap.c:294
alltraps_kern(6,14,c014575e,0,fffffd807a9f0980,20000000) at
alltraps_kern+0x7b
copyin(ac266adfd581996c,0,ffff800020be4268,da98e9b5b78,0,360) at copyin+0x4b
syscall(d47e3fa3a6c3d5de) at syscall+0x5a0 mi_syscall
sys/sys/syscall_mi.h:99 [inline]
syscall(d47e3fa3a6c3d5de) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583
Xsyscall(6,0,da722aec170,0,da722aec150,da722aec148) at Xsyscall+0x128
end of kernel
end trace frame: 0xda98e9b5b90, count: -10
ddb{1}> show registers
rdi 0
rsi 0x1
rbp 0xffff800020c3b820
rbx 0xffff800020c3b8c0
rdx 0xffffffff81f323f3 cy_pio_rec+0x25c
rcx 0x201
rax 0x1
r8 0xffffffff81d8b924 kprintf+0x174
r9 0x1
r10 0xbf460727fd0673bd
r11 0xc5a383bfe0fcfa68
r12 0x3000000008
r13 0xffff800020c3b830
r14 0x100
r15 0x1
rip 0xffffffff81202148 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff800020c3b810
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor5349) pid=458595 stat=onproc
flags process=0 proc=4000000<THREAD>
pri=32, usrpri=86, nice=20
forw=0xffffffffffffffff, list=0xffff800020b759d0,0xffffffff822f0c88
process=0xffff800020bca9f0 user=0xffff800020c36000,
vmspace=0xfffffd806e929440
estcpu=36, cpticks=0, pctcpu=0.0
user=0, sys=0, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
86181 324693 16851 0 2 0 syz-executor5349
86181 265288 16851 0 3 0x4000080 fsleep syz-executor5349
86181 272167 16851 0 7 0x4000000 syz-executor5349
86181 335292 16851 0 3 0x4000080 fsleep syz-executor5349
*86181 458595 16851 0 7 0x4000000 syz-executor5349
95573 292941 16164 0 3 0x80 nanosleep syz-executor5349
95573 410965 16164 0 3 0x4000080 fsleep syz-executor5349
95573 90381 16164 0 3 0x4000080 fsleep syz-executor5349
16851 467787 93284 0 3 0x80 nanosleep syz-executor5349
16164 230987 93284 0 3 0x80 nanosleep syz-executor5349
93284 317182 41067 0 3 0x82 nanosleep syz-executor5349
41067 435881 25486 0 3 0x10008a pause ksh
25486 446325 10014 0 3 0x92 select sshd
85512 36591 1 0 3 0x100083 ttyin getty
10014 370123 1 0 3 0x80 select sshd
26336 40635 53338 73 3 0x100090 kqread syslogd
53338 200128 1 0 3 0x100082 netio syslogd
2416 217780 1 77 3 0x100090 poll dhclient
11796 283976 1 0 3 0x80 poll dhclient
43079 62033 0 0 3 0x14200 pgzero zerothread
85179 220332 0 0 3 0x14200 aiodoned aiodoned
72486 399641 0 0 3 0x14200 syncer update
60697 441444 0 0 3 0x14200 cleaner cleaner
14001 523589 0 0 3 0x14200 reaper reaper
411 288416 0 0 3 0x14200 pgdaemon pagedaemon
74030 415480 0 0 3 0x14200 bored crynlk
36538 39048 0 0 3 0x14200 bored crypto
87340 416537 0 0 3 0x40014200 acpi0 acpi0
78219 52430 0 0 3 0x40014200 idle1
10023 7576 0 0 3 0x14200 bored softnet
13739 419554 0 0 3 0x14200 bored systqmp
32048 216604 0 0 3 0x14200 bored systq
24376 521205 0 0 3 0x40014200 bored softclock
877 404101 0 0 3 0x40014200 idle0
1 477967 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
Process 86181 (syz-executor5349) thread 0xffff800020be4268 (458595)
exclusive kernel_lock &kernel_lock r = 1 (0xffffffff823166a8) locked @
/syzkaller/managers/multicore/kernel/sys/kern/sched_bsd.c:436
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim
devbuf 9442 6315K 6316K 78643K 10529 0 0
pcb 23 9K 9K 78643K 55 0 0
rtable 61 2K 2K 78643K 115 0 0
ifaddr 21 7K 7K 78643K 21 0 0
counters 39 33K 33K 78643K 39 0 0
ioctlops 0 0K 2K 78643K 13 0 0
mount 1 1K 1K 78643K 1 0 0
vnodes 1168 73K 73K 78643K 1221 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 1792 194K 288K 78643K 12592 0 0
file desc 1 0K 0K 78643K 1 0 0
proc 40 38K 46K 78643K 201 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 149 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 65 19K 19K 78643K 811 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 3 0K 0K 78643K 3 0 0
temp 30 2347K 2411K 78643K 1756 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
inpcbpl 280 92 0 82 1 0 1 1 0
8 0
plimitpl 152 15 0 8 1 0 1 1 0
8 0
plcache 128 20 0 0 1 0 1 1 0
8 0
rtentry 112 23 0 1 1 0 1 1 0
8 0
syncache 264 5 0 5 2 1 1 1 0
8 1
tcpcb 544 78 0 71 1 0 1 1 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
dino1pl 128 1503 0 132 45 0 45 45 0
8 0
ffsino 272 1503 0 132 92 0 92 92 0
8 0
nchpl 144 1710 0 179 57 0 57 57 0
8 0
uvmvnodes 72 1512 0 0 28 0 28 28 0
8 0
vnodes 200 1512 0 0 80 0 80 80 0
8 0
namei 1024 3603 0 3603 2 1 1 1 0
8 1
percpumem 16 30 0 0 1 0 1 1 0
8 0
scxspl 192 2746 0 2746 8 2 6 6 0
8 6
sigapl 432 210 0 196 2 0 2 2 0
8 0
futexpl 56 238 0 234 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 114 0 107 2 1 1 1 0
8 0
fdescpl 488 211 0 196 2 0 2 2 0
8 0
filepl 152 980 0 932 2 0 2 2 0
8 0
lockfpl 104 6 0 6 1 1 0 1 0
8 0
lockfspl 32 3 0 3 1 1 0 1 0
8 0
sessionpl 112 19 0 9 1 0 1 1 0
8 0
pgrppl 48 19 0 9 1 0 1 1 0
8 0
ucredpl 96 47 0 40 1 0 1 1 0
8 0
zombiepl 144 196 0 196 2 1 1 1 0
8 1
processpl 840 225 0 196 4 0 4 4 0
8 0
procpl 600 297 0 262 3 0 3 3 0
8 0
sockpl 384 134 0 114 3 0 3 3 0
8 1
mcl4k 4096 2 0 0 1 0 1 1 0
8 0
mcl2k 2048 73 0 0 9 0 9 9 0
8 0
mtagpl 80 1 0 0 1 0 1 1 0
8 0
mbufpl 256 92 0 0 6 0 6 6 0
8 0
bufpl 256 2052 0 261 112 0 112 112 0
8 0
anonpl 16 19336 0 18076 7 1 6 6 0
125 0
amapchunkpl 152 700 0 649 2 0 2 2 0
158 0
amappl16 192 146 0 132 1 0 1 1 0
8 0
amappl15 184 1 0 1 1 1 0 1 0
8 0
amappl14 176 1 0 1 1 1 0 1 0
8 0
amappl13 168 16 0 13 1 0 1 1 0
8 0
amappl12 160 8 0 8 2 1 1 1 0
8 1
amappl11 152 171 0 162 1 0 1 1 0
8 0
amappl10 144 43 0 43 2 1 1 1 0
8 1
amappl9 136 207 0 206 1 0 1 1 0
8 0
amappl8 128 110 0 100 1 0 1 1 0
8 0
amappl7 120 31 0 26 1 0 1 1 0
8 0
amappl6 112 42 0 38 1 0 1 1 0
8 0
amappl5 104 169 0 157 1 0 1 1 0
8 0
amappl4 96 254 0 233 1 0 1 1 0
8 0
amappl3 88 113 0 107 1 0 1 1 0
8 0
amappl2 80 883 0 826 2 0 2 2 0
8 0
amappl1 72 12588 0 12124 15 5 10 15 0
8 0
amappl 72 485 0 454 1 0 1 1 0
75 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 211 0 196 1 0 1 1 0
8 0
uaddrbest 32 2 0 0 1 0 1 1 0
8 0
uaddr 24 211 0 196 1 0 1 1 0
8 0
vmmpekpl 168 5334 0 5314 2 0 2 2 0
8 0
vmmpepl 168 26306 0 25390 55 15 40 43 0
357 0
vmsppl 360 210 0 196 2 0 2 2 0
8 0
pdppl 4096 429 0 392 5 0 5 5 0
8 0
pvpl 32 74702 0 71623 32 6 26 26 0
265 1
pmappl 224 210 0 196 1 0 1 1 0
8 0
extentpl 40 39 0 25 1 0 1 1 0
8 0
phpool 112 240 0 3 7 0 7 7 0
8 0
ddb{1}>

Reply all
Reply to author
Forward
0 new messages