panic: kernel diagnostic assertion "_kernel_lock_held()" failed: file "/syzkaller/managers/multicore/kernel/sys/uvm/uvm_map.c", line 3641 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 36595 2180 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff824502ee) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff824bffea,ffffffff824cd928,e39,ffffffff824ce6c6) at __assert+0x25 sys/kern/subr_prf.c:161 uvmspace_free(fffffd8066870d00) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff800021298af0,ffff80002128d500) at vm_impl_init_vmx+0x159 vm_create(ffff800000b8c000,ffff80002128d500) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b8c000,ffff80002128d500) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b8c000,1,ffff80002128d500) at vmmioctl+0x1f2 VOP_IOCTL(fffffd806e20e3d0,c5005601,ffff800000b8c000,1,fffffd807f7d8420,ffff80002128d500) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd806732d148,c5005601,ffff800000b8c000,ffff80002128d500) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff80002128d500,ffff800022d4d818,ffff800022d4d860) at sys_ioctl+0x4a2 syscall(ffff800022d4d8e0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800022d4d8e0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa09098f9840, 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}> set $maxwidth = 0 ddb{0}> show panic *cpu0: kernel diagnostic assertion "_kernel_lock_held()" failed: file "/syzkaller/managers/multicore/kernel/sys/uvm/uvm_map.c", line 3641 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff824502ee) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff824bffea,ffffffff824cd928,e39,ffffffff824ce6c6) at __assert+0x25 sys/kern/subr_prf.c:161 uvmspace_free(fffffd8066870d00) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff800021298af0,ffff80002128d500) at vm_impl_init_vmx+0x159 vm_create(ffff800000b8c000,ffff80002128d500) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b8c000,ffff80002128d500) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b8c000,1,ffff80002128d500) at vmmioctl+0x1f2 VOP_IOCTL(fffffd806e20e3d0,c5005601,ffff800000b8c000,1,fffffd807f7d8420,ffff80002128d500) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd806732d148,c5005601,ffff800000b8c000,ffff80002128d500) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff80002128d500,ffff800022d4d818,ffff800022d4d860) at sys_ioctl+0x4a2 syscall(ffff800022d4d8e0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800022d4d8e0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa09098f9840, count: -12 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800022d4d310 rbx 0xffffffff8280abff cpu_info_full_primary+0x2bff rdx 0x8b rcx 0x2 rax 0x8a r8 0xffffffff81a0be34 kprintf+0x144 r9 0x1 r10 0x4a8ffda405c44b10 r11 0x67c158e364204bf5 r12 0xffffffff8280aa00 cpu_info_full_primary+0x2a00 r13 0 r14 0 r15 0x1 rip 0xffffffff81e3e908 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800022d4d300 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=36595 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=79, nice=20 forw=0xffffffffffffffff, list=0xffff80002128c2a0,0xffffffff82913618 process=0xffff800021295d68 user=0xffff800022d48000, vmspace=0xfffffd807f008a10 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 2180 522514 62295 0 2 0 syz-executor.1 * 2180 36595 62295 0 7 0x4000000 syz-executor.1 80265 148881 0 0 3 0x14280 nfsidl nfsio 2231 438015 0 0 3 0x14280 nfsidl nfsio 18265 296414 0 0 3 0x14280 nfsidl nfsio 22608 174915 0 0 3 0x14280 nfsidl nfsio 68781 516028 0 0 3 0x14280 nfsidl nfsio 45279 469731 0 0 3 0x14280 nfsidl nfsio 29148 194644 0 0 3 0x14280 nfsidl nfsio 95300 509014 0 0 3 0x14280 nfsidl nfsio 5346 234488 0 0 3 0x14280 nfsidl nfsio 60746 249703 0 0 3 0x14280 nfsidl nfsio 82218 294382 0 0 3 0x14280 nfsidl nfsio 36493 147468 0 0 3 0x14280 nfsidl nfsio 75108 174606 0 0 3 0x14280 nfsidl nfsio 38863 513137 0 0 3 0x14280 nfsidl nfsio 42474 217642 0 0 3 0x14280 nfsidl nfsio 26002 490389 0 0 3 0x14280 nfsidl nfsio 97500 302828 0 0 3 0x14280 nfsidl nfsio 60050 110653 0 0 3 0x14280 nfsidl nfsio 83109 51123 0 0 3 0x14280 nfsidl nfsio 28951 385318 0 0 3 0x14280 nfsidl nfsio 47073 202449 1 0 3 0x100083 ttyin getty 62295 150150 95839 0 2 0x482 syz-executor.1 87619 117707 0 0 3 0x14200 bored sosplice 60960 254303 95839 0 2 0x482 syz-executor.0 95839 148148 31994 0 3 0x82 thrsleep syz-fuzzer 95839 146684 31994 0 3 0x4000082 thrsleep syz-fuzzer 95839 489114 31994 0 3 0x4000082 thrsleep syz-fuzzer 95839 232148 31994 0 3 0x4000082 thrsleep syz-fuzzer 95839 401671 31994 0 3 0x4000082 thrsleep syz-fuzzer 95839 282099 31994 0 3 0x4000082 thrsleep syz-fuzzer 95839 65724 31994 0 3 0x4000082 thrsleep syz-fuzzer 95839 134364 31994 0 3 0x4000082 kqread syz-fuzzer 31994 278128 32991 0 3 0x10008a sigsusp ksh 32991 365426 50797 0 3 0x9a select sshd 50797 466183 1 0 3 0x88 select sshd 38710 238779 35797 74 3 0x100092 bpf pflogd 35797 246874 1 0 3 0x80 netio pflogd 53738 238812 71559 73 2 0x100090 syslogd 71559 240420 1 0 3 0x100082 netio syslogd 83805 413575 1 0 3 0x100080 kqread resolvd 75354 39046 38040 77 3 0x100092 kqread dhcpleased 37986 276222 38040 77 3 0x100092 kqread dhcpleased 38040 347116 1 0 3 0x80 kqread dhcpleased 71909 521541 0 0 3 0x14200 bored smr 72807 420558 0 0 2 0x14200 zerothread 1922 214539 0 0 3 0x14200 aiodoned aiodoned 24496 156757 0 0 3 0x14200 syncer update 67252 432166 0 0 3 0x14200 cleaner cleaner 95461 34779 0 0 3 0x14200 reaper reaper 40233 174892 0 0 3 0x14200 pgdaemon pagedaemon 6694 429837 0 0 3 0x14200 bored crynlk 19975 341587 0 0 3 0x14200 bored crypto 27856 314168 0 0 3 0x14200 bored viomb 62721 497243 0 0 3 0x40014200 acpi0 acpi0 46362 140231 0 0 7 0x40014200 idle1 8620 452260 0 0 3 0x14200 bored softnet 41883 30365 0 0 3 0x14200 bored systqmp 72910 438687 0 0 3 0x14200 bored systq 68016 135325 0 0 3 0x40014200 bored softclock 89404 339127 0 0 3 0x40014200 idle0 1 239381 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 2180 (syz-executor.1) thread 0xffff80002128d500 (36595) exclusive rwlock vmlistlock r = 0 (0xffff800000655c78) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 vm_create+0x12e vm_impl_init sys/arch/amd64/amd64/vmm.c:1688 [inline] #1 vm_create+0x12e sys/arch/amd64/amd64/vmm.c:1510 #2 vmmioctl+0x1f2 #3 VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 #4 vn_ioctl+0xba sys/kern/vfs_vnops.c:531 #5 sys_ioctl+0x4a2 #6 syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] #6 syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 #7 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10170 6451K 7151K 78643K 13260 0 pcb 13 8K 8K 78643K 74 0 rtable 74 4K 4K 78643K 268 0 ifaddr 73 13K 13K 78643K 115 0 sysctl 2 0K 0K 78643K 4 0 counters 44 34K 34K 78643K 58 0 ioctlops 1 2K 4K 78643K 1556 0 iov 0 0K 16K 78643K 76 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 6 0 vnodes 1228 77K 78K 78643K 1800 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 3 5K 5K 78643K 7 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 12 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 5 13K 25K 78643K 2892 0 sigio 0 0K 0K 78643K 24 0 proc 70 87K 111K 78643K 410 0 subproc 32 2K 2K 78643K 51 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 79 0 in_multi 19 1K 2K 78643K 67 0 ether_multi 1 0K 0K 78643K 10 0 mrt 0 0K 0K 78643K 3 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 49 228K 228K 78643K 49 0 exec 0 0K 2K 78643K 477 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 274 65K 65K 78643K 36285 0 UVM aobj 12 4K 4K 78643K 15 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 36 0 NDP 13 0K 0K 78643K 26 0 temp 134 4206K 4282K 78643K 19642 0 kqueue 10 14K 19K 78643K 76 0 SYN cache 2 16K 16K 78643K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 65 0 62 1 0 1 1 0 8 0 rtentry 112 57 0 33 2 1 1 2 0 8 0 unpcb 120 438 0 422 1 0 1 1 0 8 0 syncache 296 7 0 7 3 3 0 1 0 8 0 tcpqe 32 150 0 150 3 3 0 2 0 8 0 tcpcb 736 230 0 224 6 4 2 2 0 8 1 arp 120 8 0 4 1 0 1 1 0 8 0 inpcb 304 643 0 636 5 4 1 2 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 9 0 6 1 0 1 1 0 8 0 pkpcb 40 4 0 4 2 2 0 1 0 8 0 kcovpl 48 3 0 1 1 0 1 1 0 8 0 ppxss 1248 4 0 4 3 3 0 1 0 8 0 pffrag 232 4 0 4 2 1 1 1 0 482 1 pffrnode 88 4 0 4 2 1 1 1 0 8 1 pffrent 40 8 0 8 2 1 1 1 0 8 1 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfrktable 1344 2 0 0 1 0 1 1 0 8 0 pftag 88 3 0 0 1 0 1 1 0 8 0 pfqueue 264 2 0 0 1 0 1 1 0 8 0 pfstitem 24 31 0 20 1 0 1 1 0 8 0 pfstkey 112 31 0 20 1 0 1 1 0 8 0 pfstate 320 31 0 20 2 0 2 2 0 8 0 pfrule 1360 59 0 46 3 1 2 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 262 0 156 12 2 10 12 0 8 1 art_table 32 263 0 156 2 0 2 2 0 8 0 art_node 16 56 0 37 1 0 1 1 0 8 0 sysvmsgpl 40 30 0 18 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 10 0 0 1 0 1 1 0 8 0 shmpl 112 12 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 4600 0 3193 89 0 89 89 0 8 0 ffsino 272 4600 0 3193 95 0 95 95 0 8 0 nchpl 144 7959 0 6352 61 0 61 61 0 8 0 uvmvnodes 72 5096 0 0 93 0 93 93 0 8 0 vnodes 224 5096 0 0 300 0 300 300 0 8 0 namei 1024 19248 0 19248 2 1 1 1 0 8 1 percpumem 16 41 0 7 1 0 1 1 0 8 0 vcpupl 2048 4 0 0 1 0 1 1 0 8 0 vmpool 560 5 0 0 1 0 1 1 0 8 0 scxspl 216 24030 0 24030 15 14 1 6 0 8 1 plimitpl 152 53 0 44 1 0 1 1 0 8 0 sigapl 424 3161 0 3106 7 0 7 7 0 8 0 futexpl 56 23446 0 23446 1 0 1 1 0 8 1 knotepl 112 59 0 0 2 0 2 2 0 8 0 kqueuepl 216 2765 0 2759 3 2 1 2 0 8 0 pipepl 336 226 0 216 7 5 2 3 0 8 1 fdescpl 496 3124 0 3106 3 0 3 3 0 8 0 filepl 152 10091 0 9978 8 3 5 7 0 8 0 lockfpl 104 195 0 193 1 0 1 1 0 8 0 lockfspl 48 67 0 65 1 0 1 1 0 8 0 sessionpl 144 20 0 9 1 0 1 1 0 8 0 pgrppl 48 20 0 9 1 0 1 1 0 8 0 ucredpl 96 709 0 697 1 0 1 1 0 8 0 zombiepl 144 3106 0 3105 2 1 1 1 0 8 0 processpl 1072 3161 0 3105 4 0 4 4 0 8 0 procpl 672 6608 0 6544 10 4 6 6 0 8 0 srpgc 96 2 0 2 1 1 0 1 0 8 0 sosppl 168 28 0 28 4 3 1 1 0 8 1 sockpl 480 1156 0 1130 10 6 4 6 0 8 0 mcl64k 65536 9 0 0 2 0 2 2 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 9 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 12 0 0 2 0 2 2 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 371 0 0 46 0 46 46 0 8 0 mtagpl 96 96 0 0 2 0 2 2 0 8 0 mbufpl 256 500 0 0 28 0 28 28 0 8 0 bufpl 280 7357 0 1021 453 0 453 453 0 8 0 anonpl 24 796572 0 773737 187 46 141 160 0 186 1 amapchunkpl 152 85414 0 84696 45 15 30 36 0 158 1 amappl16 200 5634 0 4800 73 28 45 55 0 8 1 amappl14 184 2467 0 2465 1 0 1 1 0 8 0 amappl13 176 36 0 34 1 0 1 1 0 8 0 amappl12 168 7 0 6 1 0 1 1 0 8 0 amappl11 160 425 0 409 1 0 1 1 0 8 0 amappl10 152 41 0 33 1 0 1 1 0 8 0 amappl9 144 250 0 248 1 0 1 1 0 8 0 amappl8 136 428 0 376 2 0 2 2 0 8 0 amappl7 128 79 0 64 1 0 1 1 0 8 0 amappl6 120 131 0 121 1 0 1 1 0 8 0 amappl5 112 3014 0 2994 1 0 1 1 0 8 0 amappl4 104 1028 0 998 1 0 1 1 0 8 0 amappl3 96 137 0 134 1 0 1 1 0 8 0 amappl2 88 539 0 486 2 0 2 2 0 8 0 amappl1 80 57816 0 57362 14 4 10 13 0 8 0 amappl 88 35779 0 35588 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 64 14 0 3 1 0 1 1 0 8 0 uaddrrnd 24 3129 0 3106 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3129 0 3106 1 0 1 1 0 8 0 vmmpekpl 168 19808 0 19779 2 0 2 2 0 8 0 vmmpepl 168 351507 0 349283 162 42 120 133 0 357 18 vmsppl 368 3128 0 3106 3 0 3 3 0 8 0 rwobjpl 56 61885 0 60235 31 7 24 27 0 8 0 pdppl 4096 6266 0 6216 69 19 50 50 0 8 0 pvpl 32 2048002 0 2021607 284 58 226 248 0 265 10 pmappl 224 3128 0 3106 2 0 2 2 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 376 0 34 10 0 10 10 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff824502ee) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff824bffea,ffffffff824cd928,e39,ffffffff824ce6c6) at __assert+0x25 sys/kern/subr_prf.c:161 uvmspace_free(fffffd8066870d00) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff800021298af0,ffff80002128d500) at vm_impl_init_vmx+0x159 vm_create(ffff800000b8c000,ffff80002128d500) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b8c000,ffff80002128d500) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b8c000,1,ffff80002128d500) at vmmioctl+0x1f2 VOP_IOCTL(fffffd806e20e3d0,c5005601,ffff800000b8c000,1,fffffd807f7d8420,ffff80002128d500) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd806732d148,c5005601,ffff800000b8c000,ffff80002128d500) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff80002128d500,ffff800022d4d818,ffff800022d4d860) at sys_ioctl+0x4a2 syscall(ffff800022d4d8e0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800022d4d8e0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa09098f9840, count: -12 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffff800020d38ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206 sched_idle(ffff800020d38ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178 end trace frame: 0x0, count: 10 ddb{1}> trace x86_ipi_db(ffff800020d38ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206 sched_idle(ffff800020d38ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178 end trace frame: 0x0, count: -5