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 *174895 69919 0 0 0x4000000 0 syz-executor.1 468717 29074 0 0x2 0 1 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(fffffd807f008e60) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff800021217a40,ffff8000211d9ce0) at vm_impl_init_vmx+0x159 vm_create(ffff800000b73000,ffff8000211d9ce0) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b73000,ffff8000211d9ce0) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b73000,1,ffff8000211d9ce0) at vmmioctl+0x1f2 VOP_IOCTL(fffffd806e31c590,c5005601,ffff800000b73000,1,fffffd807f7d8360,ffff8000211d9ce0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd8066d027d8,c5005601,ffff800000b73000,ffff8000211d9ce0) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000211d9ce0,ffff80002129f528,ffff80002129f570) at sys_ioctl+0x4a2 syscall(ffff80002129f5f0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002129f5f0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb2792637dc0, 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(fffffd807f008e60) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff800021217a40,ffff8000211d9ce0) at vm_impl_init_vmx+0x159 vm_create(ffff800000b73000,ffff8000211d9ce0) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b73000,ffff8000211d9ce0) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b73000,1,ffff8000211d9ce0) at vmmioctl+0x1f2 VOP_IOCTL(fffffd806e31c590,c5005601,ffff800000b73000,1,fffffd807f7d8360,ffff8000211d9ce0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd8066d027d8,c5005601,ffff800000b73000,ffff8000211d9ce0) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000211d9ce0,ffff80002129f528,ffff80002129f570) at sys_ioctl+0x4a2 syscall(ffff80002129f5f0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002129f5f0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb2792637dc0, count: -12 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002129f020 rbx 0xffffffff8280abff cpu_info_full_primary+0x2bff rdx 0x8b rcx 0x2 rax 0x8a r8 0xffffffff81a0be34 kprintf+0x144 r9 0x1 r10 0x655cb4a233f94fc1 r11 0xe7d94c050c39c731 r12 0xffffffff8280aa00 cpu_info_full_primary+0x2a00 r13 0 r14 0 r15 0x1 rip 0xffffffff81e3e908 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002129f010 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=174895 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=79, nice=20 forw=0xffffffffffffffff, list=0xffff8000211d9a40,0xffffffff82913618 process=0xffff8000ffff9d58 user=0xffff80002129a000, vmspace=0xfffffd807f0085c0 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 69919 259967 29074 0 2 0 syz-executor.1 *69919 174895 29074 0 7 0x4000000 syz-executor.1 84706 190348 0 0 3 0x14200 bored sosplice 29074 468717 51659 0 7 0x2 syz-executor.1 10118 134899 51659 0 2 0x482 syz-executor.0 51659 152724 73268 0 3 0x82 kqread syz-fuzzer 51659 93128 73268 0 2 0x4000482 syz-fuzzer 51659 149753 73268 0 3 0x4000082 thrsleep syz-fuzzer 51659 81755 73268 0 3 0x4000082 thrsleep syz-fuzzer 51659 319264 73268 0 3 0x4000082 thrsleep syz-fuzzer 51659 374223 73268 0 3 0x4000082 thrsleep syz-fuzzer 51659 447766 73268 0 3 0x4000082 thrsleep syz-fuzzer 51659 75990 73268 0 3 0x4000082 thrsleep syz-fuzzer 73268 204937 63472 0 3 0x10008a sigsusp ksh 63472 319422 59436 0 3 0x9a select sshd 51350 24687 1 0 3 0x100083 ttyin getty 59436 224811 1 0 3 0x88 select sshd 71160 246553 4626 74 3 0x100092 bpf pflogd 4626 355296 1 0 3 0x80 netio pflogd 76498 35253 11663 73 2 0x100090 syslogd 11663 360956 1 0 3 0x100082 netio syslogd 69797 385770 1 0 3 0x100080 kqread resolvd 54147 238575 49295 77 3 0x100092 kqread dhcpleased 48350 415291 49295 77 3 0x100092 kqread dhcpleased 49295 159374 1 0 3 0x80 kqread dhcpleased 84919 18109 0 0 3 0x14200 bored smr 40584 412001 0 0 3 0x14200 pgzero zerothread 6654 198854 0 0 3 0x14200 aiodoned aiodoned 43770 486814 0 0 3 0x14200 syncer update 30375 262216 0 0 3 0x14200 cleaner cleaner 89617 350866 0 0 3 0x14200 reaper reaper 81583 112120 0 0 3 0x14200 pgdaemon pagedaemon 68677 204374 0 0 3 0x14200 bored crynlk 91403 267818 0 0 3 0x14200 bored crypto 93812 360 0 0 3 0x14200 bored viomb 55981 124605 0 0 3 0x40014200 acpi0 acpi0 78115 522892 0 0 3 0x40014200 idle1 53417 341873 0 0 3 0x14200 bored softnet 56919 511657 0 0 3 0x14200 bored systqmp 77384 132566 0 0 3 0x14200 bored systq 88906 144763 0 0 3 0x40014200 bored softclock 61540 51527 0 0 3 0x40014200 idle0 1 64035 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 69919 (syz-executor.1) thread 0xffff8000211d9ce0 (174895) 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 Process 29074 (syz-executor.1) thread 0xffff8000ffff67f0 (468717) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82838c20) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 __mp_acquire_count+0x4c sys/kern/kern_lock.c:227 #2 mi_switch+0x3d3 sys/kern/sched_bsd.c:433 #3 sleep_finish+0x1b2 sys/kern/kern_synch.c:433 #4 tsleep+0x125 sys/kern/kern_synch.c:158 #5 sys_nanosleep+0x1f5 sys/kern/kern_time.c:299 #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 10131 6432K 7002K 78643K 11794 0 pcb 13 8K 8K 78643K 22 0 rtable 109 3K 4K 78643K 208 0 ifaddr 49 11K 11K 78643K 83 0 counters 44 34K 34K 78643K 60 0 ioctlops 1 2K 4K 78643K 1498 0 iov 0 0K 12K 78643K 12 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 6 0 vnodes 1222 77K 77K 78643K 1440 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 3 5K 5K 78643K 4 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 85 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 5 13K 25K 78643K 885 0 sigio 0 0K 0K 78643K 15 0 proc 77 87K 100K 78643K 387 0 subproc 32 2K 2K 78643K 34 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 37 0 in_multi 33 2K 2K 78643K 52 0 ether_multi 1 0K 0K 78643K 5 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 55 254K 254K 78643K 55 0 exec 0 0K 2K 78643K 421 0 pfkey data 0 0K 0K 78643K 5 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 245 31K 31K 78643K 12337 0 UVM aobj 4 2K 2K 78643K 6 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 26 0 NDP 7 0K 0K 78643K 19 0 temp 111 4206K 4270K 78643K 5071 0 kqueue 10 14K 18K 78643K 28 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 51 0 48 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 175 0 160 1 0 1 1 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1412 0 1412 2 2 0 2 0 8 0 tcpcb 736 90 0 86 3 2 1 2 0 8 0 arp 120 6 0 0 1 0 1 1 0 8 0 inpcb 304 189 0 182 2 1 1 2 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pkpcb 40 20 0 20 2 1 1 1 0 8 1 kcovpl 48 2 0 0 1 0 1 1 0 8 0 ppxss 1248 4 0 4 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 pfstitem 24 14 0 5 1 0 1 1 0 8 0 pfstkey 112 14 0 5 1 0 1 1 0 8 0 pfstate 320 14 0 5 2 0 2 2 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 189 0 0 12 0 12 12 0 8 0 art_table 32 190 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 15 0 7 1 0 1 1 0 8 0 semupl 112 7 0 7 1 1 0 1 0 8 0 semapl 112 83 0 73 1 0 1 1 0 8 0 shmpl 112 3 0 2 2 1 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2506 0 1099 89 0 89 89 0 8 0 ffsino 272 2506 0 1099 95 0 95 95 0 8 0 nchpl 144 3719 0 2098 61 0 61 61 0 8 0 uvmvnodes 72 2687 0 0 49 0 49 49 0 8 0 vnodes 224 2687 0 0 159 0 159 159 0 8 0 namei 1024 9389 0 9389 2 1 1 1 0 8 1 percpumem 16 42 0 8 1 0 1 1 0 8 0 vmpool 560 1 0 0 1 0 1 1 0 8 0 scxspl 216 10710 0 10710 9 8 1 8 0 8 1 plimitpl 152 32 0 23 1 0 1 1 0 8 0 sigapl 424 1136 0 1101 5 0 5 5 0 8 0 futexpl 56 5309 0 5309 1 0 1 1 0 8 1 knotepl 112 48 0 0 2 0 2 2 0 8 0 kqueuepl 216 517 0 511 2 1 1 2 0 8 0 pipepl 336 103 0 93 3 2 1 2 0 8 0 fdescpl 496 1119 0 1101 3 0 3 3 0 8 0 filepl 152 3558 0 3445 6 1 5 6 0 8 0 lockfpl 104 69 0 67 1 0 1 1 0 8 0 lockfspl 48 24 0 22 1 0 1 1 0 8 0 sessionpl 144 18 0 7 1 0 1 1 0 8 0 pgrppl 48 22 0 11 1 0 1 1 0 8 0 ucredpl 96 357 0 344 1 0 1 1 0 8 0 zombiepl 144 1101 0 1100 2 1 1 1 0 8 0 processpl 1072 1136 0 1100 3 0 3 3 0 8 0 procpl 672 2179 0 2135 6 2 4 5 0 8 0 sosppl 168 13 0 13 2 2 0 1 0 8 0 sockpl 480 435 0 410 5 1 4 5 0 8 0 mcl64k 65536 5 0 0 1 0 1 1 0 8 0 mcl16k 16384 6 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 8 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 246 0 0 30 0 30 30 0 8 0 mtagpl 96 51 0 0 2 0 2 2 0 8 0 mbufpl 256 473 0 0 30 2 28 28 0 8 0 bufpl 280 4358 0 134 302 0 302 302 0 8 0 anonpl 24 273018 0 253361 124 3 121 121 0 186 0 amapchunkpl 152 28812 0 28173 28 1 27 27 0 158 0 amappl16 200 2253 0 1538 38 0 38 38 0 8 0 amappl15 192 3 0 3 1 1 0 1 0 8 0 amappl14 184 3 0 2 1 0 1 1 0 8 0 amappl13 176 77 0 75 1 0 1 1 0 8 0 amappl12 168 15 0 12 1 0 1 1 0 8 0 amappl11 160 103 0 88 1 0 1 1 0 8 0 amappl10 152 516 0 508 1 0 1 1 0 8 0 amappl9 144 660 0 655 1 0 1 1 0 8 0 amappl8 136 394 0 349 2 0 2 2 0 8 0 amappl7 128 72 0 57 1 0 1 1 0 8 0 amappl6 120 544 0 532 1 0 1 1 0 8 0 amappl5 112 1498 0 1476 1 0 1 1 0 8 0 amappl4 104 639 0 611 1 0 1 1 0 8 0 amappl3 96 77 0 73 1 0 1 1 0 8 0 amappl2 88 483 0 429 2 0 2 2 0 8 0 amappl1 80 21991 0 21549 13 3 10 13 0 8 0 amappl 88 11982 0 11807 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 5 0 2 1 0 1 1 0 8 0 uaddrrnd 24 1120 0 1101 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1120 0 1101 1 0 1 1 0 8 0 vmmpekpl 168 10042 0 10013 2 0 2 2 0 8 0 vmmpepl 168 124190 0 122113 116 20 96 116 0 357 0 vmsppl 368 1119 0 1101 2 0 2 2 0 8 0 rwobjpl 56 24215 0 22716 23 1 22 22 0 8 0 pdppl 4096 2248 0 2202 68 22 46 50 0 8 0 pvpl 32 665796 0 642703 198 2 196 198 0 265 5 pmappl 224 1119 0 1101 2 0 2 2 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 347 0 32 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(fffffd807f008e60) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff800021217a40,ffff8000211d9ce0) at vm_impl_init_vmx+0x159 vm_create(ffff800000b73000,ffff8000211d9ce0) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b73000,ffff8000211d9ce0) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b73000,1,ffff8000211d9ce0) at vmmioctl+0x1f2 VOP_IOCTL(fffffd806e31c590,c5005601,ffff800000b73000,1,fffffd807f7d8360,ffff8000211d9ce0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd8066d027d8,c5005601,ffff800000b73000,ffff8000211d9ce0) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000211d9ce0,ffff80002129f528,ffff80002129f570) at sys_ioctl+0x4a2 syscall(ffff80002129f5f0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff80002129f5f0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb2792637dc0, 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 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc syscall(ffff8000212a71d0) at syscall+0x42d mi_syscall sys/sys/syscall_mi.h:93 [inline] syscall(ffff8000212a71d0) at syscall+0x42d sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd83a0, count: 9 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 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc syscall(ffff8000212a71d0) at syscall+0x42d mi_syscall sys/sys/syscall_mi.h:93 [inline] syscall(ffff8000212a71d0) at syscall+0x42d sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd83a0, count: -6