panic: vmmaplk: lock not shared Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 49999 99229 32767 0x10 0 1 syz-executor1 *362332 99229 32767 0x10 0x4000000 0K syz-executor1 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(ffff800020bba4c8,328,ffff800020cb99b8) at _rw_exit_read+0x12b sys/kern/kern_rwlock.c:355 uvm_fault(1f3b3c0923422361,ffff800020bba4c8,0,ffffffff811221c0) at uvm_fault+0x23bb uvmfault_unlockall sys/uvm/uvm_fault.c:1388 [inline] uvm_fault(1f3b3c0923422361,ffff800020bba4c8,0,ffffffff811221c0) at uvm_fault+0x23bb sys/uvm/uvm_fault.c:1266 pageflttrap() at pageflttrap+0x216 sys/arch/amd64/amd64/trap.c:200 kerntrap(792bad61e5516ecd) at kerntrap+0xeb sys/arch/amd64/amd64/trap.c:288 alltraps_kern(6,10,ffff800020bba4c8,0,1,10) at alltraps_kern+0x7b copyin(c99e8558518b6fee,ffff800020cb9e70,1,ffff800020cb9e88,ffff800020bba4c8,10c0) at copyin+0x4b sys_pwritev(8e8ba6a7ba958e86,10,ffff800020bba4c8) at sys_pwritev+0x6b sys/kern/vfs_syscalls.c:3152 syscall(646b4396759d672f) at syscall+0x5a0 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(646b4396759d672f) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffffb8,0,4,8a3e96600d8) at Xsyscall+0x128 end of kernel end trace frame: 0x8a6ccdf9760, 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. 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(ffff800020bba4c8,328,ffff800020cb99b8) at _rw_exit_read+0x12b sys/kern/kern_rwlock.c:355 uvm_fault(1f3b3c0923422361,ffff800020bba4c8,0,ffffffff811221c0) at uvm_fault+0x23bb uvmfault_unlockall sys/uvm/uvm_fault.c:1388 [inline] uvm_fault(1f3b3c0923422361,ffff800020bba4c8,0,ffffffff811221c0) at uvm_fault+0x23bb sys/uvm/uvm_fault.c:1266 pageflttrap() at pageflttrap+0x216 sys/arch/amd64/amd64/trap.c:200 kerntrap(792bad61e5516ecd) at kerntrap+0xeb sys/arch/amd64/amd64/trap.c:288 alltraps_kern(6,10,ffff800020bba4c8,0,1,10) at alltraps_kern+0x7b copyin(c99e8558518b6fee,ffff800020cb9e70,1,ffff800020cb9e88,ffff800020bba4c8,10c0) at copyin+0x4b sys_pwritev(8e8ba6a7ba958e86,10,ffff800020bba4c8) at sys_pwritev+0x6b sys/kern/vfs_syscalls.c:3152 syscall(646b4396759d672f) at syscall+0x5a0 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(646b4396759d672f) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffffb8,0,4,8a3e96600d8) at Xsyscall+0x128 end of kernel end trace frame: 0x8a6ccdf9760, count: -11 ddb{0}> show registers rdi 0xffffffff819b4817 db_enter+0x17 rsi 0x1289 __ALIGN_SIZE+0x289 rbp 0xffff800020cb9820 rbx 0xffff800020cb98c0 rdx 0x128a __ALIGN_SIZE+0x28a rcx 0xffff800000b56000 rax 0xffff800000b56000 r8 0xffffffff813be534 kprintf+0x174 r9 0x1 r10 0x594b3db6154716c9 r11 0xf2f08a36e4faa31d r12 0x3000000008 r13 0xffff800020cb9830 r14 0x100 r15 0x1 rip 0xffffffff819b4818 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020cb9810 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor1) pid=362332 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff800020bbb530,0xffff800020bbb9f0 process=0xffff800020bca9f0 user=0xffff800020cb4000, vmspace=0xfffffd807f00d870 estcpu=30, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 99229 49999 35413 32767 7 0x10 syz-executor1 99229 25991 35413 32767 2 0x4000010 syz-executor1 *99229 362332 35413 32767 7 0x4000010 syz-executor1 99229 236936 35413 32767 2 0x4000010 syz-executor1 98176 32721 88952 32767 3 0x10 biowait syz-executor0 88952 84345 16178 0 3 0x82 wait syz-executor0 35413 203203 8067 32767 3 0x90 nanosleep syz-executor1 8067 91847 16178 0 3 0x82 wait syz-executor1 14963 459043 0 0 3 0x14200 bored sosplice 16178 507399 67910 0 3 0x82 thrsleep syz-fuzzer 16178 359495 67910 0 3 0x4000082 thrsleep syz-fuzzer 16178 510211 67910 0 3 0x4000082 thrsleep syz-fuzzer 16178 326287 67910 0 3 0x4000082 thrsleep syz-fuzzer 16178 119900 67910 0 3 0x4000082 thrsleep syz-fuzzer 16178 209776 67910 0 3 0x4000082 thrsleep syz-fuzzer 16178 15299 67910 0 3 0x4000082 thrsleep syz-fuzzer 16178 358283 67910 0 3 0x4000082 thrsleep syz-fuzzer 16178 375806 67910 0 3 0x4000082 thrsleep syz-fuzzer 16178 238249 67910 0 3 0x4000082 thrsleep syz-fuzzer 16178 495109 67910 0 3 0x4000082 kqread syz-fuzzer 16178 80888 67910 0 3 0x4000082 thrsleep syz-fuzzer 67910 448660 44723 0 3 0x10008a pause ksh 44723 434462 80426 0 3 0x92 select sshd 9243 460018 1 0 3 0x100083 ttyin getty 80426 21840 1 0 3 0x80 select sshd 11583 267507 23413 73 3 0x100090 kqread syslogd 23413 350012 1 0 3 0x100082 netio syslogd 20303 24961 1 77 3 0x100090 poll dhclient 87298 514297 1 0 3 0x80 poll dhclient 95502 286882 0 0 3 0x14200 pgzero zerothread 29292 242291 0 0 3 0x14200 aiodoned aiodoned 87547 81246 0 0 3 0x14200 syncer update 7847 202862 0 0 3 0x14200 cleaner cleaner 49490 388486 0 0 3 0x14200 reaper reaper 59959 112575 0 0 3 0x14200 pgdaemon pagedaemon 62605 261730 0 0 3 0x14200 bored crynlk 20495 160179 0 0 3 0x14200 bored crypto 4530 350136 0 0 3 0x40014200 acpi0 acpi0 79140 152133 0 0 3 0x40014200 idle1 31416 212204 0 0 3 0x14200 bored softnet 78460 216056 0 0 3 0x14200 bored systqmp 30031 201072 0 0 3 0x14200 bored systq 99348 50494 0 0 3 0x40014200 bored softclock 71741 179169 0 0 3 0x40014200 idle0 1 470770 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 99229 (syz-executor1) thread 0xffff800020bba4c8 (362332) exclusive kernel_lock &kernel_lock r = 1 (0xffffffff822e2448) locked @ /syzkaller/managers/setuid/kernel/sys/kern/sched_bsd.c:436 Process 98176 (syz-executor0) thread 0xffff800020bbb788 (32721) exclusive rrwlock inode r = 0 (0xfffffd8069cf42b8) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_ihash.c:140 exclusive rrwlock inode r = 0 (0xfffffd8069cf4f78) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9460 6321K 6321K 78643K 10667 0 0 pcb 23 9K 11K 78643K 349 0 0 rtable 97 3K 3K 78643K 935 0 0 ifaddr 37 10K 10K 78643K 190 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 42 0 0 iov 0 0K 24K 78643K 41 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 1837 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 7 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 84 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 7 21K 33K 78643K 726 0 0 sigio 0 0K 0K 78643K 24 0 0 proc 41 38K 58K 78643K 811 0 0 subproc 68 69634K 69634K 78643K 884 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 87 0 0 in_multi 33 2K 2K 78643K 324 0 0 ether_multi 1 0K 0K 78643K 8 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 315 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 91 21K 30K 78643K 2977 0 0 UVM aobj 36 2K 2K 78643K 43 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 15 0 0 NDP 5 0K 0K 78643K 81 0 0 temp 99 2356K 2424K 78643K 5804 0 0 kqueue 0 0K 0K 78643K 4 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 28 0 24 1 0 1 1 0 8 0 inpcbpl 280 314 0 307 1 0 1 1 0 8 0 plimitpl 152 74 0 65 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 257 0 217 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 135 0 131 1 0 1 1 0 8 0 nd6 48 52 0 48 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1229 0 1042 12 0 12 12 0 8 0 art_table 32 1230 0 1042 2 0 2 2 0 8 0 art_node 16 256 0 222 1 0 1 1 0 8 0 sysvmsgpl 40 7 0 1 1 0 1 1 0 8 0 semapl 112 80 0 70 1 0 1 1 0 8 0 shmpl 112 41 0 7 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2274 0 875 46 0 46 46 0 8 0 ffsino 272 2274 0 875 94 0 94 94 0 8 0 nchpl 144 3365 0 1793 59 0 59 59 0 8 0 uvmvnodes 72 2725 0 0 50 0 50 50 0 8 0 vnodes 200 2725 0 0 144 0 144 144 0 8 0 namei 1024 10920 0 10918 2 1 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 8268 0 8267 13 10 3 6 0 8 2 sigapl 432 821 0 806 4 2 2 3 0 8 0 futexpl 56 6385 0 6385 1 0 1 1 0 8 1 knotepl 112 623 0 596 5 4 1 2 0 8 0 kqueuepl 104 211 0 209 1 0 1 1 0 8 0 pipepl 112 824 0 805 5 4 1 2 0 8 0 fdescpl 488 822 0 806 3 0 3 3 0 8 1 filepl 152 5600 0 5502 7 2 5 7 0 8 1 lockfpl 104 132 0 132 5 4 1 1 0 8 1 lockfspl 32 289 0 289 5 4 1 1 0 8 1 sessionpl 112 41 0 31 1 0 1 1 0 8 0 pgrppl 48 47 0 37 1 0 1 1 0 8 0 ucredpl 96 1795 0 1786 1 0 1 1 0 8 0 zombiepl 144 806 0 806 2 1 1 1 0 8 1 processpl 840 837 0 806 4 0 4 4 0 8 0 procpl 600 1958 0 1913 4 0 4 4 0 8 0 srpgc 64 130 0 130 2 2 0 1 0 8 0 sosppl 128 9 0 9 4 4 0 1 0 8 0 sockpl 384 670 0 653 5 2 3 4 0 8 1 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 6 0 0 1 0 1 1 0 8 0 mcl4k 4096 7 0 0 1 0 1 1 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 103 0 0 12 0 12 12 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 180 0 0 9 0 9 9 0 8 0 bufpl 256 5932 0 965 311 0 311 311 0 8 0 anonpl 16 106103 0 100523 66 21 45 45 0 125 20 amapchunkpl 152 5798 0 5706 25 15 10 11 0 158 5 amappl16 192 4281 0 4011 50 28 22 26 0 8 8 amappl15 184 104 0 103 1 0 1 1 0 8 0 amappl14 176 55 0 53 2 1 1 1 0 8 0 amappl13 168 99 0 95 1 0 1 1 0 8 0 amappl12 160 136 0 133 1 0 1 1 0 8 0 amappl11 152 375 0 366 1 0 1 1 0 8 0 amappl10 144 142 0 137 2 1 1 1 0 8 0 amappl9 136 430 0 429 1 0 1 1 0 8 0 amappl8 128 410 0 385 1 0 1 1 0 8 0 amappl7 120 119 0 104 1 0 1 1 0 8 0 amappl6 112 79 0 73 1 0 1 1 0 8 0 amappl5 104 238 0 226 1 0 1 1 0 8 0 amappl4 96 425 0 399 2 1 1 2 0 8 0 amappl3 88 227 0 221 1 0 1 1 0 8 0 amappl2 80 5824 0 5770 2 0 2 2 0 8 0 amappl1 72 28120 0 27664 23 13 10 18 0 8 0 amappl 72 2356 0 2318 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 42 0 7 1 0 1 1 0 8 0 uaddrrnd 24 822 0 806 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 822 0 806 1 0 1 1 0 8 0 vmmpekpl 168 10343 0 10320 2 0 2 2 0 8 0 vmmpepl 168 99805 0 98477 113 39 74 74 0 357 15 vmsppl 360 821 0 806 2 0 2 2 0 8 0 pdppl 4096 1651 0 1612 6 0 6 6 0 8 1 pvpl 32 294315 0 285584 168 44 124 124 0 265 52 pmappl 224 821 0 806 4 3 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 457 0 3 13 0 13 13 0 8 0