panic: amap_pp_adjref: negative reference count Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 66339 63911 0 0x10 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(fffffd803e85d5a8,e4,1df,1) at amap_pp_adjref+0x59e sys/uvm/uvm_amap.c:829 uvm_mapent_clone(ffff800000b49e00,0,1df000,e4000,7,7) at uvm_mapent_clone+0x14c sys/uvm/uvm_map.c:3733 uvm_share(ffff800000b49e00,0,7,fffffd803f012330,20800000,200000) at uvm_share+0x4b4 uvm_mapent_share sys/uvm/uvm_map.c:3767 [inline] uvm_share(ffff800000b49e00,0,7,fffffd803f012330,20800000,200000) at uvm_share+0x4b4 sys/uvm/uvm_map.c:3668 vm_impl_init_vmx(ffff800015966008,ffff8000ffff3b40) at vm_impl_init_vmx+0xf1 sys/arch/amd64/amd64/vmm.c:1270 vm_create(ffff800000ade800,ffff8000ffff3b40) at vm_create+0x193 vm_impl_init sys/arch/amd64/amd64/vmm.c:1385 [inline] vm_create(ffff800000ade800,ffff8000ffff3b40) at vm_create+0x193 sys/arch/amd64/amd64/vmm.c:1174 VOP_IOCTL(fffffd8036aae680,c5005601,ffff800000ade800,1,fffffd803f7c6420,ffff8000ffff3b40) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:291 vn_ioctl(fffffd80361fde18,c5005601,ffff800000ade800,ffff8000ffff3b40) at vn_ioctl+0xb7 sys/kern/vfs_vnops.c:533 sys_ioctl(ffff8000ffff3b40,ffff80001594b408,ffff80001594b450) at sys_ioctl+0x5b9 syscall(ffff80001594b4d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc55d2afd450, 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(fffffd803e85d5a8,e4,1df,1) at amap_pp_adjref+0x59e sys/uvm/uvm_amap.c:829 uvm_mapent_clone(ffff800000b49e00,0,1df000,e4000,7,7) at uvm_mapent_clone+0x14c sys/uvm/uvm_map.c:3733 uvm_share(ffff800000b49e00,0,7,fffffd803f012330,20800000,200000) at uvm_share+0x4b4 uvm_mapent_share sys/uvm/uvm_map.c:3767 [inline] uvm_share(ffff800000b49e00,0,7,fffffd803f012330,20800000,200000) at uvm_share+0x4b4 sys/uvm/uvm_map.c:3668 vm_impl_init_vmx(ffff800015966008,ffff8000ffff3b40) at vm_impl_init_vmx+0xf1 sys/arch/amd64/amd64/vmm.c:1270 vm_create(ffff800000ade800,ffff8000ffff3b40) at vm_create+0x193 vm_impl_init sys/arch/amd64/amd64/vmm.c:1385 [inline] vm_create(ffff800000ade800,ffff8000ffff3b40) at vm_create+0x193 sys/arch/amd64/amd64/vmm.c:1174 VOP_IOCTL(fffffd8036aae680,c5005601,ffff800000ade800,1,fffffd803f7c6420,ffff8000ffff3b40) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:291 vn_ioctl(fffffd80361fde18,c5005601,ffff800000ade800,ffff8000ffff3b40) at vn_ioctl+0xb7 sys/kern/vfs_vnops.c:533 sys_ioctl(ffff8000ffff3b40,ffff80001594b408,ffff80001594b450) at sys_ioctl+0x5b9 syscall(ffff80001594b4d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc55d2afd450, count: -12 ddb> show registers rdi 0 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff80001594ad60 rbx 0xffff80001594ae10 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff80001573a000 rax 0xffff800000b06040 r8 0xffff80001594ad20 r9 0x1 r10 0xffff800000b06040 r11 0xb4e64f9c8ab455de r12 0x3000000008 r13 0xffff80001594ad70 r14 0x100 r15 0x1 rip 0xffffffff81038768 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001594ad50 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=66339 stat=onproc flags process=10 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2508,0xffff8000ffff2ef8 process=0xffff8000ffff77b0 user=0xffff800015946000, vmspace=0xfffffd803f012330 estcpu=36, cpticks=13, pctcpu=20.28 user=0, sys=11512, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 28587 234069 97553 0 2 0 syz-executor.1 63911 14682 53029 0 2 0x10 syz-executor.0 *63911 66339 53029 0 7 0x4000010 syz-executor.0 97553 445269 56632 0 2 0x482 syz-executor.1 53029 87100 56632 0 2 0x482 syz-executor.0 32414 509077 0 0 3 0x14200 bored sosplice 56632 345514 48067 0 3 0x82 thrsleep syz-fuzzer 56632 151732 48067 0 2 0x4000482 syz-fuzzer 56632 257252 48067 0 3 0x4000082 kqread syz-fuzzer 56632 48718 48067 0 3 0x4000082 thrsleep syz-fuzzer 56632 35518 48067 0 2 0x4000482 syz-fuzzer 56632 210814 48067 0 3 0x4000082 thrsleep syz-fuzzer 56632 205476 48067 0 3 0x4000082 thrsleep syz-fuzzer 56632 434245 48067 0 3 0x4000082 thrsleep syz-fuzzer 48067 396497 76276 0 3 0x10008a pause ksh 76276 158091 31278 0 3 0x92 select sshd 68254 491680 1 0 3 0x100083 ttyin getty 31278 203590 1 0 3 0x80 select sshd 17212 384798 8882 73 2 0x100490 syslogd 8882 174104 1 0 3 0x100082 netio syslogd 75955 202777 1 77 3 0x100090 poll dhclient 27630 308344 1 0 3 0x80 poll dhclient 74795 454651 0 0 2 0x14200 zerothread 65903 44905 0 0 3 0x14200 aiodoned aiodoned 17001 406909 0 0 2 0x14200 update 65866 245369 0 0 3 0x14200 cleaner cleaner 12393 58415 0 0 3 0x14200 reaper reaper 17011 174347 0 0 3 0x14200 pgdaemon pagedaemon 77818 501440 0 0 3 0x14200 bored crynlk 29922 166009 0 0 3 0x14200 bored crypto 92062 28265 0 0 3 0x40014200 acpi0 acpi0 25065 284920 0 0 2 0x14200 softnet 50514 449569 0 0 2 0x14200 systqmp 47329 194060 0 0 3 0x14200 bored systq 73901 448904 0 0 2 0x40014200 softclock 81450 354113 0 0 3 0x40014200 idle0 53115 78078 0 0 3 0x14200 bored smr 1 211256 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 9548 7206K 7596K 78643K 13949 0 0 pcb 13 11K 13K 78643K 330 0 0 rtable 103 12K 12K 78643K 1271 0 0 ifaddr 129 19K 20K 78643K 355 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 1 2K 2K 78643K 84 0 0 iov 0 0K 32K 78643K 269 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1215 76K 77K 78643K 2390 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 11 2K 2K 78643K 15 0 0 sem 12 0K 0K 78643K 364 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1794 195K 288K 78643K 12646 0 0 file desc 6 17K 25K 78643K 1107 0 0 sigio 3 0K 0K 78643K 208 0 0 proc 48 38K 63K 78643K 649 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 167 0 0 in_multi 89 4K 4K 78643K 266 0 0 ether_multi 1 0K 0K 78643K 14 0 0 mrt 0 0K 0K 78643K 6 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 120 530K 530K 78643K 120 0 0 exec 0 0K 1K 78643K 387 0 0 pfkey data 0 0K 0K 78643K 2 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 137 92K 92K 78643K 3695 0 0 UVM aobj 87 8K 8K 78643K 89 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 253 0 0 NDP 15 0K 0K 78643K 85 0 0 temp 146 3535K 4175K 78643K 107004 0 0 kqueue 0 0K 0K 78643K 15 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 25 0 23 1 0 1 1 0 8 0 rtpcb 80 133 0 131 1 0 1 1 0 8 0 rtentry 112 175 0 140 2 0 2 2 0 8 0 unpcb 120 1044 0 1030 1 0 1 1 0 8 0 syncache 264 10 0 10 4 4 0 1 0 8 0 tcpqe 32 53 0 53 4 4 0 1 0 8 0 tcpcb 544 834 0 828 17 8 9 15 0 8 8 ipq 40 12 0 12 5 4 1 1 0 8 1 ipqe 40 370 0 370 5 4 1 1 0 8 1 inpcb 280 5801 0 5787 17 8 9 9 0 8 8 rttmr 72 2 0 2 2 2 0 1 0 8 0 nd6 48 29 0 26 1 0 1 1 0 8 0 pkpcb 40 6 0 6 2 2 0 1 0 8 0 ppxss 1128 30 0 30 5 4 1 1 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 1034 0 822 22 6 16 16 0 8 1 art_table 32 1036 0 822 3 0 3 3 0 8 0 art_node 16 174 0 142 1 0 1 1 0 8 0 sysvmsgpl 40 64 0 37 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 362 0 352 1 0 1 1 0 8 0 shmpl 112 87 0 2 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3084 0 1692 46 0 46 46 0 8 0 ffsino 240 3084 0 1692 83 0 83 83 0 8 0 nchpl 144 4883 0 3289 60 0 60 60 0 8 0 uvmvnodes 72 4044 0 0 74 0 74 74 0 8 0 vnodes 208 4044 0 0 213 0 213 213 0 8 0 namei 1024 15605 0 15605 1 0 1 1 0 8 1 vcpupl 1984 8 0 0 1 0 1 1 0 8 0 vmpool 520 13 0 4 2 1 1 1 0 8 0 scxspl 192 16862 0 16862 12 10 2 7 0 8 2 plimitpl 152 124 0 117 1 0 1 1 0 8 0 sigapl 432 1262 0 1248 2 0 2 2 0 8 0 futexpl 56 41559 0 41559 1 0 1 1 0 8 1 knotepl 112 330 0 311 2 1 1 2 0 8 0 kqueuepl 104 504 0 501 4 0 4 4 0 8 3 pipepl 128 1382 0 1357 7 5 2 2 0 8 1 fdescpl 424 1263 0 1248 2 0 2 2 0 8 0 filepl 120 15088 0 14969 16 5 11 11 0 8 7 lockfpl 104 360 0 359 1 0 1 1 0 8 0 lockfspl 48 126 0 125 1 0 1 1 0 8 0 sessionpl 112 22 0 12 1 0 1 1 0 8 0 pgrppl 48 40 0 30 1 0 1 1 0 8 0 ucredpl 96 1294 0 1285 1 0 1 1 0 8 0 zombiepl 144 1248 0 1248 1 0 1 1 0 8 1 processpl 864 1278 0 1248 4 0 4 4 0 8 0 procpl 632 2685 0 2647 5 1 4 5 0 8 0 sosppl 128 228 0 224 2 1 1 1 0 8 0 sockpl 384 7058 0 7028 27 17 10 14 0 8 7 mcl64k 65536 186 0 186 6 5 1 4 0 8 1 mcl16k 16384 32 0 32 3 2 1 1 0 8 1 mcl12k 12288 43 0 43 4 3 1 1 0 8 1 mcl9k 9216 19 0 19 7 6 1 1 0 8 1 mcl8k 8192 62 0 62 1 0 1 1 0 8 1 mcl4k 4096 145 0 145 3 2 1 1 0 8 1 mcl2k2 2112 6 0 6 4 3 1 1 0 8 1 mcl2k 2048 70434 0 70383 17 10 7 15 0 8 0 mtagpl 80 147 0 98 4 3 1 1 0 8 0 mbufpl 256 125598 0 125365 52 37 15 25 0 8 0 bufpl 256 11700 0 6060 363 8 355 363 0 8 0 anonpl 16 188855 0 165688 146 46 100 101 0 62 6 amapchunkpl 152 7755 0 7546 47 18 29 31 0 158 20 amappl16 192 8288 0 7031 107 40 67 71 0 8 4 amappl15 184 194 0 193 1 0 1 1 0 8 0 amappl14 176 183 0 178 1 0 1 1 0 8 0 amappl13 168 36 0 36 2 2 0 1 0 8 0 amappl12 160 13 0 9 1 0 1 1 0 8 0 amappl11 152 390 0 379 1 0 1 1 0 8 0 amappl10 144 464 0 459 1 0 1 1 0 8 0 amappl9 136 627 0 624 1 0 1 1 0 8 0 amappl8 128 233 0 194 2 0 2 2 0 8 0 amappl7 120 510 0 504 1 0 1 1 0 8 0 amappl6 112 372 0 362 1 0 1 1 0 8 0 amappl5 104 207 0 195 1 0 1 1 0 8 0 amappl4 96 1546 0 1517 1 0 1 1 0 8 0 amappl3 88 259 0 251 1 0 1 1 0 8 0 amappl2 80 9073 0 9008 3 1 2 3 0 8 0 amappl1 72 32439 0 32033 27 18 9 20 0 8 0 amappl 80 3022 0 2969 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 18 0 17 1 0 1 1 0 8 0 aobjpl 64 88 0 2 2 0 2 2 0 8 0 uaddrrnd 24 1276 0 1248 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1276 0 1248 1 0 1 1 0 8 0 vmmpekpl 168 13145 0 13117 2 0 2 2 0 8 0 vmmpepl 168 162213 0 159786 203 80 123 148 0 357 17 vmsppl 272 1262 0 1248 3 2 1 2 0 8 0 pdppl 4096 2558 0 2512 7 1 6 6 0 8 0 pvpl 32 455771 0 429003 287 52 235 235 0 265 19 pmappl 200 1275 0 1252 4 2 2 2 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 585 0 83 15 0 15 15 0 8 0