login: panic: amap_pp_adjref: negative reference count Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 102463 32987 0 0 0 0 syz-executor.1 *466286 32987 0 0 0x4000000 1K 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(fffffd807b275eb8,7f0,200,1) at amap_pp_adjref+0x59e sys/uvm/uvm_amap.c:829 uvm_mapent_clone(ffff800000a9b800,0,200000,7f0000,7,7) at uvm_mapent_clone+0x14c sys/uvm/uvm_map.c:3733 uvm_share(ffff800000a9b800,0,7,fffffd807f0075c0,20800000,200000) at uvm_share+0x4b4 uvm_mapent_share sys/uvm/uvm_map.c:3767 [inline] uvm_share(ffff800000a9b800,0,7,fffffd807f0075c0,20800000,200000) at uvm_share+0x4b4 sys/uvm/uvm_map.c:3668 vm_impl_init_vmx(ffff800020b5ccf0,ffff800020ab0c70) at vm_impl_init_vmx+0xf1 sys/arch/amd64/amd64/vmm.c:1270 vm_create() at vm_create+0x1a0 vm_impl_init sys/arch/amd64/amd64/vmm.c:1385 [inline] vm_create() at vm_create+0x1a0 sys/arch/amd64/amd64/vmm.c:1174 VOP_IOCTL(fffffd806e0ce9c0,c5005601,ffff800000c13800,1,fffffd807f7c65a0,ffff800020ab0c70) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:291 vn_ioctl(fffffd8061ca7698,c5005601,ffff800000c13800,ffff800020ab0c70) at vn_ioctl+0xb7 sys/kern/vfs_vnops.c:533 sys_ioctl(ffff800020ab0c70,ffff800023bc3ac8,ffff800023bc3b10) at sys_ioctl+0x5b9 syscall(ffff800023bc3b90) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800023bc3b90) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7efefeea2d0, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic amap_pp_adjref: negative reference count ddb{1}> 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(fffffd807b275eb8,7f0,200,1) at amap_pp_adjref+0x59e sys/uvm/uvm_amap.c:829 uvm_mapent_clone(ffff800000a9b800,0,200000,7f0000,7,7) at uvm_mapent_clone+0x14c sys/uvm/uvm_map.c:3733 uvm_share(ffff800000a9b800,0,7,fffffd807f0075c0,20800000,200000) at uvm_share+0x4b4 uvm_mapent_share sys/uvm/uvm_map.c:3767 [inline] uvm_share(ffff800000a9b800,0,7,fffffd807f0075c0,20800000,200000) at uvm_share+0x4b4 sys/uvm/uvm_map.c:3668 vm_impl_init_vmx(ffff800020b5ccf0,ffff800020ab0c70) at vm_impl_init_vmx+0xf1 sys/arch/amd64/amd64/vmm.c:1270 vm_create() at vm_create+0x1a0 vm_impl_init sys/arch/amd64/amd64/vmm.c:1385 [inline] vm_create() at vm_create+0x1a0 sys/arch/amd64/amd64/vmm.c:1174 VOP_IOCTL(fffffd806e0ce9c0,c5005601,ffff800000c13800,1,fffffd807f7c65a0,ffff800020ab0c70) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:291 vn_ioctl(fffffd8061ca7698,c5005601,ffff800000c13800,ffff800020ab0c70) at vn_ioctl+0xb7 sys/kern/vfs_vnops.c:533 sys_ioctl(ffff800020ab0c70,ffff800023bc3ac8,ffff800023bc3b10) at sys_ioctl+0x5b9 syscall(ffff800023bc3b90) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800023bc3b90) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7efefeea2d0, count: -12 ddb{1}> show registers rdi 0 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800023bc3420 rbx 0xffff800023bc34d0 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff800021b64000 rax 0xffff800000a4a640 r8 0xffffffff81298dcf kprintf+0x16f r9 0x1 r10 0x25 r11 0x85bf30c8b12fe94 r12 0x3000000008 r13 0xffff800023bc3430 r14 0x100 r15 0x1 rip 0xffffffff81e8ddc8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800023bc3410 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=466286 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020ab0780,0xffffffff82648da8 process=0xffff800020add180 user=0xffff800023bbe000, vmspace=0xfffffd807f0075c0 estcpu=36, cpticks=18002, pctcpu=0.0 user=0, sys=18002, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 32987 102463 74215 0 7 0 syz-executor.1 32987 511871 74215 0 3 0x4000080 nanosleep syz-executor.1 *32987 466286 74215 0 7 0x4000000 syz-executor.1 62113 479447 64020 0 3 0x80 nanosleep syz-executor.0 62113 184417 64020 0 3 0x4000080 nanosleep syz-executor.0 62113 409577 64020 0 3 0x4000080 fsleep syz-executor.0 98141 445923 0 0 3 0x14200 bored sosplice 74215 321104 26040 0 3 0x82 nanosleep syz-executor.1 64020 137568 26040 0 3 0x82 nanosleep syz-executor.0 26040 269003 5687 0 3 0x82 thrsleep syz-fuzzer 26040 192223 5687 0 3 0x4000082 thrsleep syz-fuzzer 26040 441765 5687 0 3 0x4000082 thrsleep syz-fuzzer 26040 257115 5687 0 3 0x4000082 thrsleep syz-fuzzer 26040 265759 5687 0 3 0x4000082 thrsleep syz-fuzzer 26040 334726 5687 0 3 0x4000082 kqread syz-fuzzer 26040 89101 5687 0 3 0x4000082 thrsleep syz-fuzzer 26040 331994 5687 0 3 0x4000082 thrsleep syz-fuzzer 26040 70084 5687 0 3 0x4000082 thrsleep syz-fuzzer 26040 365590 5687 0 3 0x4000082 thrsleep syz-fuzzer 5687 339340 11909 0 3 0x10008a pause ksh 11909 111885 81366 0 3 0x92 select sshd 54629 142048 1 0 3 0x100083 ttyin getty 81366 384758 1 0 3 0x80 select sshd 74474 352847 96796 74 3 0x100092 bpf pflogd 96796 237550 1 0 3 0x80 netio pflogd 72490 423138 96918 73 3 0x100090 kqread syslogd 96918 259651 1 0 3 0x100082 netio syslogd 977 266317 1 77 3 0x100090 poll dhclient 72814 263770 1 0 3 0x80 poll dhclient 90509 313969 0 0 3 0x14200 pgzero zerothread 85052 273973 0 0 3 0x14200 aiodoned aiodoned 26637 182811 0 0 3 0x14200 syncer update 36056 177211 0 0 3 0x14200 cleaner cleaner 56712 307034 0 0 3 0x14200 reaper reaper 91324 506269 0 0 3 0x14200 pgdaemon pagedaemon 73276 198827 0 0 3 0x14200 bored crynlk 84162 179592 0 0 3 0x14200 bored crypto 77948 129297 0 0 3 0x40014200 acpi0 acpi0 17650 105774 0 0 3 0x40014200 idle1 97535 428283 0 0 3 0x14200 bored softnet 36170 323194 0 0 3 0x14200 bored systqmp 33157 36052 0 0 3 0x14200 bored systq 4975 491368 0 0 3 0x40014200 bored softclock 25675 437088 0 0 3 0x40014200 idle0 25523 515373 0 0 3 0x14200 bored smr 1 479029 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 32987 (syz-executor.1) thread 0xffff800020ab0c70 (466286) shared rwlock vmmaplk r = 0 (0xfffffd807f0075d8) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 uvm_share+0xcf vm_map_lock_read_ln sys/uvm/uvm_map.c:5365 [inline] #1 uvm_share+0xcf sys/uvm/uvm_map.c:3627 #2 vm_impl_init_vmx+0xf1 sys/arch/amd64/amd64/vmm.c:1270 #3 vm_create+0x1a0 vm_impl_init sys/arch/amd64/amd64/vmm.c:1385 [inline] #3 vm_create+0x1a0 sys/arch/amd64/amd64/vmm.c:1174 #4 VOP_IOCTL+0x88 sys/kern/vfs_vops.c:291 #5 vn_ioctl+0xb7 sys/kern/vfs_vnops.c:533 #6 sys_ioctl+0x5b9 #7 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] #7 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 #8 Xsyscall+0x128 exclusive rwlock vmmaplk r = 0 (0xffff800000a9b818) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x447 sys/kern/kern_rwlock.c:306 #2 vm_map_lock_ln+0x10d sys/uvm/uvm_map.c:5343 #3 uvm_share+0xa7 vm_map_lock_read_ln sys/uvm/uvm_map.c:5364 [inline] #3 uvm_share+0xa7 sys/uvm/uvm_map.c:3627 #4 vm_impl_init_vmx+0xf1 sys/arch/amd64/amd64/vmm.c:1270 #5 vm_create+0x1a0 vm_impl_init sys/arch/amd64/amd64/vmm.c:1385 [inline] #5 vm_create+0x1a0 sys/arch/amd64/amd64/vmm.c:1174 #6 VOP_IOCTL+0x88 sys/kern/vfs_vops.c:291 #7 vn_ioctl+0xb7 sys/kern/vfs_vnops.c:533 #8 sys_ioctl+0x5b9 #9 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] #9 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 #10 Xsyscall+0x128 exclusive rwlock vmlistlock r = 0 (0xffff800000671478) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 vm_create+0x130 vm_impl_init sys/arch/amd64/amd64/vmm.c:1383 [inline] #1 vm_create+0x130 sys/arch/amd64/amd64/vmm.c:1174 #2 VOP_IOCTL+0x88 sys/kern/vfs_vops.c:291 #3 vn_ioctl+0xb7 sys/kern/vfs_vnops.c:533 #4 sys_ioctl+0x5b9 #5 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] #5 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 #6 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82635090) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 syscall+0x400 mi_syscall sys/sys/syscall_mi.h:83 [inline] #1 syscall+0x400 sys/arch/amd64/amd64/trap.c:555 #2 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9510 6412K 8723K 78643K 11211 0 0 pcb 13 8K 8K 78643K 101 0 0 rtable 102 4K 5K 78643K 323 0 0 ifaddr 72 13K 14K 78643K 112 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 1 2K 4K 78643K 1477 0 0 iov 0 0K 14K 78643K 31 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1246 78K 79K 78643K 1424 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 6 0 0 VM map 6 3K 3K 78643K 6 0 0 sem 12 0K 1K 78643K 77 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1809 196K 290K 78643K 12766 0 0 file desc 6 17K 25K 78643K 200 0 0 proc 60 63K 95K 78643K 471 0 0 subproc 32 2K 2K 78643K 34 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 1K 78643K 46 0 0 in_multi 35 2K 2K 78643K 63 0 0 ether_multi 1 0K 0K 78643K 5 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 223 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 122 67K 67K 78643K 1643 0 0 UVM aobj 12 4K 4K 78643K 12 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 56 0 0 NDP 12 0K 0K 78643K 23 0 0 temp 131 3551K 3620K 78643K 4084 0 0 kqueue 0 0K 0K 78643K 3 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 8 0 4 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 37 0 35 1 0 1 1 0 8 0 rtentry 112 55 0 17 2 0 2 2 0 8 0 unpcb 120 186 0 174 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 96 0 96 1 1 0 1 0 8 0 tcpcb 544 97 0 92 1 0 1 1 0 8 0 inpcb 280 545 0 535 4 0 4 4 0 8 3 nd6 48 5 0 2 1 0 1 1 0 8 0 ppxss 1128 7 0 7 1 0 1 1 0 8 1 pffrag 232 13 0 13 1 0 1 1 0 482 1 pffrnode 88 13 0 13 1 0 1 1 0 8 1 pffrent 40 329 0 329 1 0 1 1 0 8 1 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 34 0 0 1 0 1 1 0 8 0 pfstkey 112 34 0 0 1 0 1 1 0 8 0 pfstate 328 34 0 0 3 0 3 3 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 268 0 57 14 0 14 14 0 8 0 art_table 32 269 0 57 2 0 2 2 0 8 0 art_node 16 54 0 19 1 0 1 1 0 8 0 sysvmsgpl 40 31 0 9 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 75 0 65 1 0 1 1 0 8 0 shmpl 112 10 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1769 0 363 46 0 46 46 0 8 0 ffsino 272 1769 0 363 94 0 94 94 0 8 0 nchpl 144 2286 0 671 61 0 61 61 0 8 0 uvmvnodes 72 1944 0 0 36 0 36 36 0 8 0 vnodes 208 1944 0 0 103 0 103 103 0 8 0 namei 1024 6937 0 6937 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 vcpupl 1984 3 0 0 1 0 1 1 0 8 0 vmpool 552 4 0 0 1 0 1 1 0 8 0 scxspl 192 6337 0 6337 8 1 7 7 0 8 7 plimitpl 152 31 0 23 1 0 1 1 0 8 0 sigapl 432 398 0 382 3 1 2 3 0 8 0 futexpl 56 5723 0 5722 1 0 1 1 0 8 0 knotepl 112 80 0 61 1 0 1 1 0 8 0 kqueuepl 104 47 0 44 1 0 1 1 0 8 0 pipepl 160 246 0 227 2 0 2 2 0 8 1 fdescpl 488 399 0 382 3 0 3 3 0 8 0 filepl 152 3459 0 3346 8 1 7 7 0 8 2 lockfpl 104 290 0 289 1 0 1 1 0 8 0 lockfspl 48 97 0 96 1 0 1 1 0 8 0 sessionpl 112 18 0 7 1 0 1 1 0 8 0 pgrppl 48 21 0 10 1 0 1 1 0 8 0 ucredpl 96 759 0 750 1 0 1 1 0 8 0 zombiepl 144 382 0 382 1 0 1 1 0 8 1 processpl 896 415 0 382 4 0 4 4 0 8 0 procpl 632 871 0 825 5 0 5 5 0 8 1 srpgc 64 2 0 2 1 0 1 1 0 8 1 sosppl 128 101 0 101 1 0 1 1 0 8 1 sockpl 384 778 0 754 8 1 7 7 0 8 4 mcl64k 65536 8 0 0 1 0 1 1 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 14 0 0 2 0 2 2 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 161 0 0 20 0 20 20 0 8 0 mtagpl 80 44 0 0 1 0 1 1 0 8 0 mbufpl 256 357 0 0 22 0 22 22 0 8 0 bufpl 256 6613 0 1312 332 0 332 332 0 8 0 anonpl 16 57608 0 35685 97 1 96 96 0 124 7 amapchunkpl 152 2199 0 2033 12 0 12 12 0 158 5 amappl16 192 2070 0 855 61 0 61 61 0 8 0 amappl15 184 167 0 163 1 0 1 1 0 8 0 amappl14 176 48 0 43 1 0 1 1 0 8 0 amappl13 168 1 0 1 1 1 0 1 0 8 0 amappl12 160 11 0 7 1 0 1 1 0 8 0 amappl11 152 62 0 47 1 0 1 1 0 8 0 amappl10 144 16 0 9 1 0 1 1 0 8 0 amappl9 136 602 0 599 1 0 1 1 0 8 0 amappl8 128 175 0 144 2 0 2 2 0 8 0 amappl7 120 37 0 34 1 0 1 1 0 8 0 amappl6 112 67 0 59 1 0 1 1 0 8 0 amappl5 104 138 0 122 1 0 1 1 0 8 0 amappl4 96 653 0 624 1 0 1 1 0 8 0 amappl3 88 123 0 115 1 0 1 1 0 8 0 amappl2 80 2382 0 2303 3 1 2 3 0 8 0 amappl1 72 18738 0 18265 24 14 10 20 0 8 0 amappl 80 1121 0 1068 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 11 0 0 1 0 1 1 0 8 0 uaddrrnd 24 403 0 382 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 403 0 382 1 0 1 1 0 8 0 vmmpekpl 168 7357 0 7322 3 1 2 2 0 8 0 vmmpepl 168 56481 0 53984 142 5 137 139 0 357 28 vmsppl 368 398 0 382 2 0 2 2 0 8 0 pdppl 4096 813 0 767 6 0 6 6 0 8 0 pvpl 32 179909 0 154934 222 0 222 222 0 265 20 pmappl 232 402 0 382 2 0 2 2 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 505 0 3 15 0 15 15 0 8 0