panic: amap_pp_adjref: negative reference count Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 58478 17347 0 0 0x4000000 0 syz-executor.1 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(fffffd803a5ee788,7f0,200,1) at amap_pp_adjref+0x59e sys/uvm/uvm_amap.c:829 uvm_mapent_clone(ffff800000ac4900,0,200000,7f0000,7,7) at uvm_mapent_clone+0x14c sys/uvm/uvm_map.c:3733 uvm_share(ffff800000ac4900,0,7,fffffd803f014bb0,20800000,200000) at uvm_share+0x4b4 uvm_mapent_share sys/uvm/uvm_map.c:3767 [inline] uvm_share(ffff800000ac4900,0,7,fffffd803f014bb0,20800000,200000) at uvm_share+0x4b4 sys/uvm/uvm_map.c:3668 vm_impl_init_vmx(ffff800014910620,ffff8000149149f8) at vm_impl_init_vmx+0xf1 sys/arch/amd64/amd64/vmm.c:1270 vm_create(ffff800000ab4800,ffff8000149149f8) at vm_create+0x193 vm_impl_init sys/arch/amd64/amd64/vmm.c:1385 [inline] vm_create(ffff800000ab4800,ffff8000149149f8) at vm_create+0x193 sys/arch/amd64/amd64/vmm.c:1174 VOP_IOCTL(fffffd80360db680,c5005601,ffff800000ab4800,1,fffffd803f7c67e0,ffff8000149149f8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:291 vn_ioctl(fffffd802d9109e8,c5005601,ffff800000ab4800,ffff8000149149f8) at vn_ioctl+0xb7 sys/kern/vfs_vnops.c:533 sys_ioctl(ffff8000149149f8,ffff8000148f8918,ffff8000148f8960) at sys_ioctl+0x5b9 syscall(ffff8000148f89e0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,ffffffffffffff59,0,3,5d42b9cb010) at Xsyscall+0x128 end of kernel end trace frame: 0x5d655ae1190, 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(fffffd803a5ee788,7f0,200,1) at amap_pp_adjref+0x59e sys/uvm/uvm_amap.c:829 uvm_mapent_clone(ffff800000ac4900,0,200000,7f0000,7,7) at uvm_mapent_clone+0x14c sys/uvm/uvm_map.c:3733 uvm_share(ffff800000ac4900,0,7,fffffd803f014bb0,20800000,200000) at uvm_share+0x4b4 uvm_mapent_share sys/uvm/uvm_map.c:3767 [inline] uvm_share(ffff800000ac4900,0,7,fffffd803f014bb0,20800000,200000) at uvm_share+0x4b4 sys/uvm/uvm_map.c:3668 vm_impl_init_vmx(ffff800014910620,ffff8000149149f8) at vm_impl_init_vmx+0xf1 sys/arch/amd64/amd64/vmm.c:1270 vm_create(ffff800000ab4800,ffff8000149149f8) at vm_create+0x193 vm_impl_init sys/arch/amd64/amd64/vmm.c:1385 [inline] vm_create(ffff800000ab4800,ffff8000149149f8) at vm_create+0x193 sys/arch/amd64/amd64/vmm.c:1174 VOP_IOCTL(fffffd80360db680,c5005601,ffff800000ab4800,1,fffffd803f7c67e0,ffff8000149149f8) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:291 vn_ioctl(fffffd802d9109e8,c5005601,ffff800000ab4800,ffff8000149149f8) at vn_ioctl+0xb7 sys/kern/vfs_vnops.c:533 sys_ioctl(ffff8000149149f8,ffff8000148f8918,ffff8000148f8960) at sys_ioctl+0x5b9 syscall(ffff8000148f89e0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,ffffffffffffff59,0,3,5d42b9cb010) at Xsyscall+0x128 end of kernel end trace frame: 0x5d655ae1190, count: -12 ddb> show registers rdi 0 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff8000148f8270 rbx 0xffff8000148f8320 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff800017379000 rax 0xffff800000a67f00 r8 0xffff8000148f8230 r9 0x1 r10 0xffff800000a67f00 r11 0x361ced7d397105e4 r12 0x3000000008 r13 0xffff8000148f8280 r14 0x100 r15 0x1 rip 0xffffffff814d5698 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000148f8260 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=58478 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800014914780,0xffffffff82577fe0 process=0xffff8000ffff77b0 user=0xffff8000148f3000, vmspace=0xfffffd803f014bb0 estcpu=36, cpticks=80, pctcpu=20.28 user=0, sys=11298, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 17347 43235 22272 0 2 0 syz-executor.1 *17347 58478 22272 0 7 0x4000000 syz-executor.1 83226 135475 81194 0 2 0x2 syz-executor.0 22272 154932 81194 0 2 0x482 syz-executor.1 56507 129814 1 0 3 0x100083 ttyin getty 76808 247128 0 0 3 0x14200 bored sosplice 81194 404534 88962 0 3 0x82 thrsleep syz-fuzzer 81194 142138 88962 0 2 0x4000482 syz-fuzzer 81194 91902 88962 0 2 0x4000482 syz-fuzzer 81194 178399 88962 0 3 0x4000082 thrsleep syz-fuzzer 81194 24148 88962 0 3 0x4000082 thrsleep syz-fuzzer 81194 1575 88962 0 3 0x4000082 thrsleep syz-fuzzer 81194 182376 88962 0 3 0x4000082 thrsleep syz-fuzzer 81194 151035 88962 0 3 0x4000082 kqread syz-fuzzer 88962 12764 87641 0 3 0x10008a pause ksh 87641 286 2709 0 3 0x92 select sshd 2709 454943 1 0 3 0x80 select sshd 68869 281978 15535 73 2 0x100490 syslogd 15535 412005 1 0 3 0x100082 netio syslogd 4626 16589 1 77 3 0x100090 poll dhclient 43421 121576 1 0 3 0x80 poll dhclient 17893 407820 0 0 2 0x14200 zerothread 39977 333729 0 0 3 0x14200 aiodoned aiodoned 58731 356653 0 0 2 0x14200 update 66099 360935 0 0 3 0x14200 cleaner cleaner 76572 136389 0 0 3 0x14200 reaper reaper 4426 137051 0 0 3 0x14200 pgdaemon pagedaemon 57045 120584 0 0 3 0x14200 bored crynlk 43349 263192 0 0 3 0x14200 bored crypto 7047 484397 0 0 3 0x40014200 acpi0 acpi0 44688 223430 0 0 2 0x14200 softnet 48494 445096 0 0 2 0x14200 systqmp 49274 87785 0 0 3 0x14200 bored systq 6500 83523 0 0 2 0x40014200 softclock 17803 202758 0 0 3 0x40014200 idle0 91286 177309 0 0 3 0x14200 bored smr 1 494724 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 9541 6988K 8346K 78643K 30175 0 0 pcb 13 8K 9K 78643K 1075 0 0 rtable 98 4K 4K 78643K 6075 0 0 ifaddr 157 21K 21K 78643K 806 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 1 2K 2K 78643K 149 0 0 iov 0 0K 32K 78643K 812 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1229 77K 78K 78643K 7401 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 148 0 0 VM map 24 6K 6K 78643K 31 0 0 sem 12 0K 0K 78643K 1677 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12645 0 0 file desc 5 13K 25K 78643K 5725 0 0 sigio 0 0K 0K 78643K 60 0 0 proc 48 38K 63K 78643K 1110 0 0 subproc 32 2K 2K 78643K 255 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 712 0 0 in_multi 22 1K 2K 78643K 2773 0 0 ether_multi 1 0K 0K 78643K 23 0 0 mrt 0 0K 0K 78643K 16 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 114 503K 503K 78643K 114 0 0 exec 0 0K 1K 78643K 1155 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 174 199K 199K 78643K 14526 0 0 UVM aobj 130 4K 4K 78643K 134 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 535 0 0 NDP 17 0K 0K 78643K 479 0 0 temp 154 3535K 4175K 78643K 103210 0 0 kqueue 0 0K 0K 78643K 37 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 246 0 241 1 0 1 1 0 8 0 rtpcb 80 613 0 611 1 0 1 1 0 8 0 rtentry 112 2283 0 2248 2 0 2 2 0 8 0 unpcb 120 7108 0 7097 1 0 1 1 0 8 0 syncache 264 26 0 26 12 11 1 1 0 8 1 tcpqe 32 57 0 57 6 5 1 1 0 8 1 tcpcb 544 1526 0 1522 7 6 1 3 0 8 0 ipq 40 27 0 27 8 8 0 1 0 8 0 ipqe 40 874 0 874 8 8 0 1 0 8 0 inpcb 280 9113 0 9106 15 14 1 4 0 8 0 rttmr 72 6 0 6 3 3 0 1 0 8 0 nd6 48 393 0 391 4 3 1 1 0 8 0 pkpcb 40 16 0 16 6 6 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 28 0 28 12 11 1 1 0 8 1 art_heap8 4096 207 0 206 3 2 1 3 0 8 0 art_heap4 256 17310 0 17135 31 20 11 16 0 8 0 art_table 32 17517 0 17341 4 2 2 3 0 8 0 art_node 16 2282 0 2250 1 0 1 1 0 8 0 sysvmsgpl 40 57 0 17 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 1675 0 1665 1 0 1 1 0 8 0 shmpl 112 132 0 4 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 9113 0 7724 46 0 46 46 0 8 0 ffsino 240 9113 0 7724 83 0 83 83 0 8 0 nchpl 144 16847 0 15230 61 0 61 61 0 8 0 uvmvnodes 72 6549 0 0 120 0 120 120 0 8 0 vnodes 208 6549 0 0 345 0 345 345 0 8 0 namei 1024 59320 0 59320 3 2 1 1 0 8 1 vcpupl 1984 21 0 0 3 0 3 3 0 8 0 vmpool 520 29 0 7 2 0 2 2 0 8 0 scxspl 192 48934 0 48934 24 23 1 7 0 8 1 plimitpl 152 195 0 188 1 0 1 1 0 8 0 sigapl 432 5858 0 5845 2 0 2 2 0 8 0 futexpl 56 143769 0 143769 3 2 1 1 0 8 1 knotepl 112 892 0 873 4 3 1 3 0 8 0 kqueuepl 104 1251 0 1248 1 0 1 1 0 8 0 pipepl 128 2522 0 2503 11 10 1 2 0 8 0 fdescpl 424 5859 0 5845 2 0 2 2 0 8 0 filepl 120 48202 0 48104 16 11 5 6 0 8 2 lockfpl 104 1007 0 1006 1 0 1 1 0 8 0 lockfspl 48 363 0 362 1 0 1 1 0 8 0 sessionpl 112 32 0 22 1 0 1 1 0 8 0 pgrppl 48 74 0 64 1 0 1 1 0 8 0 ucredpl 96 8687 0 8680 1 0 1 1 0 8 0 zombiepl 144 5846 0 5846 2 1 1 1 0 8 1 processpl 864 5875 0 5846 4 0 4 4 0 8 0 procpl 632 13084 0 13047 8 4 4 5 0 8 0 sosppl 128 36 0 36 11 10 1 1 0 8 1 sockpl 384 16974 0 16954 26 22 4 7 0 8 1 mcl64k 65536 2409 0 2409 8 7 1 4 0 8 1 mcl16k 16384 103 0 103 17 17 0 1 0 8 0 mcl12k 12288 641 0 641 2 1 1 1 0 8 1 mcl9k 9216 53 0 53 14 13 1 1 0 8 1 mcl8k 8192 240 0 240 10 9 1 1 0 8 1 mcl4k 4096 648 0 648 4 3 1 1 0 8 1 mcl2k2 2112 39 0 39 15 15 0 1 0 8 0 mcl2k 2048 74513 0 74473 28 22 6 12 0 8 0 mtagpl 80 245 0 243 10 9 1 2 0 8 0 mbufpl 256 186849 0 186742 206 193 13 69 0 8 1 bufpl 256 18490 0 11943 410 0 410 410 0 8 0 anonpl 16 535508 0 514315 202 108 94 101 0 62 7 amapchunkpl 152 26091 0 25925 69 57 12 31 0 158 4 amappl16 192 28486 0 27311 157 97 60 70 0 8 1 amappl15 184 1923 0 1923 2 2 0 1 0 8 0 amappl14 176 552 0 545 1 0 1 1 0 8 0 amappl13 168 907 0 907 2 2 0 1 0 8 0 amappl12 160 1177 0 1175 4 3 1 1 0 8 0 amappl11 152 1254 0 1242 1 0 1 1 0 8 0 amappl10 144 385 0 384 1 0 1 1 0 8 0 amappl9 136 1146 0 1141 1 0 1 1 0 8 0 amappl8 128 776 0 719 2 0 2 2 0 8 0 amappl7 120 454 0 449 1 0 1 1 0 8 0 amappl6 112 1206 0 1191 1 0 1 1 0 8 0 amappl5 104 1531 0 1518 1 0 1 1 0 8 0 amappl4 96 5463 0 5433 1 0 1 1 0 8 0 amappl3 88 982 0 975 1 0 1 1 0 8 0 amappl2 80 46917 0 46850 3 1 2 3 0 8 0 amappl1 72 113475 0 113065 27 18 9 20 0 8 0 amappl 80 13557 0 13502 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 133 0 4 3 0 3 3 0 8 0 uaddrrnd 24 5888 0 5845 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5888 0 5845 1 0 1 1 0 8 0 vmmpekpl 168 33830 0 33797 2 0 2 2 0 8 0 vmmpepl 168 687491 0 685130 343 214 129 151 0 357 21 vmsppl 272 5858 0 5845 4 3 1 2 0 8 0 pdppl 4096 11782 0 11725 10 2 8 8 0 8 0 pvpl 32 1467378 0 1443949 459 248 211 323 0 265 20 pmappl 200 5887 0 5852 2 0 2 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 829 0 288 17 0 17 17 0 8 0