panic: amap_pp_adjref: negative reference count Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 14998 13106 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(fffffd8038284e68,e4,1df,1) at amap_pp_adjref+0x59e sys/uvm/uvm_amap.c:829 uvm_mapent_clone(ffff800000a94c00,0,1df000,e4000,7,7) at uvm_mapent_clone+0x14c sys/uvm/uvm_map.c:3733 uvm_share(ffff800000a94c00,0,7,fffffd803f011dd0,20800000,200000) at uvm_share+0x4b4 uvm_mapent_share sys/uvm/uvm_map.c:3767 [inline] uvm_share(ffff800000a94c00,0,7,fffffd803f011dd0,20800000,200000) at uvm_share+0x4b4 sys/uvm/uvm_map.c:3668 vm_impl_init_vmx(ffff800017b81860,ffff8000ffff9b30) at vm_impl_init_vmx+0xf1 sys/arch/amd64/amd64/vmm.c:1270 vm_create(ffff800000aac000,ffff8000ffff9b30) at vm_create+0x193 vm_impl_init sys/arch/amd64/amd64/vmm.c:1385 [inline] vm_create(ffff800000aac000,ffff8000ffff9b30) at vm_create+0x193 sys/arch/amd64/amd64/vmm.c:1174 VOP_IOCTL(fffffd803a202820,c5005601,ffff800000aac000,1,fffffd803f7c6ba0,ffff8000ffff9b30) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:291 vn_ioctl(fffffd802d75eae0,c5005601,ffff800000aac000,ffff8000ffff9b30) at vn_ioctl+0xb7 sys/kern/vfs_vnops.c:533 sys_ioctl(ffff8000ffff9b30,ffff800017b75da8,ffff800017b75df0) at sys_ioctl+0x5b9 syscall(ffff800017b75e70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x524dbd891e0, 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(fffffd8038284e68,e4,1df,1) at amap_pp_adjref+0x59e sys/uvm/uvm_amap.c:829 uvm_mapent_clone(ffff800000a94c00,0,1df000,e4000,7,7) at uvm_mapent_clone+0x14c sys/uvm/uvm_map.c:3733 uvm_share(ffff800000a94c00,0,7,fffffd803f011dd0,20800000,200000) at uvm_share+0x4b4 uvm_mapent_share sys/uvm/uvm_map.c:3767 [inline] uvm_share(ffff800000a94c00,0,7,fffffd803f011dd0,20800000,200000) at uvm_share+0x4b4 sys/uvm/uvm_map.c:3668 vm_impl_init_vmx(ffff800017b81860,ffff8000ffff9b30) at vm_impl_init_vmx+0xf1 sys/arch/amd64/amd64/vmm.c:1270 vm_create(ffff800000aac000,ffff8000ffff9b30) at vm_create+0x193 vm_impl_init sys/arch/amd64/amd64/vmm.c:1385 [inline] vm_create(ffff800000aac000,ffff8000ffff9b30) at vm_create+0x193 sys/arch/amd64/amd64/vmm.c:1174 VOP_IOCTL(fffffd803a202820,c5005601,ffff800000aac000,1,fffffd803f7c6ba0,ffff8000ffff9b30) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:291 vn_ioctl(fffffd802d75eae0,c5005601,ffff800000aac000,ffff8000ffff9b30) at vn_ioctl+0xb7 sys/kern/vfs_vnops.c:533 sys_ioctl(ffff8000ffff9b30,ffff800017b75da8,ffff800017b75df0) at sys_ioctl+0x5b9 syscall(ffff800017b75e70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x524dbd891e0, count: -12 ddb> show registers rdi 0 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800017b75700 rbx 0xffff800017b757b0 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff80001694b000 rax 0xffff800000b07880 r8 0xffff800017b756c0 r9 0x1 r10 0xffff800000b07880 r11 0x97f7810f5b49d50c r12 0x3000000008 r13 0xffff800017b75710 r14 0x100 r15 0x1 rip 0xffffffff811e7a38 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800017b756f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=14998 stat=onproc flags process=0 proc=4000000 pri=85, usrpri=85, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8ed8,0xffffffff82591710 process=0xffff8000ffffb0e8 user=0xffff800017b70000, vmspace=0xfffffd803f011dd0 estcpu=35, cpticks=7, pctcpu=20.28 user=0, sys=11155, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 13106 410562 67742 0 2 0 syz-executor.0 13106 206708 67742 0 2 0x4000000 syz-executor.0 *13106 14998 67742 0 7 0x4000000 syz-executor.0 52986 43079 1 0 3 0x100083 ttyin getty 67742 269461 37253 0 2 0x482 syz-executor.0 41316 103615 37253 0 2 0x2 syz-executor.1 45654 283227 0 0 3 0x14200 bored sosplice 37253 238332 87852 0 3 0x82 thrsleep syz-fuzzer 37253 424514 87852 0 2 0x4000482 syz-fuzzer 37253 508628 87852 0 3 0x4000082 thrsleep syz-fuzzer 37253 9892 87852 0 3 0x4000082 thrsleep syz-fuzzer 37253 338293 87852 0 3 0x4000082 thrsleep syz-fuzzer 37253 36986 87852 0 3 0x4000082 kqread syz-fuzzer 37253 16791 87852 0 3 0x4000082 thrsleep syz-fuzzer 37253 399149 87852 0 2 0x4000482 syz-fuzzer 87852 308445 53526 0 3 0x10008a pause ksh 53526 53081 4148 0 3 0x92 select sshd 4148 107613 1 0 3 0x80 select sshd 95742 303611 89390 73 2 0x100490 syslogd 89390 459224 1 0 3 0x100082 netio syslogd 8484 459471 1 77 3 0x100090 poll dhclient 15857 176954 1 0 3 0x80 poll dhclient 21894 259061 0 0 2 0x14200 zerothread 72901 131650 0 0 3 0x14200 aiodoned aiodoned 51340 199200 0 0 2 0x14200 update 79326 283828 0 0 3 0x14200 cleaner cleaner 68576 304318 0 0 3 0x14200 reaper reaper 79955 395623 0 0 3 0x14200 pgdaemon pagedaemon 47769 47810 0 0 3 0x14200 bored crynlk 33822 110737 0 0 3 0x14200 bored crypto 4325 440750 0 0 3 0x40014200 acpi0 acpi0 96239 3543 0 0 2 0x14200 softnet 80916 487547 0 0 2 0x14200 systqmp 52930 167403 0 0 3 0x14200 bored systq 70743 271538 0 0 2 0x40014200 softclock 37940 278207 0 0 3 0x40014200 idle0 15213 238310 0 0 3 0x14200 bored smr 1 354279 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 9538 6369K 7784K 78643K 12737 0 0 pcb 13 8K 8K 78643K 193 0 0 rtable 94 3K 4K 78643K 700 0 0 ifaddr 125 18K 19K 78643K 285 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 1 2K 2K 78643K 41 0 0 iov 0 0K 24K 78643K 1614 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1225 77K 77K 78643K 1963 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 16 0 0 VM map 5 1K 1K 78643K 7 0 0 sem 12 0K 0K 78643K 258 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1794 195K 288K 78643K 12646 0 0 file desc 5 13K 25K 78643K 1005 0 0 sigio 0 0K 0K 78643K 69 0 0 proc 48 38K 63K 78643K 579 0 0 subproc 32 2K 2K 78643K 95 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 88 0 0 in_multi 56 3K 3K 78643K 178 0 0 ether_multi 1 0K 0K 78643K 14 0 0 mrt 0 0K 0K 78643K 11 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 312 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 125 43K 43K 78643K 3146 0 0 UVM aobj 130 5K 5K 78643K 136 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 166 0 0 NDP 17 0K 0K 78643K 66 0 0 temp 154 3535K 4171K 78643K 30864 0 0 kqueue 0 0K 0K 78643K 12 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 21 0 15 1 0 1 1 0 8 0 rtpcb 80 85 0 83 1 0 1 1 0 8 0 rtentry 112 132 0 98 2 0 2 2 0 8 0 unpcb 120 650 0 642 1 0 1 1 0 8 0 syncache 264 13 0 13 4 3 1 1 0 8 1 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 158 0 158 3 3 0 1 0 8 0 tcpcb 544 331 0 327 2 1 1 2 0 8 0 ipq 40 14 0 14 5 4 1 1 0 8 1 ipqe 40 498 0 498 5 4 1 1 0 8 1 inpcb 280 1006 0 996 3 1 2 2 0 8 1 rttmr 72 4 0 4 2 1 1 1 0 8 1 nd6 48 17 0 16 1 0 1 1 0 8 0 pkpcb 40 4 0 4 2 1 1 1 0 8 1 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 22 0 22 5 4 1 1 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 610 0 440 16 1 15 15 0 8 1 art_table 32 612 0 440 2 0 2 2 0 8 0 art_node 16 131 0 99 1 0 1 1 0 8 0 sysvmsgpl 40 73 0 33 1 0 1 1 0 8 0 semapl 112 256 0 246 1 0 1 1 0 8 0 shmpl 112 134 0 6 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2821 0 1422 46 0 46 46 0 8 0 ffsino 240 2821 0 1422 83 0 83 83 0 8 0 nchpl 144 4855 0 3243 61 0 61 61 0 8 0 uvmvnodes 72 3415 0 0 63 0 63 63 0 8 0 vnodes 208 3415 0 0 180 0 180 180 0 8 0 namei 1024 14383 0 14383 1 0 1 1 0 8 1 vcpupl 1984 2 0 0 1 0 1 1 0 8 0 vmpool 520 5 0 2 1 0 1 1 0 8 0 scxspl 192 13582 0 13582 10 9 1 7 0 8 1 plimitpl 152 86 0 79 1 0 1 1 0 8 0 sigapl 432 1167 0 1154 2 0 2 2 0 8 0 futexpl 56 27540 0 27540 1 0 1 1 0 8 1 knotepl 112 202 0 183 2 1 1 2 0 8 0 kqueuepl 104 279 0 276 1 0 1 1 0 8 0 pipepl 128 734 0 715 3 1 2 2 0 8 1 fdescpl 424 1168 0 1154 2 0 2 2 0 8 0 filepl 120 9116 0 9019 8 3 5 6 0 8 1 lockfpl 104 260 0 259 1 0 1 1 0 8 0 lockfspl 48 90 0 89 1 0 1 1 0 8 0 sessionpl 112 21 0 11 1 0 1 1 0 8 0 pgrppl 48 43 0 33 1 0 1 1 0 8 0 ucredpl 96 798 0 791 1 0 1 1 0 8 0 zombiepl 144 1154 0 1154 1 0 1 1 0 8 1 processpl 864 1183 0 1154 4 0 4 4 0 8 0 procpl 632 2287 0 2249 5 1 4 5 0 8 0 sosppl 128 13 0 13 4 3 1 1 0 8 1 sockpl 384 1757 0 1738 10 5 5 5 0 8 2 mcl64k 65536 354 0 353 34 33 1 33 0 8 0 mcl16k 16384 15 0 15 4 3 1 1 0 8 1 mcl12k 12288 36 0 36 2 1 1 1 0 8 1 mcl9k 9216 13 0 13 4 3 1 1 0 8 1 mcl8k 8192 47 0 47 2 1 1 1 0 8 1 mcl4k 4096 114 0 114 3 2 1 1 0 8 1 mcl2k2 2112 4 0 4 3 2 1 1 0 8 1 mcl2k 2048 72725 0 72676 14 7 7 13 0 8 0 mtagpl 80 59 0 50 2 1 1 1 0 8 0 mbufpl 256 127833 0 127593 67 45 22 35 0 8 1 bufpl 256 8585 0 3489 319 0 319 319 0 8 0 anonpl 16 133947 0 108210 137 33 104 104 0 62 0 amapchunkpl 152 4664 0 4416 11 1 10 10 0 158 0 amappl16 192 6733 0 5367 103 34 69 72 0 8 0 amappl15 184 9 0 8 1 0 1 1 0 8 0 amappl14 176 372 0 364 1 0 1 1 0 8 0 amappl12 160 84 0 81 1 0 1 1 0 8 0 amappl11 152 446 0 434 1 0 1 1 0 8 0 amappl10 144 82 0 81 1 0 1 1 0 8 0 amappl9 136 596 0 593 1 0 1 1 0 8 0 amappl8 128 200 0 166 3 1 2 2 0 8 0 amappl7 120 125 0 120 1 0 1 1 0 8 0 amappl6 112 457 0 447 1 0 1 1 0 8 0 amappl5 104 256 0 245 1 0 1 1 0 8 0 amappl4 96 1239 0 1211 1 0 1 1 0 8 0 amappl3 88 485 0 477 1 0 1 1 0 8 0 amappl2 80 7681 0 7612 3 1 2 3 0 8 0 amappl1 72 28665 0 28259 27 18 9 20 0 8 0 amappl 80 2562 0 2512 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 135 0 6 3 0 3 3 0 8 0 uaddrrnd 24 1173 0 1154 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1173 0 1154 1 0 1 1 0 8 0 vmmpekpl 168 10638 0 10610 2 0 2 2 0 8 0 vmmpepl 168 143429 0 140984 162 46 116 145 0 357 9 vmsppl 272 1167 0 1154 2 1 1 2 0 8 0 pdppl 4096 2352 0 2314 7 2 5 6 0 8 0 pvpl 32 370507 0 341689 269 35 234 234 0 265 1 pmappl 200 1172 0 1156 1 0 1 1 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 561 0 98 14 0 14 14 0 8 0