panic: vmmaplk: lock not shared Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 126099 20420 32767 0x10 0 0 syz-executor0 *473501 20420 32767 0x10 0x4000000 1K 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(ffff800020bbbc38,31c,ffff800020c579c8) at _rw_exit_read+0x12b sys/kern/kern_rwlock.c:355 uvm_fault(7b65afbff3383beb,ffff800020bbbc38,0,ffffffff81d7f950) at uvm_fault+0x23bb uvmfault_unlockall sys/uvm/uvm_fault.c:1388 [inline] uvm_fault(7b65afbff3383beb,ffff800020bbbc38,0,ffffffff81d7f950) at uvm_fault+0x23bb sys/uvm/uvm_fault.c:1266 pageflttrap() at pageflttrap+0x216 sys/arch/amd64/amd64/trap.c:200 kerntrap(ad91556a6c4bcb06) at kerntrap+0xeb sys/arch/amd64/amd64/trap.c:294 alltraps_kern(6,4,80047462,0,fffffd8067664ef8,20000080) at alltraps_kern+0x7b copyin(5c0caabe5c5a0649,10,ffff800020bbbc38,10cd969448,0,360) at copyin+0x56 syscall(a1fd046888f7f8e3) at syscall+0x5a0 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(a1fd046888f7f8e3) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583 Xsyscall(6,0,ffffffffffffff51,0,3,ddca8d0d8) at Xsyscall+0x128 end of kernel end trace frame: 0x10cd9694d0, 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(ffff800020bbbc38,31c,ffff800020c579c8) at _rw_exit_read+0x12b sys/kern/kern_rwlock.c:355 uvm_fault(7b65afbff3383beb,ffff800020bbbc38,0,ffffffff81d7f950) at uvm_fault+0x23bb uvmfault_unlockall sys/uvm/uvm_fault.c:1388 [inline] uvm_fault(7b65afbff3383beb,ffff800020bbbc38,0,ffffffff81d7f950) at uvm_fault+0x23bb sys/uvm/uvm_fault.c:1266 pageflttrap() at pageflttrap+0x216 sys/arch/amd64/amd64/trap.c:200 kerntrap(ad91556a6c4bcb06) at kerntrap+0xeb sys/arch/amd64/amd64/trap.c:294 alltraps_kern(6,4,80047462,0,fffffd8067664ef8,20000080) at alltraps_kern+0x7b copyin(5c0caabe5c5a0649,10,ffff800020bbbc38,10cd969448,0,360) at copyin+0x56 syscall(a1fd046888f7f8e3) at syscall+0x5a0 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(a1fd046888f7f8e3) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583 Xsyscall(6,0,ffffffffffffff51,0,3,ddca8d0d8) at Xsyscall+0x128 end of kernel end trace frame: 0x10cd9694d0, count: -10 ddb{1}> show registers rdi 0xffffffff819b0bf7 db_enter+0x17 rsi 0x163e __ALIGN_SIZE+0x63e rbp 0xffff800020c57830 rbx 0xffff800020c578d0 rdx 0x163f __ALIGN_SIZE+0x63f rcx 0xffff800000b47000 rax 0xffff800000b47000 r8 0xffffffff817ee0d4 kprintf+0x174 r9 0x1 r10 0x5c0caabe5c58c8fd r11 0x526eaa95eda16abd r12 0x3000000008 r13 0xffff800020c57840 r14 0x100 r15 0x1 rip 0xffffffff819b0bf8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c57820 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor0) pid=473501 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=79, nice=20 forw=0xffffffffffffffff, list=0xffff800020bbb2d8,0xffff800020bbb090 process=0xffff800020bca9f0 user=0xffff800020c52000, vmspace=0xfffffd806e922710 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 20420 126099 96206 32767 7 0x10 syz-executor0 20420 357691 96206 32767 2 0x4000010 syz-executor0 *20420 473501 96206 32767 7 0x4000010 syz-executor0 20420 89865 96206 32767 2 0x4000010 syz-executor0 84414 218954 6446 32767 3 0x10 biowait syz-executor1 6446 350880 30296 0 3 0x82 wait syz-executor1 96206 229449 20199 32767 3 0x90 nanosleep syz-executor0 20199 8324 30296 0 3 0x82 wait syz-executor0 23016 200914 0 0 3 0x14200 bored sosplice 30296 51167 65065 0 3 0x82 nanosleep syz-fuzzer 30296 301503 65065 0 3 0x4000082 nanosleep syz-fuzzer 30296 371876 65065 0 3 0x4000082 thrsleep syz-fuzzer 30296 462257 65065 0 3 0x4000082 thrsleep syz-fuzzer 30296 102168 65065 0 3 0x4000082 thrsleep syz-fuzzer 30296 126719 65065 0 3 0x4000082 thrsleep syz-fuzzer 30296 172453 65065 0 3 0x4000082 thrsleep syz-fuzzer 30296 419385 65065 0 3 0x4000082 thrsleep syz-fuzzer 30296 121951 65065 0 3 0x4000082 thrsleep syz-fuzzer 30296 277461 65065 0 3 0x4000082 kqread syz-fuzzer 65065 45392 46201 0 3 0x10008a pause ksh 46201 508070 91194 0 3 0x92 select sshd 99188 48398 1 0 3 0x100083 ttyin getty 91194 133816 1 0 3 0x80 select sshd 97276 47089 25273 73 3 0x100010 ffs_fsync syslogd 25273 4143 1 0 3 0x100082 netio syslogd 60072 378134 1 77 3 0x100090 poll dhclient 62076 374506 1 0 3 0x80 poll dhclient 36297 356794 0 0 3 0x14200 pgzero zerothread 82975 521617 0 0 3 0x14200 aiodoned aiodoned 60063 417035 0 0 3 0x14200 syncer update 86409 159541 0 0 3 0x14200 cleaner cleaner 90128 233823 0 0 3 0x14200 reaper reaper 46542 514774 0 0 3 0x14200 pgdaemon pagedaemon 87384 510604 0 0 3 0x14200 bored crynlk 57841 509068 0 0 3 0x14200 bored crypto 14937 286478 0 0 3 0x40014200 acpi0 acpi0 75969 43903 0 0 3 0x40014200 idle1 62130 409259 0 0 3 0x14200 bored softnet 74573 258217 0 0 3 0x14200 bored systqmp 32891 268148 0 0 3 0x14200 bored systq 16746 298561 0 0 3 0x40014200 bored softclock 55395 398675 0 0 3 0x40014200 idle0 1 187907 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 20420 (syz-executor0) thread 0xffff800020bbbc38 (473501) exclusive kernel_lock &kernel_lock r = 1 (0xffffffff822fbdf0) locked @ /syzkaller/managers/setuid/kernel/sys/kern/sched_bsd.c:436 Process 84414 (syz-executor1) thread 0xffff800020bbb530 (218954) exclusive rrwlock inode r = 0 (0xfffffd8078ebfc48) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_ihash.c:140 exclusive rrwlock inode r = 0 (0xfffffd8078ebfb38) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 Process 97276 (syslogd) thread 0xffff800020be5780 (47089) exclusive rrwlock inode r = 0 (0xfffffd806eb8e2b8) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9460 6321K 6321K 78643K 10587 0 0 pcb 23 9K 11K 78643K 333 0 0 rtable 97 3K 3K 78643K 423 0 0 ifaddr 34 9K 9K 78643K 83 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 25 0 0 iov 0 0K 16K 78643K 26 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1200 75K 75K 78643K 1468 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 10 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 46 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 7 21K 33K 78643K 479 0 0 sigio 0 0K 0K 78643K 5 0 0 proc 41 38K 70K 78643K 488 0 0 subproc 68 69634K 69634K 78643K 340 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 74 0 0 in_multi 33 2K 2K 78643K 163 0 0 ether_multi 1 0K 0K 78643K 12 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 234 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 86 20K 22K 78643K 2253 0 0 UVM aobj 42 2K 2K 78643K 45 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 9 0 0 NDP 5 0K 0K 78643K 33 0 0 temp 100 2357K 2422K 78643K 4311 0 0 kqueue 0 0K 0K 78643K 8 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 12 0 8 1 0 1 1 0 8 0 inpcbpl 280 220 0 213 1 0 1 1 0 8 0 plimitpl 152 41 0 32 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 113 0 73 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 94 0 90 1 0 1 1 0 8 0 nd6 48 20 0 16 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 512 0 327 12 0 12 12 0 8 0 art_table 32 513 0 327 2 0 2 2 0 8 0 art_node 16 112 0 78 1 0 1 1 0 8 0 sysvmsgpl 40 9 0 4 2 1 1 1 0 8 0 semapl 112 44 0 34 1 0 1 1 0 8 0 shmpl 112 43 0 3 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2002 0 606 47 1 46 46 0 8 0 ffsino 272 2002 0 606 94 0 94 94 0 8 0 nchpl 144 2850 0 1279 59 0 59 59 0 8 0 uvmvnodes 72 2181 0 0 40 0 40 40 0 8 0 vnodes 200 2181 0 0 115 0 115 115 0 8 0 namei 1024 8136 0 8134 1 0 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 6892 0 6890 7 6 1 6 0 8 0 sigapl 432 622 0 607 3 1 2 3 0 8 0 futexpl 56 5122 0 5122 1 0 1 1 0 8 1 knotepl 112 339 0 312 2 1 1 2 0 8 0 kqueuepl 104 175 0 173 1 0 1 1 0 8 0 pipepl 112 628 0 609 4 3 1 2 0 8 0 fdescpl 488 623 0 607 3 0 3 3 0 8 0 filepl 152 4081 0 3983 9 4 5 7 0 8 1 lockfpl 104 120 0 120 4 3 1 1 0 8 1 lockfspl 32 236 0 236 4 3 1 1 0 8 1 sessionpl 112 25 0 15 1 0 1 1 0 8 0 pgrppl 48 33 0 23 1 0 1 1 0 8 0 ucredpl 96 1159 0 1150 1 0 1 1 0 8 0 zombiepl 144 607 0 607 1 0 1 1 0 8 1 processpl 840 638 0 607 4 0 4 4 0 8 0 procpl 600 1520 0 1477 4 0 4 4 0 8 0 srpgc 64 48 0 48 3 2 1 1 0 8 1 sosppl 128 12 0 12 3 2 1 1 0 8 1 sockpl 384 554 0 537 4 1 3 4 0 8 1 mcl64k 65536 1 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 3 0 0 1 0 1 1 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 102 0 0 12 0 12 12 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 164 0 0 10 0 10 10 0 8 0 bufpl 256 5580 0 965 289 0 289 289 0 8 0 anonpl 16 82111 0 76353 45 13 32 40 0 125 5 amapchunkpl 152 4014 0 3921 13 8 5 11 0 158 0 amappl16 192 3387 0 3105 46 26 20 27 0 8 4 amappl15 184 122 0 121 1 0 1 1 0 8 0 amappl14 176 54 0 53 2 1 1 1 0 8 0 amappl13 168 48 0 45 1 0 1 1 0 8 0 amappl12 160 17 0 14 1 0 1 1 0 8 0 amappl11 152 312 0 303 1 0 1 1 0 8 0 amappl10 144 64 0 62 1 0 1 1 0 8 0 amappl9 136 439 0 438 1 0 1 1 0 8 0 amappl8 128 204 0 184 1 0 1 1 0 8 0 amappl7 120 65 0 58 1 0 1 1 0 8 0 amappl6 112 55 0 48 1 0 1 1 0 8 0 amappl5 104 255 0 244 1 0 1 1 0 8 0 amappl4 96 317 0 287 2 1 1 2 0 8 0 amappl3 88 263 0 252 1 0 1 1 0 8 0 amappl2 80 4590 0 4536 2 0 2 2 0 8 0 amappl1 72 23217 0 22762 23 13 10 18 0 8 0 amappl 72 1799 0 1761 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 44 0 3 1 0 1 1 0 8 0 uaddrrnd 24 623 0 607 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 623 0 607 1 0 1 1 0 8 0 vmmpekpl 168 9397 0 9372 2 0 2 2 0 8 0 vmmpepl 168 75718 0 74386 93 24 69 74 0 357 5 vmsppl 360 622 0 607 2 0 2 2 0 8 0 pdppl 4096 1253 0 1214 6 0 6 6 0 8 1 pvpl 32 236162 0 227272 122 21 101 109 0 265 25 pmappl 224 622 0 607 3 2 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 435 0 2 13 0 13 13 0 8 0