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 *361047 93465 0 0 0x4000000 0 syz-executor.1 44487 26352 0 0 0 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(fffffd8067ca7460) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff80002126a230,ffff800021216000) at vm_impl_init_vmx+0x159 vm_create(ffff800000b8a000,ffff800021216000) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b8a000,ffff800021216000) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b8a000,1,ffff800021216000) at vmmioctl+0x1f2 VOP_IOCTL(fffffd806e060750,c5005601,ffff800000b8a000,1,fffffd807f7d8600,ffff800021216000) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd806922b278,c5005601,ffff800000b8a000,ffff800021216000) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021216000,ffff800021295608,ffff800021295650) at sys_ioctl+0x4a2 syscall(ffff8000212956d0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000212956d0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1e8316f4010, 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(fffffd8067ca7460) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff80002126a230,ffff800021216000) at vm_impl_init_vmx+0x159 vm_create(ffff800000b8a000,ffff800021216000) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b8a000,ffff800021216000) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b8a000,1,ffff800021216000) at vmmioctl+0x1f2 VOP_IOCTL(fffffd806e060750,c5005601,ffff800000b8a000,1,fffffd807f7d8600,ffff800021216000) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd806922b278,c5005601,ffff800000b8a000,ffff800021216000) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021216000,ffff800021295608,ffff800021295650) at sys_ioctl+0x4a2 syscall(ffff8000212956d0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000212956d0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1e8316f4010, count: -12 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800021295100 rbx 0xffffffff8280abff cpu_info_full_primary+0x2bff rdx 0x8b rcx 0x2 rax 0x8a r8 0xffffffff81a0be34 kprintf+0x144 r9 0x1 r10 0xfcab687e43e7f0c2 r11 0x2dc7c498a43eedbd r12 0xffffffff8280aa00 cpu_info_full_primary+0x2a00 r13 0 r14 0 r15 0x1 rip 0xffffffff81e3e908 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000212950f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=361047 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800021217ce0,0xffffffff82913618 process=0xffff8000ffffb248 user=0xffff800021290000, vmspace=0xfffffd8067ca7a20 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 93465 309856 84520 0 2 0 syz-executor.1 *93465 361047 84520 0 7 0x4000000 syz-executor.1 26352 44487 86282 0 7 0 syz-executor.0 26352 430690 86282 0 3 0x4000080 netcon syz-executor.0 32806 468294 0 0 3 0x14200 bored sosplice 84520 148827 66618 0 3 0x82 nanoslp syz-executor.1 86282 92589 66618 0 3 0x82 nanoslp syz-executor.0 66618 423746 37436 0 3 0x82 thrsleep syz-fuzzer 66618 260695 37436 0 3 0x4000082 nanoslp syz-fuzzer 66618 468016 37436 0 3 0x4000082 thrsleep syz-fuzzer 66618 503142 37436 0 3 0x4000082 thrsleep syz-fuzzer 66618 130785 37436 0 3 0x4000082 kqread syz-fuzzer 66618 310958 37436 0 3 0x4000082 thrsleep syz-fuzzer 66618 372680 37436 0 3 0x4000082 thrsleep syz-fuzzer 66618 217467 37436 0 3 0x4000082 thrsleep syz-fuzzer 37436 62984 1453 0 3 0x10008a sigsusp ksh 1453 77184 71347 0 3 0x9a select sshd 74838 397656 1 0 3 0x100083 ttyin getty 71347 198487 1 0 3 0x88 select sshd 35818 340308 40943 74 3 0x100092 bpf pflogd 40943 365411 1 0 3 0x80 netio pflogd 50521 499906 38112 73 3 0x100090 kqread syslogd 38112 356281 1 0 3 0x100082 netio syslogd 67345 254518 1 0 3 0x100080 kqread resolvd 26760 327688 23436 77 3 0x100092 kqread dhcpleased 68281 268165 23436 77 3 0x100092 kqread dhcpleased 23436 462113 1 0 3 0x80 kqread dhcpleased 47895 424796 0 0 3 0x14200 bored smr 26885 76797 0 0 2 0x14200 zerothread 6080 214958 0 0 3 0x14200 aiodoned aiodoned 48255 465698 0 0 3 0x14200 syncer update 58485 92339 0 0 3 0x14200 cleaner cleaner 54720 4044 0 0 3 0x14200 reaper reaper 31527 472575 0 0 3 0x14200 pgdaemon pagedaemon 55749 322552 0 0 3 0x14200 bored crynlk 17319 516949 0 0 3 0x14200 bored crypto 85901 215850 0 0 3 0x14200 bored viomb 74553 81826 0 0 3 0x40014200 acpi0 acpi0 16642 152982 0 0 3 0x40014200 idle1 3533 141495 0 0 3 0x14200 bored softnet 25134 135680 0 0 3 0x14200 bored systqmp 2470 394604 0 0 3 0x14200 bored systq 4643 107692 0 0 3 0x40014200 bored softclock 60482 279123 0 0 3 0x40014200 idle0 1 427952 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 93465 (syz-executor.1) thread 0xffff800021216000 (361047) 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 10137 6431K 7071K 78643K 13300 0 pcb 13 8K 8K 78643K 164 0 rtable 94 3K 4K 78643K 287 0 ifaddr 55 12K 13K 78643K 115 0 counters 44 34K 34K 78643K 68 0 ioctlops 1 2K 4K 78643K 1571 0 iov 0 0K 12K 78643K 59 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 6 0 vnodes 1218 77K 77K 78643K 1864 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 3 0 VM map 2 1K 1K 78643K 2 0 sem 12 1K 1K 78643K 12 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 6 17K 25K 78643K 2734 0 sigio 0 0K 0K 78643K 10 0 proc 71 87K 111K 78643K 444 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 176 0 in_multi 33 2K 2K 78643K 140 0 ether_multi 1 0K 0K 78643K 34 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 459 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 259 98K 98K 78643K 34418 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 114 0 NDP 8 0K 0K 78643K 26 0 temp 114 4206K 4270K 78643K 12711 0 kqueue 10 14K 22K 78643K 83 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 87 0 84 1 0 1 1 0 8 0 rtentry 112 62 0 26 2 0 2 2 0 8 0 unpcb 120 533 0 514 1 0 1 1 0 8 0 syncache 296 23 0 23 5 4 1 1 0 8 1 tcpqe 32 1440 0 1440 4 3 1 2 0 8 1 tcpcb 736 437 0 427 11 8 3 4 0 8 0 arp 120 8 0 2 1 0 1 1 0 8 0 inpcb 304 1176 0 1164 6 4 2 2 0 8 1 nd6 48 9 0 3 1 0 1 1 0 8 0 pkpcb 40 15 0 15 1 1 0 1 0 8 0 kcovpl 48 3 0 1 1 0 1 1 0 8 0 pffrent 40 5 0 5 1 1 0 1 0 8 0 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 7 0 7 1 1 0 1 0 8 0 pftag 88 1 0 0 1 0 1 1 0 8 0 pfqueue 264 5 0 0 1 0 1 1 0 8 0 pfstitem 24 61 0 22 1 0 1 1 0 8 0 pfstkey 112 61 0 22 2 0 2 2 0 8 0 pfstate 320 61 0 22 4 0 4 4 0 8 0 pfrule 1360 37 0 32 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 263 0 85 13 1 12 12 0 8 0 art_table 32 264 0 85 2 0 2 2 0 8 0 art_node 16 56 0 26 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 6 1 0 1 1 0 8 0 semapl 112 10 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 4624 0 3215 89 0 89 89 0 8 0 ffsino 272 4624 0 3215 95 0 95 95 0 8 0 nchpl 144 7917 0 6310 61 1 60 61 0 8 0 uvmvnodes 72 5155 0 0 94 0 94 94 0 8 0 vnodes 224 5155 0 0 304 0 304 304 0 8 0 namei 1024 18935 0 18935 2 1 1 1 0 8 1 percpumem 16 46 0 12 1 0 1 1 0 8 0 vcpupl 2048 5 0 0 1 0 1 1 0 8 0 vmpool 560 6 0 0 1 0 1 1 0 8 0 scxspl 216 23466 0 23466 9 8 1 8 0 8 1 plimitpl 152 48 0 39 1 0 1 1 0 8 0 sigapl 424 2982 0 2946 6 1 5 5 0 8 0 futexpl 56 17890 0 17890 1 0 1 1 0 8 1 knotepl 112 56 0 0 2 0 2 2 0 8 0 kqueuepl 216 1451 0 1444 1 0 1 1 0 8 0 pipepl 336 182 0 172 8 7 1 2 0 8 0 fdescpl 496 2965 0 2946 3 0 3 3 0 8 0 filepl 152 8941 0 8822 6 1 5 6 0 8 0 lockfpl 104 309 0 307 1 0 1 1 0 8 0 lockfspl 48 101 0 99 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 543 0 531 1 0 1 1 0 8 0 zombiepl 144 2946 0 2946 2 1 1 1 0 8 1 processpl 1072 2982 0 2946 3 0 3 3 0 8 0 procpl 672 6233 0 6188 7 3 4 5 0 8 0 sosppl 168 45 0 45 3 2 1 1 0 8 1 sockpl 480 1815 0 1780 10 4 6 6 0 8 1 mcl64k 65536 10 0 0 2 0 2 2 0 8 0 mcl16k 16384 7 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 6 0 0 1 0 1 1 0 8 0 mcl4k 4096 20 0 0 3 1 2 3 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 263 0 0 32 0 32 32 0 8 0 mtagpl 96 131 0 0 4 0 4 4 0 8 0 mbufpl 256 602 0 0 36 0 36 36 0 8 0 bufpl 280 6663 0 327 453 0 453 453 0 8 0 anonpl 24 761076 0 748468 113 14 99 102 0 186 21 amapchunkpl 152 81637 0 81093 32 10 22 25 0 158 0 amappl16 200 5975 0 5577 31 5 26 30 0 8 5 amappl15 192 2622 0 2618 1 0 1 1 0 8 0 amappl14 184 4 0 3 1 0 1 1 0 8 0 amappl13 176 36 0 34 2 1 1 1 0 8 0 amappl12 168 7 0 5 2 1 1 1 0 8 0 amappl11 160 122 0 108 1 0 1 1 0 8 0 amappl10 152 38 0 32 1 0 1 1 0 8 0 amappl9 144 246 0 243 1 0 1 1 0 8 0 amappl8 136 427 0 374 3 1 2 2 0 8 0 amappl7 128 75 0 60 1 0 1 1 0 8 0 amappl6 120 131 0 120 1 0 1 1 0 8 0 amappl5 112 2856 0 2834 1 0 1 1 0 8 0 amappl4 104 701 0 672 1 0 1 1 0 8 0 amappl3 96 100 0 97 1 0 1 1 0 8 0 amappl2 88 518 0 464 3 1 2 2 0 8 0 amappl1 80 52255 0 51804 14 4 10 13 0 8 0 amappl 88 33928 0 33760 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 2971 0 2946 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2971 0 2946 1 0 1 1 0 8 0 vmmpekpl 168 19177 0 19153 2 0 2 2 0 8 0 vmmpepl 168 327913 0 326063 98 13 85 88 0 357 4 vmsppl 368 2970 0 2946 3 0 3 3 0 8 0 rwobjpl 56 58632 0 57456 20 3 17 19 0 8 0 pdppl 4096 5950 0 5897 70 17 53 53 0 8 0 pvpl 32 1730257 0 1714050 191 25 166 171 0 265 34 pmappl 224 2970 0 2946 2 0 2 2 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 376 0 38 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(fffffd8067ca7460) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff80002126a230,ffff800021216000) at vm_impl_init_vmx+0x159 vm_create(ffff800000b8a000,ffff800021216000) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b8a000,ffff800021216000) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b8a000,1,ffff800021216000) at vmmioctl+0x1f2 VOP_IOCTL(fffffd806e060750,c5005601,ffff800000b8a000,1,fffffd807f7d8600,ffff800021216000) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd806922b278,c5005601,ffff800000b8a000,ffff800021216000) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff800021216000,ffff800021295608,ffff800021295650) at sys_ioctl+0x4a2 syscall(ffff8000212956d0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000212956d0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1e8316f4010, 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 end of kernel end trace frame: 0x7f7ffffef5b0, count: 12 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 end of kernel end trace frame: 0x7f7ffffef5b0, count: -3