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 *213623 80630 0 0 0x4000000 0 syz-executor.0 507983 26160 0 0x2 0x480 1 syz-executor.0 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(fffffd806f2dd2e8) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff800021269a40,ffff800021270a80) at vm_impl_init_vmx+0x159 vm_create(ffff800000b56000,ffff800021270a80) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b56000,ffff800021270a80) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b56000,1,ffff800021270a80) at vmmioctl+0x1f2 VOP_IOCTL(fffffd806e1d7750,c5005601,ffff800000b56000,1,fffffd807f7d84e0,ffff800021270a80) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd80688f6738,c5005601,ffff800000b56000,ffff800021270a80) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021270a80,ffff80002128d6d8,ffff80002128d720) at sys_ioctl+0x4a2 syscall(ffff80002128d7a0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002128d7a0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb5083946c20, 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(fffffd806f2dd2e8) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff800021269a40,ffff800021270a80) at vm_impl_init_vmx+0x159 vm_create(ffff800000b56000,ffff800021270a80) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b56000,ffff800021270a80) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b56000,1,ffff800021270a80) at vmmioctl+0x1f2 VOP_IOCTL(fffffd806e1d7750,c5005601,ffff800000b56000,1,fffffd807f7d84e0,ffff800021270a80) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd80688f6738,c5005601,ffff800000b56000,ffff800021270a80) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021270a80,ffff80002128d6d8,ffff80002128d720) at sys_ioctl+0x4a2 syscall(ffff80002128d7a0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002128d7a0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb5083946c20, count: -12 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002128d1d0 rbx 0xffffffff8280abff cpu_info_full_primary+0x2bff rdx 0x8b rcx 0x2 rax 0x8a r8 0xffffffff81a0be34 kprintf+0x144 r9 0x1 r10 0x7715f7243828ed2a r11 0x5600049bff96acc1 r12 0xffffffff8280aa00 cpu_info_full_primary+0x2a00 r13 0 r14 0 r15 0x1 rip 0xffffffff81e3e908 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002128d1c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=213623 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000212702a0,0xffffffff82913618 process=0xffff8000ffff8008 user=0xffff800021288000, vmspace=0xfffffd806f2dda18 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 80630 175088 26160 0 2 0 syz-executor.0 *80630 213623 26160 0 7 0x4000000 syz-executor.0 81626 345221 32432 0 2 0x2 syz-executor.1 26160 507983 32432 0 7 0x482 syz-executor.0 32432 12078 15298 0 3 0x82 thrsleep syz-fuzzer 32432 361989 15298 0 3 0x4000082 thrsleep syz-fuzzer 32432 363436 15298 0 3 0x4000082 thrsleep syz-fuzzer 32432 425920 15298 0 3 0x4000082 thrsleep syz-fuzzer 32432 477821 15298 0 3 0x4000082 thrsleep syz-fuzzer 32432 509137 15298 0 3 0x4000082 thrsleep syz-fuzzer 32432 277597 15298 0 3 0x4000082 kqread syz-fuzzer 32432 377911 15298 0 3 0x4000082 thrsleep syz-fuzzer 15298 427272 65803 0 3 0x10008a sigsusp ksh 65803 178284 18494 0 3 0x9a select sshd 72940 51897 1 0 3 0x100083 ttyin getty 18494 400651 1 0 3 0x88 select sshd 54774 20991 20734 74 3 0x100092 bpf pflogd 20734 326224 1 0 3 0x80 netio pflogd 86169 30375 51159 73 2 0x100090 syslogd 51159 189667 1 0 3 0x100082 netio syslogd 53877 470436 1 0 3 0x100080 kqread resolvd 20169 447285 14894 77 3 0x100092 kqread dhcpleased 83820 346393 14894 77 3 0x100092 kqread dhcpleased 14894 260195 1 0 3 0x80 kqread dhcpleased 15046 392271 0 0 3 0x14200 bored smr 13006 105456 0 0 3 0x14200 pgzero zerothread 48078 483745 0 0 3 0x14200 aiodoned aiodoned 32952 129843 0 0 3 0x14200 syncer update 11789 186638 0 0 3 0x14200 cleaner cleaner 86593 120352 0 0 3 0x14200 reaper reaper 67399 92408 0 0 3 0x14200 pgdaemon pagedaemon 19681 375222 0 0 3 0x14200 bored crynlk 4994 90765 0 0 3 0x14200 bored crypto 11862 373440 0 0 3 0x14200 bored viomb 34563 511491 0 0 3 0x40014200 acpi0 acpi0 28231 362659 0 0 3 0x40014200 idle1 57968 187025 0 0 3 0x14200 bored softnet 6999 187496 0 0 3 0x14200 bored systqmp 42083 270140 0 0 3 0x14200 bored systq 51312 42102 0 0 3 0x40014200 bored softclock 68394 55089 0 0 3 0x40014200 idle0 1 471342 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 80630 (syz-executor.0) thread 0xffff800021270a80 (213623) 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 10123 6423K 7391K 78643K 12444 0 pcb 13 8K 8K 78643K 42 0 rtable 90 4K 4K 78643K 311 0 ifaddr 49 11K 11K 78643K 94 0 counters 44 34K 34K 78643K 62 0 ioctlops 1 2K 4K 78643K 1545 0 iov 0 0K 24K 78643K 53 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 6 0 vnodes 1220 77K 77K 78643K 1595 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 118 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 5 13K 25K 78643K 1426 0 sigio 0 0K 0K 78643K 5 0 proc 68 87K 111K 78643K 373 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 132 0 in_multi 22 1K 2K 78643K 78 0 ether_multi 1 0K 0K 78643K 22 0 mrt 0 0K 0K 78643K 16 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 37 175K 175K 78643K 37 0 exec 0 0K 2K 78643K 466 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 216 30K 31K 78643K 18778 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 0K 78643K 34 0 NDP 7 0K 0K 78643K 22 0 temp 111 4209K 4275K 78643K 18369 0 kqueue 10 14K 18K 78643K 90 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 105 0 102 1 0 1 1 0 8 0 rtentry 112 56 0 23 2 0 2 2 0 8 0 unpcb 120 302 0 279 2 1 1 2 0 8 0 syncache 296 8 0 8 2 2 0 1 0 8 0 tcpqe 32 38 0 38 2 2 0 1 0 8 0 tcpcb 736 180 0 176 6 3 3 3 0 8 2 arp 120 8 0 4 1 0 1 1 0 8 0 inpcb 304 457 0 450 3 1 2 2 0 8 1 nd6 48 9 0 6 1 0 1 1 0 8 0 kcovpl 48 3 0 1 1 0 1 1 0 8 0 ppxss 1248 8 0 8 2 2 0 1 0 8 0 pffrag 232 1 0 0 1 0 1 1 0 482 0 pffrnode 88 1 0 0 1 0 1 1 0 8 0 pffrent 40 5 0 4 1 0 1 1 0 8 0 pfosfp 40 1449 0 1012 5 0 5 5 0 8 0 pfosfpen 112 1449 0 714 21 0 21 21 0 8 0 pfrktable 1344 1 0 0 1 0 1 1 0 8 0 pfstitem 24 31 0 12 1 0 1 1 0 8 0 pfstkey 112 39 0 20 1 0 1 1 0 8 0 pfstate 320 35 0 16 3 1 2 2 0 8 0 pfrule 1360 31 0 21 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 232 0 88 12 1 11 12 0 8 0 art_table 32 233 0 88 2 0 2 2 0 8 0 art_node 16 55 0 25 1 0 1 1 0 8 0 sysvmsgpl 40 37 0 21 1 0 1 1 0 8 0 semupl 112 10 0 10 1 1 0 1 0 8 0 semapl 112 116 0 106 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 3074 0 1654 89 0 89 89 0 8 0 ffsino 272 3074 0 1654 95 0 95 95 0 8 0 nchpl 144 4876 0 3269 61 0 61 61 0 8 0 uvmvnodes 72 3400 0 0 62 0 62 62 0 8 0 vnodes 224 3400 0 0 200 0 200 200 0 8 0 namei 1024 12403 0 12403 1 0 1 1 0 8 1 percpumem 16 43 0 9 1 0 1 1 0 8 0 vmpool 560 1 0 0 1 0 1 1 0 8 0 scxspl 216 15244 0 15244 9 8 1 8 0 8 1 plimitpl 152 38 0 29 1 0 1 1 0 8 0 sigapl 424 1673 0 1639 6 2 4 5 0 8 0 futexpl 56 9604 0 9604 1 0 1 1 0 8 1 knotepl 112 58 0 0 2 0 2 2 0 8 0 kqueuepl 216 823 0 817 1 0 1 1 0 8 0 pipepl 336 117 0 107 2 0 2 2 0 8 0 fdescpl 496 1657 0 1639 3 0 3 3 0 8 0 filepl 152 5570 0 5457 6 1 5 6 0 8 0 lockfpl 104 257 0 255 1 0 1 1 0 8 0 lockfspl 48 105 0 103 1 0 1 1 0 8 0 sessionpl 144 19 0 8 1 0 1 1 0 8 0 pgrppl 48 19 0 8 1 0 1 1 0 8 0 ucredpl 96 498 0 486 1 0 1 1 0 8 0 zombiepl 144 1639 0 1638 1 0 1 1 0 8 0 processpl 1072 1673 0 1638 3 0 3 3 0 8 0 procpl 672 3381 0 3338 7 3 4 5 0 8 0 srpgc 96 2 0 2 1 1 0 1 0 8 0 sockpl 480 864 0 831 6 1 5 6 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 14 0 0 2 0 2 2 0 8 0 mcl8k 8192 11 0 0 2 0 2 2 0 8 0 mcl4k 4096 8 0 0 1 0 1 1 0 8 0 mcl2k 2048 193 0 0 23 0 23 23 0 8 0 mtagpl 96 58 0 0 2 0 2 2 0 8 0 mbufpl 256 507 0 0 29 0 29 29 0 8 0 bufpl 280 5686 0 135 397 0 397 397 0 8 0 anonpl 24 407498 0 393743 91 5 86 88 0 186 0 amapchunkpl 152 43891 0 43325 28 4 24 26 0 158 0 amappl16 200 3225 0 2798 25 2 23 24 0 8 0 amappl14 184 705 0 703 1 0 1 1 0 8 0 amappl13 176 41 0 39 1 0 1 1 0 8 0 amappl12 168 7 0 5 1 0 1 1 0 8 0 amappl11 160 51 0 36 1 0 1 1 0 8 0 amappl10 152 726 0 717 1 0 1 1 0 8 0 amappl9 144 240 0 238 1 0 1 1 0 8 0 amappl8 136 406 0 361 2 0 2 2 0 8 0 amappl7 128 78 0 62 1 0 1 1 0 8 0 amappl6 120 136 0 121 1 0 1 1 0 8 0 amappl5 112 2229 0 2210 1 0 1 1 0 8 0 amappl4 104 607 0 577 1 0 1 1 0 8 0 amappl3 96 112 0 108 1 0 1 1 0 8 0 amappl2 88 522 0 470 2 0 2 2 0 8 0 amappl1 80 31634 0 31189 14 4 10 13 0 8 0 amappl 88 18330 0 18176 4 0 4 4 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 1658 0 1639 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1658 0 1639 1 0 1 1 0 8 0 vmmpekpl 168 12734 0 12712 2 0 2 2 0 8 0 vmmpepl 168 182185 0 180419 115 33 82 102 0 357 1 vmsppl 368 1657 0 1639 2 0 2 2 0 8 0 rwobjpl 56 34306 0 33115 21 3 18 18 0 8 0 pdppl 4096 3324 0 3278 64 18 46 50 0 8 0 pvpl 32 986810 0 969617 168 15 153 155 0 265 9 pmappl 224 1657 0 1639 2 0 2 2 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 336 0 25 9 0 9 9 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(fffffd806f2dd2e8) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff800021269a40,ffff800021270a80) at vm_impl_init_vmx+0x159 vm_create(ffff800000b56000,ffff800021270a80) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b56000,ffff800021270a80) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b56000,1,ffff800021270a80) at vmmioctl+0x1f2 VOP_IOCTL(fffffd806e1d7750,c5005601,ffff800000b56000,1,fffffd807f7d84e0,ffff800021270a80) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd80688f6738,c5005601,ffff800000b56000,ffff800021270a80) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021270a80,ffff80002128d6d8,ffff80002128d720) at sys_ioctl+0x4a2 syscall(ffff80002128d7a0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002128d7a0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb5083946c20, count: -12 ddb{0}> machine ddbcpu 1