panic: amap_pp_adjref: negative reference count Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 54746 36835 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 amap_pp_adjref(fffffd802bfe2198,7f0,200,1) at amap_pp_adjref+0x59e sys/uvm/uvm_amap.c:829 uvm_mapent_clone(ffff800000aa8b00,0,200000,7f0000,7,7) at uvm_mapent_clone+0x14c sys/uvm/uvm_map.c:3733 uvm_share(ffff800000aa8b00,0,7,fffffd803f014220,20800000,200000) at uvm_share+0x4b4 uvm_mapent_share sys/uvm/uvm_map.c:3767 [inline] uvm_share(ffff800000aa8b00,0,7,fffffd803f014220,20800000,200000) at uvm_share+0x4b4 sys/uvm/uvm_map.c:3668 vm_impl_init_vmx(ffff8000187a2e48,ffff8000ffff2ee8) at vm_impl_init_vmx+0xf1 sys/arch/amd64/amd64/vmm.c:1270 vm_create(ffff800000a41800,ffff8000ffff2ee8) at vm_create+0x193 vm_impl_init sys/arch/amd64/amd64/vmm.c:1385 [inline] vm_create(ffff800000a41800,ffff8000ffff2ee8) at vm_create+0x193 sys/arch/amd64/amd64/vmm.c:1174 VOP_IOCTL(fffffd8037cb8a90,c5005601,ffff800000a41800,1,fffffd803f7c6ae0,ffff8000ffff2ee8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:291 vn_ioctl(fffffd8037564690,c5005601,ffff800000a41800,ffff8000ffff2ee8) at vn_ioctl+0xb7 sys/kern/vfs_vnops.c:533 sys_ioctl(ffff8000ffff2ee8,ffff800017b4edd8,ffff800017b4ee20) at sys_ioctl+0x5b9 syscall(ffff800017b4eea0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,ffffffffffffff59,0,3,f1d695ab010) at Xsyscall+0x128 end of kernel end trace frame: 0xf1f99d501e0, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic amap_pp_adjref: negative reference count ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 amap_pp_adjref(fffffd802bfe2198,7f0,200,1) at amap_pp_adjref+0x59e sys/uvm/uvm_amap.c:829 uvm_mapent_clone(ffff800000aa8b00,0,200000,7f0000,7,7) at uvm_mapent_clone+0x14c sys/uvm/uvm_map.c:3733 uvm_share(ffff800000aa8b00,0,7,fffffd803f014220,20800000,200000) at uvm_share+0x4b4 uvm_mapent_share sys/uvm/uvm_map.c:3767 [inline] uvm_share(ffff800000aa8b00,0,7,fffffd803f014220,20800000,200000) at uvm_share+0x4b4 sys/uvm/uvm_map.c:3668 vm_impl_init_vmx(ffff8000187a2e48,ffff8000ffff2ee8) at vm_impl_init_vmx+0xf1 sys/arch/amd64/amd64/vmm.c:1270 vm_create(ffff800000a41800,ffff8000ffff2ee8) at vm_create+0x193 vm_impl_init sys/arch/amd64/amd64/vmm.c:1385 [inline] vm_create(ffff800000a41800,ffff8000ffff2ee8) at vm_create+0x193 sys/arch/amd64/amd64/vmm.c:1174 VOP_IOCTL(fffffd8037cb8a90,c5005601,ffff800000a41800,1,fffffd803f7c6ae0,ffff8000ffff2ee8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:291 vn_ioctl(fffffd8037564690,c5005601,ffff800000a41800,ffff8000ffff2ee8) at vn_ioctl+0xb7 sys/kern/vfs_vnops.c:533 sys_ioctl(ffff8000ffff2ee8,ffff800017b4edd8,ffff800017b4ee20) at sys_ioctl+0x5b9 syscall(ffff800017b4eea0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,ffffffffffffff59,0,3,f1d695ab010) at Xsyscall+0x128 end of kernel end trace frame: 0xf1f99d501e0, count: -12 ddb> show registers rdi 0 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800017b4e730 rbx 0xffff800017b4e7e0 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff800018584000 rax 0xffff800000ab6c40 r8 0xffff800017b4e6f0 r9 0x1 r10 0xffff800000ab6c40 r11 0x5d9a47210d1f781b r12 0x3000000008 r13 0xffff800017b4e740 r14 0x100 r15 0x1 rip 0xffffffff81bf1b48 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800017b4e720 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=54746 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3b40,0xffffffff8259b480 process=0xffff8000ffff77b0 user=0xffff800017b49000, vmspace=0xfffffd803f014220 estcpu=36, cpticks=76, pctcpu=20.28 user=0, sys=11410, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 36835 25275 72684 0 2 0 syz-executor.0 *36835 54746 72684 0 7 0x4000000 syz-executor.0 80051 183042 56526 0 2 0 syz-executor.1 80051 126227 56526 0 2 0x4000480 syz-executor.1 72684 36850 92256 0 2 0x482 syz-executor.0 56526 278023 92256 0 2 0x482 syz-executor.1 50898 420959 0 0 3 0x14200 bored sosplice 92256 261139 37160 0 3 0x82 thrsleep syz-fuzzer 92256 1049 37160 0 2 0x4000482 syz-fuzzer 92256 310173 37160 0 3 0x4000082 kqread syz-fuzzer 92256 45654 37160 0 3 0x4000082 thrsleep syz-fuzzer 92256 53190 37160 0 3 0x4000082 thrsleep syz-fuzzer 92256 147284 37160 0 3 0x4000082 thrsleep syz-fuzzer 92256 144540 37160 0 3 0x4000082 thrsleep syz-fuzzer 92256 28388 37160 0 2 0x4000482 syz-fuzzer 37160 489649 36474 0 3 0x10008a pause ksh 36474 365209 41814 0 3 0x92 select sshd 73638 28773 1 0 3 0x100083 ttyin getty 41814 311137 1 0 3 0x80 select sshd 1625 218399 50810 73 2 0x100490 syslogd 50810 19769 1 0 3 0x100082 netio syslogd 34266 279808 0 0 2 0x14200 zerothread 70886 208232 0 0 3 0x14200 aiodoned aiodoned 25726 60927 0 0 2 0x14200 update 50958 435928 0 0 3 0x14200 cleaner cleaner 93101 313911 0 0 3 0x14200 reaper reaper 59466 501447 0 0 3 0x14200 pgdaemon pagedaemon 99860 109493 0 0 3 0x14200 bored crynlk 29429 414097 0 0 3 0x14200 bored crypto 2149 219271 0 0 3 0x40014200 acpi0 acpi0 8640 251035 0 0 2 0x14200 softnet 41171 421477 0 0 2 0x14200 systqmp 1137 269090 0 0 3 0x14200 bored systq 22653 435487 0 0 2 0x40014200 softclock 44337 393282 0 0 3 0x40014200 idle0 23612 480340 0 0 2 0x14200 smr 1 239358 0 0 3 0x82 wait init 0 0 -1 0 2 0x10200 swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9547 7141K 8098K 78643K 13886 0 0 pcb 13 10K 12K 78643K 359 0 0 rtable 96 11K 12K 78643K 686 0 0 ifaddr 137 18K 19K 78643K 313 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 1 2K 2K 78643K 107 0 0 iov 0 0K 32K 78643K 409 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1222 77K 77K 78643K 2404 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 17 0 0 VM map 27 6K 6K 78643K 35 0 0 sem 12 0K 1K 78643K 363 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 6 17K 25K 78643K 1276 0 0 sigio 0 0K 0K 78643K 22 0 0 proc 43 30K 63K 78643K 666 0 0 subproc 32 2K 2K 78643K 119 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 127 0 0 in_multi 22 1K 2K 78643K 150 0 0 ether_multi 1 0K 0K 78643K 10 0 0 mrt 1 0K 0K 78643K 10 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 392 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 144 198K 198K 78643K 4125 0 0 UVM aobj 118 3K 3K 78643K 127 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 337 0 0 NDP 19 0K 0K 78643K 80 0 0 temp 162 3535K 4175K 78643K 22650 0 0 kqueue 0 0K 0K 78643K 23 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 38 0 34 1 0 1 1 0 8 0 rtpcb 80 155 0 155 3 2 1 1 0 8 1 rtentry 112 188 0 156 2 0 2 2 0 8 0 unpcb 120 731 0 723 1 0 1 1 0 8 0 syncache 264 12 0 12 5 5 0 1 0 8 0 tcpqe 32 241 0 241 3 3 0 1 0 8 0 tcpcb 544 725 0 721 16 14 2 14 0 8 1 ipq 40 17 0 17 5 4 1 1 0 8 1 ipqe 40 299 0 299 5 4 1 1 0 8 1 inpcb 280 1820 0 1816 15 13 2 8 0 8 1 rttmr 72 3 0 3 2 2 0 1 0 8 0 nd6 48 19 0 17 2 1 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 ppxss 1128 22 0 22 6 5 1 1 0 8 1 art_heap8 4096 10 0 9 7 6 1 3 0 8 0 art_heap4 256 738 0 566 21 6 15 15 0 8 1 art_table 32 748 0 575 2 0 2 2 0 8 0 art_node 16 187 0 158 1 0 1 1 0 8 0 sysvmsgpl 40 67 0 35 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 361 0 351 1 0 1 1 0 8 0 shmpl 112 125 0 9 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3354 0 1956 46 0 46 46 0 8 0 ffsino 240 3354 0 1956 83 0 83 83 0 8 0 nchpl 144 6142 0 5695 60 40 20 60 0 8 0 uvmvnodes 72 4270 0 0 78 0 78 78 0 8 0 vnodes 208 4270 0 0 225 0 225 225 0 8 0 namei 1024 19394 0 19394 2 1 1 1 0 8 1 vcpupl 1984 24 0 0 3 0 3 3 0 8 0 vmpool 520 33 0 8 3 1 2 2 0 8 0 scxspl 192 19091 0 19091 17 16 1 7 0 8 1 plimitpl 152 126 0 120 1 0 1 1 0 8 0 sigapl 432 1431 0 1419 2 0 2 2 0 8 0 futexpl 56 37965 0 37965 2 1 1 1 0 8 1 knotepl 112 302 0 283 2 1 1 2 0 8 0 kqueuepl 104 466 0 462 4 3 1 4 0 8 0 pipepl 128 958 0 939 4 2 2 2 0 8 1 fdescpl 424 1432 0 1419 2 0 2 2 0 8 0 filepl 120 13302 0 13215 12 8 4 10 0 8 1 lockfpl 104 574 0 574 1 0 1 1 0 8 1 lockfspl 48 187 0 187 1 0 1 1 0 8 1 sessionpl 112 22 0 14 1 0 1 1 0 8 0 pgrppl 48 35 0 27 1 0 1 1 0 8 0 ucredpl 96 1683 0 1677 1 0 1 1 0 8 0 zombiepl 144 1419 0 1419 1 0 1 1 0 8 1 processpl 864 1447 0 1419 4 0 4 4 0 8 0 procpl 632 3059 0 3022 4 0 4 4 0 8 0 sosppl 128 18 0 18 5 4 1 1 0 8 1 sockpl 384 2723 0 2711 18 14 4 13 0 8 1 mcl64k 65536 879 0 879 51 44 7 33 0 8 7 mcl16k 16384 23 0 23 9 8 1 1 0 8 1 mcl12k 12288 34 0 34 6 5 1 1 0 8 1 mcl9k 9216 21 0 21 6 5 1 1 0 8 1 mcl8k 8192 68 0 68 4 3 1 1 0 8 1 mcl4k 4096 159 0 159 3 2 1 1 0 8 1 mcl2k2 2112 13 0 13 5 5 0 1 0 8 0 mcl2k 2048 70413 0 70370 17 11 6 13 0 8 0 mtagpl 80 61 0 47 3 2 1 1 0 8 0 mbufpl 256 122358 0 122238 78 59 19 26 0 8 9 bufpl 256 12964 0 6633 396 0 396 396 0 8 0 anonpl 16 221480 0 200323 137 35 102 103 0 62 15 amapchunkpl 152 8947 0 8780 45 18 27 31 0 158 20 amappl16 192 9893 0 8706 119 51 68 72 0 8 7 amappl15 184 652 0 651 1 0 1 1 0 8 0 amappl14 176 75 0 70 1 0 1 1 0 8 0 amappl13 168 22 0 21 1 0 1 1 0 8 0 amappl12 160 128 0 120 1 0 1 1 0 8 0 amappl11 152 542 0 536 1 0 1 1 0 8 0 amappl10 144 187 0 185 1 0 1 1 0 8 0 amappl9 136 630 0 627 1 0 1 1 0 8 0 amappl8 128 222 0 181 2 0 2 2 0 8 0 amappl7 120 243 0 238 1 0 1 1 0 8 0 amappl6 112 530 0 515 1 0 1 1 0 8 0 amappl5 104 315 0 304 1 0 1 1 0 8 0 amappl4 96 1578 0 1554 1 0 1 1 0 8 0 amappl3 88 279 0 273 1 0 1 1 0 8 0 amappl2 80 10769 0 10701 3 1 2 3 0 8 0 amappl1 72 35387 0 34989 26 16 10 20 0 8 0 amappl 80 3427 0 3373 2 0 2 2 0 84 0 dma4096 4096 1 0 1 1 1 0 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 17 0 17 1 1 0 1 0 8 0 aobjpl 64 126 0 9 2 0 2 2 0 8 0 uaddrrnd 24 1465 0 1419 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1465 0 1419 1 0 1 1 0 8 0 vmmpekpl 168 13146 0 13113 2 0 2 2 0 8 0 vmmpepl 168 182093 0 179707 234 99 135 144 0 357 28 vmsppl 272 1431 0 1419 2 1 1 2 0 8 0 pdppl 4096 2936 0 2878 9 1 8 8 0 8 0 pvpl 32 565924 0 542698 373 57 316 316 0 265 128 pmappl 200 1464 0 1427 2 0 2 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 703 0 158 16 0 16 16 0 8 0