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 126741 53079 0 0x1000 0x2000 1 syz-executor.0 *476331 78387 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(fffffd807f008000) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff800021250af0,ffff8000211937a8) at vm_impl_init_vmx+0x159 vm_create(ffff800000b75800,ffff8000211937a8) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b75800,ffff8000211937a8) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b75800,1,ffff8000211937a8) at vmmioctl+0x1f2 VOP_IOCTL(fffffd8073294670,c5005601,ffff800000b75800,1,fffffd807f7d8660,ffff8000211937a8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd8064c1ead0,c5005601,ffff800000b75800,ffff8000211937a8) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000211937a8,ffff8000222bd7f8,ffff8000222bd840) at sys_ioctl+0x4a2 syscall(ffff8000222bd8c0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000222bd8c0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4f2b1a59f30, 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(fffffd807f008000) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff800021250af0,ffff8000211937a8) at vm_impl_init_vmx+0x159 vm_create(ffff800000b75800,ffff8000211937a8) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b75800,ffff8000211937a8) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b75800,1,ffff8000211937a8) at vmmioctl+0x1f2 VOP_IOCTL(fffffd8073294670,c5005601,ffff800000b75800,1,fffffd807f7d8660,ffff8000211937a8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd8064c1ead0,c5005601,ffff800000b75800,ffff8000211937a8) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000211937a8,ffff8000222bd7f8,ffff8000222bd840) at sys_ioctl+0x4a2 syscall(ffff8000222bd8c0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000222bd8c0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4f2b1a59f30, count: -12 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff8000222bd2f0 rbx 0xffffffff8280abff cpu_info_full_primary+0x2bff rdx 0x8b rcx 0x2 rax 0x8a r8 0xffffffff81a0be34 kprintf+0x144 r9 0x1 r10 0x22654915f2c347d2 r11 0x4a0251b9228825a5 r12 0xffffffff8280aa00 cpu_info_full_primary+0x2a00 r13 0 r14 0 r15 0x1 rip 0xffffffff81e3e908 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000222bd2e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=476331 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff6550,0xffffffff82913618 process=0xffff8000ffff9d58 user=0xffff8000222b8000, vmspace=0xfffffd807365d5c8 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 53079 126741 18943 0 7 0x3000 syz-executor.0 78387 301451 34737 0 2 0 syz-executor.1 *78387 476331 34737 0 7 0x4000000 syz-executor.1 34737 12390 99335 0 3 0x82 nanoslp syz-executor.1 18943 232195 99335 0 2 0x482 syz-executor.0 99335 218279 78414 0 3 0x82 thrsleep syz-fuzzer 99335 484749 78414 0 3 0x4000082 thrsleep syz-fuzzer 99335 262149 78414 0 3 0x4000082 thrsleep syz-fuzzer 99335 156410 78414 0 3 0x4000082 thrsleep syz-fuzzer 99335 463249 78414 0 3 0x4000082 thrsleep syz-fuzzer 99335 368621 78414 0 3 0x4000082 thrsleep syz-fuzzer 99335 517631 78414 0 3 0x4000082 thrsleep syz-fuzzer 99335 49395 78414 0 3 0x4000082 kqread syz-fuzzer 78414 368156 93922 0 3 0x10008a sigsusp ksh 93922 504090 18485 0 3 0x9a select sshd 33087 298352 1 0 3 0x100083 ttyin getty 18485 423578 1 0 3 0x88 select sshd 11270 424803 76215 74 3 0x100092 bpf pflogd 76215 251959 1 0 3 0x80 netio pflogd 6760 376064 88019 73 3 0x100090 kqread syslogd 88019 458816 1 0 3 0x100082 netio syslogd 18390 464293 1 0 3 0x100080 kqread resolvd 36190 275025 21914 77 3 0x100092 kqread dhcpleased 32731 175026 21914 77 3 0x100092 kqread dhcpleased 21914 154749 1 0 3 0x80 kqread dhcpleased 64814 342894 0 0 3 0x14200 bored smr 72991 268084 0 0 2 0x14200 zerothread 10391 445086 0 0 3 0x14200 aiodoned aiodoned 86282 421329 0 0 3 0x14200 syncer update 34417 167034 0 0 3 0x14200 cleaner cleaner 9937 155948 0 0 2 0x14200 reaper 84007 140764 0 0 3 0x14200 pgdaemon pagedaemon 58255 399799 0 0 3 0x14200 bored crynlk 38698 259072 0 0 3 0x14200 bored crypto 70541 229803 0 0 3 0x14200 bored viomb 27215 94325 0 0 3 0x40014200 acpi0 acpi0 66006 516351 0 0 3 0x40014200 idle1 95183 205605 0 0 3 0x14200 bored softnet 74283 27484 0 0 3 0x14200 bored systqmp 99351 362010 0 0 3 0x14200 bored systq 58088 15693 0 0 3 0x40014200 bored softclock 65919 35398 0 0 3 0x40014200 idle0 1 49645 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 78387 (syz-executor.1) thread 0xffff8000211937a8 (476331) 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 6554K 78643K 11278 0 pcb 13 8K 8K 78643K 19 0 rtable 106 3K 3K 78643K 172 0 ifaddr 49 11K 11K 78643K 50 0 counters 44 34K 34K 78643K 44 0 ioctlops 1 2K 4K 78643K 1492 0 iov 0 0K 2K 78643K 2 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 6 0 vnodes 1219 77K 77K 78643K 1261 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 4 0K 0K 78643K 4 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 6 17K 25K 78643K 219 0 proc 67 87K 111K 78643K 340 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 4 0 in_multi 33 2K 2K 78643K 33 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 43 201K 201K 78643K 43 0 exec 0 0K 2K 78643K 404 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 243 44K 44K 78643K 4362 0 UVM aobj 3 2K 2K 78643K 3 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 7 0K 0K 78643K 11 0 temp 97 4202K 4266K 78643K 2788 0 kqueue 10 14K 16K 78643K 11 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 23 0 20 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 43 0 28 1 0 1 1 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 328 0 328 2 2 0 2 0 8 0 tcpcb 736 12 0 8 1 0 1 1 0 8 0 arp 120 6 0 0 1 0 1 1 0 8 0 inpcb 304 55 0 48 1 0 1 1 0 8 0 nd6 48 6 0 0 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 11 0 3 1 0 1 1 0 8 0 pfstkey 112 11 0 3 1 0 1 1 0 8 0 pfstate 320 11 0 3 1 0 1 1 0 8 0 pfrule 1360 25 0 20 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 188 0 0 12 0 12 12 0 8 0 art_table 32 189 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 5 1 0 1 1 0 8 1 semapl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1650 0 239 89 0 89 89 0 8 0 ffsino 272 1650 0 239 95 0 95 95 0 8 0 nchpl 144 2062 0 442 61 0 61 61 0 8 0 uvmvnodes 72 1718 0 0 32 0 32 32 0 8 0 vnodes 224 1718 0 0 102 0 102 102 0 8 0 namei 1024 5594 0 5594 2 1 1 1 0 8 1 percpumem 16 34 0 0 1 0 1 1 0 8 0 vcpupl 2048 2 0 0 1 0 1 1 0 8 0 vmpool 560 3 0 0 1 0 1 1 0 8 0 scxspl 216 6068 0 6068 9 2 7 8 0 8 7 plimitpl 152 17 0 8 1 0 1 1 0 8 0 sigapl 424 469 0 434 5 0 5 5 0 8 0 futexpl 56 1199 0 1199 1 0 1 1 0 8 1 knotepl 112 54 0 0 2 0 2 2 0 8 0 kqueuepl 216 187 0 180 1 0 1 1 0 8 0 pipepl 336 82 0 72 1 0 1 1 0 8 0 fdescpl 496 453 0 434 3 0 3 3 0 8 0 filepl 152 1739 0 1625 5 0 5 5 0 8 0 lockfpl 104 26 0 24 1 0 1 1 0 8 0 lockfspl 48 8 0 6 1 0 1 1 0 8 0 sessionpl 144 18 0 7 1 0 1 1 0 8 0 pgrppl 48 18 0 7 1 0 1 1 0 8 0 ucredpl 96 124 0 112 1 0 1 1 0 8 0 zombiepl 144 435 0 434 2 1 1 1 0 8 0 processpl 1072 469 0 434 3 0 3 3 0 8 0 procpl 672 729 0 685 4 0 4 4 0 8 0 sockpl 480 121 0 96 4 0 4 4 0 8 0 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 7 0 0 1 0 1 1 0 8 0 mcl4k 4096 6 0 0 1 0 1 1 0 8 0 mcl2k 2048 339 0 0 43 0 43 43 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 387 0 0 24 0 24 24 0 8 0 bufpl 280 3620 0 136 249 0 249 249 0 8 0 anonpl 24 105374 0 83232 136 2 134 134 0 186 0 amapchunkpl 152 9741 0 9039 30 1 29 29 0 158 0 amappl16 200 1208 0 388 44 0 44 44 0 8 0 amappl14 184 86 0 83 1 0 1 1 0 8 0 amappl13 176 31 0 29 1 0 1 1 0 8 0 amappl12 168 115 0 112 1 0 1 1 0 8 0 amappl11 160 52 0 38 1 0 1 1 0 8 0 amappl10 152 38 0 30 1 0 1 1 0 8 0 amappl9 144 256 0 250 1 0 1 1 0 8 0 amappl8 136 378 0 340 2 0 2 2 0 8 0 amappl7 128 74 0 58 1 0 1 1 0 8 0 amappl6 120 124 0 112 1 0 1 1 0 8 0 amappl5 112 338 0 318 1 0 1 1 0 8 0 amappl4 104 578 0 550 1 0 1 1 0 8 0 amappl3 96 166 0 161 1 0 1 1 0 8 0 amappl2 88 468 0 415 2 0 2 2 0 8 0 amappl1 80 11140 0 10688 13 3 10 13 0 8 0 amappl 88 4036 0 3853 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 456 0 434 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 456 0 434 1 0 1 1 0 8 0 vmmpekpl 168 7469 0 7441 3 1 2 2 0 8 0 vmmpepl 168 49454 0 47186 126 8 118 126 0 357 19 vmsppl 368 455 0 434 2 0 2 2 0 8 0 rwobjpl 56 12105 0 10500 25 2 23 24 0 8 0 pdppl 4096 920 0 870 70 20 50 50 0 8 0 pvpl 32 296733 0 270915 212 2 210 210 0 265 1 pmappl 224 455 0 434 2 0 2 2 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 352 0 24 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(fffffd807f008000) at uvmspace_free+0xe4 sys/uvm/uvm_map.c:3641 vm_impl_init_vmx(ffff800021250af0,ffff8000211937a8) at vm_impl_init_vmx+0x159 vm_create(ffff800000b75800,ffff8000211937a8) at vm_create+0x19b vm_impl_init sys/arch/amd64/amd64/vmm.c:1690 [inline] vm_create(ffff800000b75800,ffff8000211937a8) at vm_create+0x19b sys/arch/amd64/amd64/vmm.c:1510 vmmioctl(a00,c5005601,ffff800000b75800,1,ffff8000211937a8) at vmmioctl+0x1f2 VOP_IOCTL(fffffd8073294670,c5005601,ffff800000b75800,1,fffffd807f7d8660,ffff8000211937a8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:295 vn_ioctl(fffffd8064c1ead0,c5005601,ffff800000b75800,ffff8000211937a8) at vn_ioctl+0xba sys/kern/vfs_vnops.c:531 sys_ioctl(ffff8000211937a8,ffff8000222bd7f8,ffff8000222bd840) at sys_ioctl+0x4a2 syscall(ffff8000222bd8c0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000222bd8c0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4f2b1a59f30, 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 __mp_lock(ffffffff82838a18) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82838a18) at __mp_lock+0x122 sys/kern/kern_lock.c:147 __mp_acquire_count(ffffffff82838a18,1) at __mp_acquire_count+0x4c sys/kern/kern_lock.c:227 mi_switch() at mi_switch+0x3d3 sys/kern/sched_bsd.c:433 sleep_finish(ffff8000222b74c8,1) at sleep_finish+0x1b2 sys/kern/kern_synch.c:433 single_thread_set(ffff8000ffff6550,2,1) at single_thread_set+0x396 single_thread_wait sys/kern/kern_sig.c:2113 [inline] single_thread_set(ffff8000ffff6550,2,1) at single_thread_set+0x396 sys/kern/kern_sig.c:2093 exit1(ffff8000ffff6550,0,0,1) at exit1+0x95 sys/kern/kern_exit.c:139 sys_exit(ffff8000ffff6550,ffff8000222b75f0,ffff8000222b7640) at sys_exit+0x16 sys/kern/kern_exit.c:95 syscall(ffff8000222b76c0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000222b76c0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff8460, count: 3 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 __mp_lock(ffffffff82838a18) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82838a18) at __mp_lock+0x122 sys/kern/kern_lock.c:147 __mp_acquire_count(ffffffff82838a18,1) at __mp_acquire_count+0x4c sys/kern/kern_lock.c:227 mi_switch() at mi_switch+0x3d3 sys/kern/sched_bsd.c:433 sleep_finish(ffff8000222b74c8,1) at sleep_finish+0x1b2 sys/kern/kern_synch.c:433 single_thread_set(ffff8000ffff6550,2,1) at single_thread_set+0x396 single_thread_wait sys/kern/kern_sig.c:2113 [inline] single_thread_set(ffff8000ffff6550,2,1) at single_thread_set+0x396 sys/kern/kern_sig.c:2093 exit1(ffff8000ffff6550,0,0,1) at exit1+0x95 sys/kern/kern_exit.c:139 sys_exit(ffff8000ffff6550,ffff8000222b75f0,ffff8000222b7640) at sys_exit+0x16 sys/kern/kern_exit.c:95 syscall(ffff8000222b76c0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000222b76c0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff8460, count: -12