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 *457652 52427 0 0 0x4000000 0 syz-executor.1 490883 84202 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(fffffd807f0082e0) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff80002126b810,ffff8000212162a0) at vm_impl_init_vmx+0x159 vm_create(ffff800000b5b800,ffff8000212162a0) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b5b800,ffff8000212162a0) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b5b800,1,ffff8000212162a0) at vmmioctl+0x1f2 VOP_IOCTL(fffffd806e227830,c5005601,ffff800000b5b800,1,fffffd807f7d8840,ffff8000212162a0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd8067448610,c5005601,ffff800000b5b800,ffff8000212162a0) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000212162a0,ffff8000222a9c18,ffff8000222a9c60) at sys_ioctl+0x4a2 syscall(ffff8000222a9ce0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000222a9ce0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd68af6a83b0, 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(fffffd807f0082e0) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff80002126b810,ffff8000212162a0) at vm_impl_init_vmx+0x159 vm_create(ffff800000b5b800,ffff8000212162a0) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b5b800,ffff8000212162a0) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b5b800,1,ffff8000212162a0) at vmmioctl+0x1f2 VOP_IOCTL(fffffd806e227830,c5005601,ffff800000b5b800,1,fffffd807f7d8840,ffff8000212162a0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd8067448610,c5005601,ffff800000b5b800,ffff8000212162a0) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000212162a0,ffff8000222a9c18,ffff8000222a9c60) at sys_ioctl+0x4a2 syscall(ffff8000222a9ce0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000222a9ce0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd68af6a83b0, count: -12 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff8000222a9710 rbx 0xffffffff8280abff cpu_info_full_primary+0x2bff rdx 0x8b rcx 0x2 rax 0x8a r8 0xffffffff81a0be34 kprintf+0x144 r9 0x1 r10 0x4bc4a42d7bddc1cd r11 0x9cf5a322903c8275 r12 0xffffffff8280aa00 cpu_info_full_primary+0x2a00 r13 0 r14 0 r15 0x1 rip 0xffffffff81e3e908 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000222a9700 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=457652 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800021216540,0xffffffff82913618 process=0xffff8000ffffb678 user=0xffff8000222a4000, vmspace=0xfffffd807f008000 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 52427 356606 70627 0 2 0 syz-executor.1 *52427 457652 70627 0 7 0x4000000 syz-executor.1 84202 490883 74150 0 7 0 syz-executor.0 84202 207483 74150 0 2 0x4000000 syz-executor.0 54464 230149 0 0 3 0x14200 bored sosplice 70627 222575 43966 0 3 0x82 nanoslp syz-executor.1 74150 440695 43966 0 3 0x82 nanoslp syz-executor.0 43966 341055 86669 0 3 0x82 thrsleep syz-fuzzer 43966 259655 86669 0 3 0x4000082 thrsleep syz-fuzzer 43966 396830 86669 0 3 0x4000082 kqread syz-fuzzer 43966 10308 86669 0 3 0x4000082 thrsleep syz-fuzzer 43966 384384 86669 0 3 0x4000082 thrsleep syz-fuzzer 43966 243070 86669 0 3 0x4000082 thrsleep syz-fuzzer 43966 514761 86669 0 3 0x4000082 thrsleep syz-fuzzer 43966 292543 86669 0 3 0x4000082 thrsleep syz-fuzzer 86669 397620 50748 0 3 0x10008a sigsusp ksh 50748 230335 87560 0 3 0x9a select sshd 28423 98678 1 0 3 0x100083 ttyin getty 87560 66281 1 0 3 0x88 select sshd 82762 219937 53780 74 3 0x100092 bpf pflogd 53780 117446 1 0 3 0x80 netio pflogd 28236 169977 5039 73 3 0x100090 kqread syslogd 5039 203341 1 0 3 0x100082 netio syslogd 7837 399474 1 0 3 0x100080 kqread resolvd 51836 193948 1340 77 3 0x100092 kqread dhcpleased 14929 98872 1340 77 3 0x100092 kqread dhcpleased 1340 467709 1 0 3 0x80 kqread dhcpleased 26916 216811 0 0 3 0x14200 bored smr 47658 320918 0 0 2 0x14200 zerothread 80433 41146 0 0 3 0x14200 aiodoned aiodoned 95337 255111 0 0 3 0x14200 syncer update 27318 330145 0 0 3 0x14200 cleaner cleaner 31398 245321 0 0 3 0x14200 reaper reaper 56943 265212 0 0 3 0x14200 pgdaemon pagedaemon 37478 389927 0 0 3 0x14200 bored crynlk 31727 481487 0 0 3 0x14200 bored crypto 85007 316449 0 0 3 0x14200 bored viomb 91648 298034 0 0 3 0x40014200 acpi0 acpi0 92128 215100 0 0 3 0x40014200 idle1 15148 87229 0 0 3 0x14200 bored softnet 18326 304117 0 0 3 0x14200 bored systqmp 56311 263106 0 0 3 0x14200 bored systq 20435 372733 0 0 3 0x40014200 bored softclock 74251 407989 0 0 3 0x40014200 idle0 1 35074 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 52427 (syz-executor.1) thread 0xffff8000212162a0 (457652) 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 10128 6424K 6876K 78643K 12133 0 pcb 13 8K 8K 78643K 97 0 rtable 106 3K 3K 78643K 228 0 ifaddr 49 11K 11K 78643K 85 0 counters 44 34K 34K 78643K 52 0 ioctlops 1 2K 4K 78643K 1521 0 iov 0 0K 8K 78643K 22 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 6 0 vnodes 1221 77K 77K 78643K 1518 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 110 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 6 17K 25K 78643K 1315 0 proc 68 87K 111K 78643K 512 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 21 0 in_multi 33 2K 2K 78643K 93 0 ether_multi 1 0K 0K 78643K 1 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 525 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 194 25K 27K 78643K 17479 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 8 0 NDP 7 0K 0K 78643K 15 0 temp 110 4205K 4269K 78643K 5254 0 kqueue 10 14K 18K 78643K 35 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 53 0 50 1 0 1 1 0 8 0 rtentry 112 59 0 15 2 0 2 2 0 8 0 unpcb 120 167 0 152 1 0 1 1 0 8 0 syncache 296 37 0 37 2 2 0 1 0 8 0 tcpqe 32 33 0 33 2 2 0 1 0 8 0 tcpcb 736 216 0 211 5 3 2 3 0 8 0 arp 120 6 0 0 1 0 1 1 0 8 0 inpcb 304 607 0 599 3 2 1 2 0 8 0 nd6 48 20 0 14 1 0 1 1 0 8 0 kcovpl 48 2 0 0 1 0 1 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 17 0 10 1 0 1 1 0 8 0 pfstkey 112 17 0 10 1 0 1 1 0 8 0 pfstate 320 17 0 10 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 58 0 18 1 0 1 1 0 8 0 semupl 112 18 0 18 1 1 0 1 0 8 0 semapl 112 98 0 88 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2975 0 1564 89 0 89 89 0 8 0 ffsino 272 2975 0 1564 95 0 95 95 0 8 0 nchpl 144 4746 0 3126 61 0 61 61 0 8 0 uvmvnodes 72 3227 0 0 59 0 59 59 0 8 0 vnodes 224 3227 0 0 190 0 190 190 0 8 0 namei 1024 11584 0 11584 1 0 1 1 0 8 1 percpumem 16 38 0 4 1 0 1 1 0 8 0 vmpool 560 1 0 0 1 0 1 1 0 8 0 scxspl 216 13633 0 13633 11 8 3 8 0 8 3 plimitpl 152 22 0 13 1 0 1 1 0 8 0 sigapl 424 1566 0 1530 6 1 5 5 0 8 1 futexpl 56 8777 0 8777 1 0 1 1 0 8 1 knotepl 112 56 0 0 2 0 2 2 0 8 0 kqueuepl 216 700 0 694 1 0 1 1 0 8 0 pipepl 336 100 0 90 3 1 2 2 0 8 1 fdescpl 496 1549 0 1530 3 0 3 3 0 8 0 filepl 152 4751 0 4638 5 0 5 5 0 8 0 lockfpl 104 62 0 60 1 0 1 1 0 8 0 lockfspl 48 28 0 26 1 0 1 1 0 8 0 sessionpl 144 18 0 7 1 0 1 1 0 8 0 pgrppl 48 29 0 18 1 0 1 1 0 8 0 ucredpl 96 240 0 228 1 0 1 1 0 8 0 zombiepl 144 1530 0 1530 1 0 1 1 0 8 1 processpl 1072 1566 0 1530 3 0 3 3 0 8 0 procpl 672 3119 0 3074 5 1 4 5 0 8 0 sosppl 168 5 0 5 1 0 1 1 0 8 1 sockpl 480 838 0 812 5 1 4 5 0 8 0 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl16k 16384 8 0 0 1 0 1 1 0 8 0 mcl12k 12288 9 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 15 0 0 2 0 2 2 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 176 0 0 17 0 17 17 0 8 0 mtagpl 96 76 0 0 2 0 2 2 0 8 0 mbufpl 256 468 0 0 26 0 26 26 0 8 0 bufpl 280 5083 0 132 354 0 354 354 0 8 0 anonpl 24 379992 0 372904 53 3 50 50 0 186 6 amapchunkpl 152 41038 0 40622 24 5 19 19 0 158 3 amappl16 200 2673 0 2501 11 1 10 10 0 8 0 amappl14 184 621 0 619 1 0 1 1 0 8 0 amappl13 176 29 0 28 1 0 1 1 0 8 0 amappl12 168 15 0 15 1 1 0 1 0 8 0 amappl11 160 713 0 697 1 0 1 1 0 8 0 amappl10 152 47 0 37 1 0 1 1 0 8 0 amappl9 144 241 0 239 1 0 1 1 0 8 0 amappl8 136 372 0 334 2 0 2 2 0 8 0 amappl7 128 73 0 57 1 0 1 1 0 8 0 amappl6 120 129 0 116 1 0 1 1 0 8 0 amappl5 112 1455 0 1435 1 0 1 1 0 8 0 amappl4 104 1255 0 1227 1 0 1 1 0 8 0 amappl3 96 65 0 62 1 0 1 1 0 8 0 amappl2 88 478 0 422 2 0 2 2 0 8 0 amappl1 80 29752 0 29295 14 4 10 13 0 8 0 amappl 88 17081 0 16943 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 1550 0 1530 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1550 0 1530 1 0 1 1 0 8 0 vmmpekpl 168 11051 0 11019 2 0 2 2 0 8 0 vmmpepl 168 169454 0 167875 72 2 70 70 0 357 1 vmsppl 368 1549 0 1530 2 0 2 2 0 8 0 rwobjpl 56 31860 0 30940 15 1 14 14 0 8 0 pdppl 4096 3108 0 3060 64 16 48 50 0 8 0 pvpl 32 905719 0 895102 148 48 100 136 0 265 11 pmappl 224 1549 0 1530 2 0 2 2 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 328 0 23 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(fffffd807f0082e0) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff80002126b810,ffff8000212162a0) at vm_impl_init_vmx+0x159 vm_create(ffff800000b5b800,ffff8000212162a0) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b5b800,ffff8000212162a0) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b5b800,1,ffff8000212162a0) at vmmioctl+0x1f2 VOP_IOCTL(fffffd806e227830,c5005601,ffff800000b5b800,1,fffffd807f7d8840,ffff8000212162a0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd8067448610,c5005601,ffff800000b5b800,ffff8000212162a0) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000212162a0,ffff8000222a9c18,ffff8000222a9c60) at sys_ioctl+0x4a2 syscall(ffff8000222a9ce0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000222a9ce0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd68af6a83b0, 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 uvm_map_inentry(ffff800021217a40,ffff800021217aa0,7f7ffffee6d8,ffffffff82471d33,ffffffff823114d0,0) at uvm_map_inentry+0x15f sys/uvm/uvm_map.c:1905 syscall(ffff8000222932c0) at syscall+0x3cc mi_syscall sys/sys/syscall_mi.h:81 [inline] syscall(ffff8000222932c0) at syscall+0x3cc sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffee820, 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 uvm_map_inentry(ffff800021217a40,ffff800021217aa0,7f7ffffee6d8,ffffffff82471d33,ffffffff823114d0,0) at uvm_map_inentry+0x15f sys/uvm/uvm_map.c:1905 syscall(ffff8000222932c0) at syscall+0x3cc mi_syscall sys/sys/syscall_mi.h:81 [inline] syscall(ffff8000222932c0) at syscall+0x3cc sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffee820, count: -6