panic: amap_pp_adjref: negative reference count (3)

Status: upstream: reported on 2026/05/30 16:03
Reported-by: syzbot+092fc16af93b8b67ef78@syzkaller.appspotmail.com
First crash: 72d, last: 1h19m
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
openbsd panic: amap_pp_adjref: negative reference count 2 syz, C 98 2451d 2503d 3/4 fixed on 2019/12/04 16:31
openbsd panic: amap_pp_adjref: negative reference count (2) 2 1 1398d 1398d 0/4 auto-obsoleted due to no activity on 2023/01/10 14:24

Sample crash report:
panic: amap_pp_adjref: negative reference count
Stopped at      db_enter+0x25:  addq    $0x8,%rsp
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
 260436  47835  32767        0x10  0x4000000    1  syz-executor
*283632  34535      0           0          0    0K sshd
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438
panic(ffffffff83525295) at panic+0x1e5 sys/kern/subr_prf.c:198
amap_pp_adjref(fffff780777f1790,0,1,1) at amap_pp_adjref+0x74c sys/uvm/uvm_amap.c:880
amap_adjref_anons(fffff780777f1790,0,1,1,0) at amap_adjref_anons+0x22d sys/uvm/uvm_amap.c:1298
uvm_mapent_clone(fffff7806bde0028,c91fc250000,1000,0,1,7,61756f43285a9b73,fffff7806e3e8aa8,ffff80002a284058,fffff7806bde0028) at uvm_mapent_clone+0x17e sys/uvm/uvm_map.c:3503
uvm_mapent_forkcopy(1,fffff7806bde0028,fffff7800b1cb3d0,fffff7806e3e8aa8,ffff80002a284058) at uvm_mapent_forkcopy+0x6f sys/uvm/uvm_map.c:3573
uvmspace_fork(ffff800045ff3500) at uvmspace_fork+0x299 sys/uvm/uvm_map.c:3776
process_new(ffff800045fe2028,ffff800045ff3500,1) at process_new+0x583 sys/kern/kern_fork.c:282
fork1(ffff80002a222010,1,ffffffff811282c0,0,ffff80002a284230,0) at fork1+0x3f6 sys/kern/kern_fork.c:-1
syscall(ffff80002a2842e0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80002a2842e0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7ef3e0cf87f0, count: 4
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{0}> 
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
*cpu0: amap_pp_adjref: negative reference count
ddb{0}> show kasan
No such command
ddb{0}> trace
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438
panic(ffffffff83525295) at panic+0x1e5 sys/kern/subr_prf.c:198
amap_pp_adjref(fffff780777f1790,0,1,1) at amap_pp_adjref+0x74c sys/uvm/uvm_amap.c:880
amap_adjref_anons(fffff780777f1790,0,1,1,0) at amap_adjref_anons+0x22d sys/uvm/uvm_amap.c:1298
uvm_mapent_clone(fffff7806bde0028,c91fc250000,1000,0,1,7,61756f43285a9b73,fffff7806e3e8aa8,ffff80002a284058,fffff7806bde0028) at uvm_mapent_clone+0x17e sys/uvm/uvm_map.c:3503
uvm_mapent_forkcopy(1,fffff7806bde0028,fffff7800b1cb3d0,fffff7806e3e8aa8,ffff80002a284058) at uvm_mapent_forkcopy+0x6f sys/uvm/uvm_map.c:3573
uvmspace_fork(ffff800045ff3500) at uvmspace_fork+0x299 sys/uvm/uvm_map.c:3776
process_new(ffff800045fe2028,ffff800045ff3500,1) at process_new+0x583 sys/kern/kern_fork.c:282
fork1(ffff80002a222010,1,ffffffff811282c0,0,ffff80002a284230,0) at fork1+0x3f6 sys/kern/kern_fork.c:-1
syscall(ffff80002a2842e0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80002a2842e0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7ef3e0cf87f0, count: -11
ddb{0}> show registers
rdi                                0
rsi                              0x1
rbp               0xffff80002a283d20
rbx               0xffffffff839dee07    cpu_info_full_primary+0x2e07
rdx                                0
rcx               0xffff80002a222010
rax               0xffffffff839ddff0    cpu_info_full_primary+0x1ff0
r8                 0x101010101010101
r9                0x8080808080808080
r10               0x1af1c2b2a3b65f8b
r11               0xed9ccda832ce297f
r12               0xffffffff839dec08    cpu_info_full_primary+0x2c08
r13                                0
r14                                0
r15                              0x1
rip               0xffffffff82f21205    db_enter+0x25
cs                               0x8
rflags                         0x246
rsp               0xffff80002a283d10
ss                              0x10
db_enter+0x25:  addq    $0x8,%rsp
ddb{0}> show proc
PROC (sshd) tid=283632 pid=34535 tcnt=1 stat=onproc
    flags process=0 proc=0
    runpri=50, usrpri=86, slppri=24, nice=20
    wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0
    forw=0xffffffffffffffff, list=0xffff80002a223a00,0xffff800045ffc7e0
    process=0xffff800045ff3500 user=0xffff80002a27f000, vmspace=0xfffff7800b1cb3d0
    estcpu=36, cpticks=12181, pctcpu=20.48, user=1, sys=12169, intr=11
ddb{0}> ps
   PID     TID   PPID   UID  S      PRLAGS     PFLAGS WAIT      COMMAND
 89914   28202  51829 32767  2        0x10          0           syz-executor
 89914  300481  51829 32767  2        0x10  0x4000c80           syz-executor
 65730  120722  29027 32767  2        0x11          0           syz-executor
 65730  319174  29027 32767  3        0x11  0x4000080 fsleep    syz-executor
 47835  116196  17860 32767  2        0x10          0           syz-executor
 47835  260436  17860 32767  7        0x10  0x4000000           syz-executor
 87930  482740  38497 32767  2        0x10      0xc80           syz-executor
 87930  378726  38497 32767  2        0x10  0x4000c80           syz-executor
 87930  192977  38497 32767  3        0x10  0x4000080 fsleep    syz-executor
 87930  358944  38497 32767  3        0x10  0x4000080 fsleep    syz-executor
  5180  507715  96966 32767  3        0x10       0x80 piperd    syz-executor
 51829  403529  14009 32767  2        0x10      0xc80           syz-executor
 74883  181576  72223 32767  3        0x10       0x80 piperd    syz-executor
 17860  436795  67670 32767  2        0x10      0xc80           syz-executor
 38497  433179  38941 32767  2        0x10      0xc80           syz-executor
 28166  241782  53137 32767  2        0x10      0xc80           syz-executor
 29027  491369  53162 32767  2        0x10      0xc80           syz-executor
 96966  219806  60669     0  3         0x2       0x80 wait      syz-executor
 14009  391087  60669     0  3         0x2       0x80 wait      syz-executor
 72223  461661  60669     0  3         0x2       0x80 wait      syz-executor
 53162  405313  60669     0  3         0x2       0x80 wait      syz-executor
 53137  177775  60669     0  3         0x2       0x80 wait      syz-executor
 67670  218639  60669     0  3         0x2       0x80 wait      syz-executor
 38941  406854  60669     0  3         0x2       0x80 wait      syz-executor
 60669  473924  90171     0  2         0x2      0xc80           syz-executor
 90171  407680  14127     0  3    0x100002       0x88 sigsusp   ksh
 14127  182360   6852     0  3        0x10       0x88 kqread    sshd-session
  6852  339815  34535     0  3        0x12       0x80 kqread    sshd-session
 43624   59080      1     0  3    0x100003       0x80 ttyin     getty
*34535  283632      1     0  7           0          0           sshd
 55899  244178  74039    73  2   0x1100010      0xc80           syslogd
 74039  368889      1     0  3    0x100002       0x80 sbwait    syslogd
 49073  514073      1     0  3    0x100000       0x80 kqread    resolvd
 23192  324869   1154    77  3    0x100012       0x80 kqread    dhcpleased
 61594  361355   1154    77  3    0x100012       0x80 kqread    dhcpleased
  1154  417740      1     0  3           0       0x80 kqread    dhcpleased
 40728   12149      0     0  2     0x14000      0x200           smr
 41608  450091      0     0  3     0x14000      0x200 pgzero    zerothread
 77282  504273      0     0  3     0x14000      0x200 aiodoned  aiodoned
 91019  378587      0     0  2     0x14000      0xe00           update
 46619  177367      0     0  3     0x14000      0x200 cleaner   cleaner
 56611  293163      0     0  3     0x14000      0x200 reaper    reaper
 41817  107905      0     0  3     0x14000      0x200 pgdaemon  pagedaemon
 19026  158287      0     0  3     0x14000      0x200 bored     viomb
 62224  364727      0     0  3     0x14000 0x40000200 acpi0     acpi0
 27974  326877      0     0  3     0x14000 0x40000200           idle1
 30052  312672      0     0  3     0x14000      0x200 bored     softnet1
 64234  387636      0     0  2     0x14000      0x200           softnet0
 28406  412893      0     0  3     0x14000      0x200 smrbar    systqmp
 90336  302539      0     0  3     0x14000      0x200 bored     systq
 35134  405212      0     0  2     0x14000      0x200           softclockmp
 76040  347905      0     0  3     0x14000 0x40000200 tmoslp    softclock
 15173  297094      0     0  3     0x14000 0x40000200           idle0
     1  243347      0     0  3         0x2       0x80 wait      init
     0       0     -1     0  3     0x10000      0x200 scheduler swapper
ddb{0}> show all locks
Process 47835 (syz-executor) thread 0xffff80002a24c7e0 (260436)
exclusive rrwlock inode r = 0 (0xfffff78075a497b8)
#0  witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0  witness_lock+0x5f1 sys/kern/subr_witness.c:1160
#1  rw_do_enter_write+0x419 sys/kern/kern_rwlock.c:320
#2  rrw_enter+0xc6 sys/kern/kern_rwlock.c:621
#3  VOP_LOCK+0xbd sys/kern/vfs_vops.c:527
#4  vn_lock+0xa4 sys/kern/vfs_vnops.c:576
#5  vn_write+0x18f sys/kern/vfs_vnops.c:411
#6  dofilewritev+0x2bd sys/kern/sys_generic.c:384
#7  sys_write+0xa2 sys/kern/sys_generic.c:300
#8  syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline]
#8  syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783
#9  Xsyscall+0x128
Process 34535 (sshd) thread 0xffff80002a222010 (283632)
exclusive rwlock amaplk r = 0 (0xfffff7806f8e3cd0)
#0  witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0  witness_lock+0x5f1 sys/kern/subr_witness.c:1160
#1  rw_do_enter_write+0x419 sys/kern/kern_rwlock.c:320
#2  amap_ref+0x3c sys/uvm/uvm_amap.c:1312
#3  uvm_mapent_clone+0x17e sys/uvm/uvm_map.c:3503
#4  uvm_mapent_forkcopy+0x6f sys/uvm/uvm_map.c:3573
#5  uvmspace_fork+0x299 sys/uvm/uvm_map.c:3776
#6  process_new+0x583 sys/kern/kern_fork.c:282
#7  fork1+0x3f6 sys/kern/kern_fork.c:-1
#8  syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline]
#8  syscall+0xb17 sys/arch/amd64/amd64/trap.c:783
#9  Xsyscall+0x128
exclusive rwlock vmmaplk r = 0 (0xfffff7806bde0128)
#0  witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0  witness_lock+0x5f1 sys/kern/subr_witness.c:1160
#1  rw_do_enter_write+0x419 sys/kern/kern_rwlock.c:320
#2  vm_map_lock_ln+0x12e sys/uvm/uvm_map.c:5170
#3  uvmspace_fork+0x12b sys/uvm/uvm_map.c:3752
#4  process_new+0x583 sys/kern/kern_fork.c:282
#5  fork1+0x3f6 sys/kern/kern_fork.c:-1
#6  syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline]
#6  syscall+0xb17 sys/arch/amd64/amd64/trap.c:783
#7  Xsyscall+0x128
exclusive rwlock vmmaplk r = 0 (0xfffff7800b1cb4d0)
#0  witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0  witness_lock+0x5f1 sys/kern/subr_witness.c:1160
#1  rw_do_enter_write+0x419 sys/kern/kern_rwlock.c:320
#2  vm_map_lock_ln+0x12e sys/uvm/uvm_map.c:5170
#3  uvmspace_fork+0x44 sys/uvm/uvm_map.c:3743
#4  process_new+0x583 sys/kern/kern_fork.c:282
#5  fork1+0x3f6 sys/kern/kern_fork.c:-1
#6  syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline]
#6  syscall+0xb17 sys/arch/amd64/amd64/trap.c:783
#7  Xsyscall+0x128
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83ab4d00)
#0  witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0  witness_lock+0x5f1 sys/kern/subr_witness.c:1160
#1  syscall+0xaf4 mi_syscall sys/sys/syscall_mi.h:175 [inline]
#1  syscall+0xaf4 sys/arch/amd64/amd64/trap.c:783
#2  Xsyscall+0x128
Process 28406 (systqmp) thread 0xffff800045ffea60 (412893)
shared rwlock systqmp r = 0 (0xffffffff839c4108)
#0  witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline]
#0  witness_lock+0x5f1 sys/kern/subr_witness.c:1160
#1  taskq_thread+0x12a sys/kern/kern_task.c:442
#2  proc_trampoline+0x10
ddb{0}> show malloc
           Type InUse  MemUse  HighUse   Limit  Requests Type Lim
         devbuf 11049  12016K   12034K 166960K     12143        0
            pcb    17     12K      12K 166960K        17        0
         rtable   215      6K       7K 166960K       351        0
             pf    29     16K      16K 166960K        31        0
         ifaddr    38      6K       7K 166960K        44        0
        ifgroup    46      2K       2K 166960K        50        0
         sysctl     4      1K       9K 166960K         8        0
       counters    68     36K      37K 166960K        70        0
       ioctlops     0      0K       2K 166960K        34        0
            iov     0      0K       8K 166960K         4        0
          mount     1      1K       1K 166960K         1        0
            log     0      0K       0K 166960K         4        0
         vnodes  1288     81K      81K 166960K      1425        0
      UFS quota     1     32K      32K 166960K         1        0
      UFS mount     5     36K      36K 166960K         5        0
            shm     2      1K       5K 166960K         4        0
         VM map     2      1K       1K 166960K         2        0
            sem     5      0K       0K 166960K         6        0
        dirhash    12      2K       2K 166960K        12        0
           ACPI  1734    201K     291K 166960K     11964        0
      file desc    21     77K     125K 166960K       255        0
           proc    58     99K     147K 166960K       511        0
        subproc    63      3K       4K 166960K       135        0
    NFS srvsock     1      0K       0K 166960K         1        0
     NFS daemon     1     16K      16K 166960K         1        0
    ip_moptions     0      0K       0K 166960K        18        0
       in_multi    88      5K       6K 166960K       108        0
    ether_multi     1      0K       0K 166960K         1        0
            mrt     0      0K       0K 166960K         5        0
    ISOFS mount     1     32K      32K 166960K         1        0
  MSDOSFS mount     1     16K      16K 166960K         1        0
           ttys    73    334K     334K 166960K        73        0
           exec     0      0K       1K 166960K       374        0
   fusefs mount     1     32K      32K 166960K         1        0
            tdb     3      0K       0K 166960K         3        0
        VM swap     8     62K      64K 166960K        10        0
       UVM amap   230    159K     185K 166960K      3731        0
       UVM aobj     6      2K       4K 166960K         7        0
     pinsyscall    44     88K     110K 166960K      1357        0
        memdesc     1      4K       4K 166960K         1        0
    crypto data     1      1K       1K 166960K         1        0
    ip6_options     1      0K       0K 166960K         8        0
            NDP    10      0K       2K 166960K        27        0
           temp    35   9119K    9183K 166960K      4008        0
         kqueue    17     26K      30K 166960K        65        0
      SYN cache     2     16K      16K 166960K         2        0
ddb{0}> show all pools
Name      Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache    128       28    0        0     1     0     1     1     0     8    0
rtpcb      120       36    0       33     1     0     1     1     0     8    0
rtentry    176      112    0       13     6     0     6     6     0     8    1
unpcb      144      167    0      148     2     0     2     2     0     8    1
syncache   336        9    0        9     1     0     1     1     0     8    1
tcpqe       32        1    0        1     1     0     1     1     0     8    1
tcpcb      736       51    0       43     2     0     2     2     0     8    1
arp        136       18    0        2     1     0     1     1     0     8    0
inpcb      328      216    0      204     7     0     7     7     0     8    6
ip6q        72        1    0        0     1     0     1     1     0     8    0
ip6af       40        1    0        0     1     0     1     1     0     8    0
nd6        152       25    0        4     1     0     1     1     0     8    0
kcovpl      48       15    0        8     1     0     1     1     0     8    0
art_heap8  4096       1    0        0     1     0     1     1     0     8    0
art_heap4  256      455    0       46    29     0    29    29     0     8    3
art_table   40      456    0       46     5     0     5     5     0     8    0
art_node    32      112    0       21     1     0     1     1     0     8    0
sysvmsgpl   40        6    0        2     1     0     1     1     0     8    0
semapl      72        4    0        1     1     0     1     1     0     8    0
shmpl      112        4    0        1     1     0     1     1     0     8    0
dirhash    1024      17    0        0     3     0     3     3     0     8    0
dino2pl    256     1691    0      219    93     0    93    93     0     8    0
ffsino     296     1691    0      219   114     0   114   114     0     8    0
nchpl      144     2015    0      314    64     0    64    64     0     8    0
vnodes     216     1835    0        0   102     0   102   102     0     8    0
namei      1024    6714    0     6714     2     0     2     2     0     8    2
percpumem   16       51    0        1     1     0     1     1     0     8    0
kstatmem   264       25    0        2     2     0     2     2     0     8    0
scxspl     216     7113    0     7113    10     2     8     8     1     8    8
plimitpl   152      100    0       77     2     0     2     2     0     8    1
sigapl     424      537    0      487     7     0     7     7     0     8    0
knotepl    120      511    0        0    16     0    16    16     0     8    0
kqueuepl   224       61    0       48     1     0     1     1     0     8    0
pipepl     344      156    0      128     3     0     3     3     0     8    0
fdescpl    528      521    0      487     4     0     4     4     0     8    0
filepl     160     2513    0     2299    13     0    13    13     0     8    3
lockfpl    104       44    0       41     1     0     1     1     0     8    0
lockfspl    48       16    0       13     1     0     1     1     0     8    0
sessionpl  144       40    0       24     1     0     1     1     0     8    0
pgrppl      48       58    0       35     1     0     1     1     0     8    0
ucredpl    104      254    0      236     1     0     1     1     0     8    0
zombiepl   144      488    0      487     1     0     1     1     0     8    0
processpl  1232     537    0      487     5     0     5     5     0     8    0
procpl     664      687    0      631     7     0     7     7     0     8    1
sockpl     752      419    0      384    11     0    11    11     0     8    7
mcl64k     65536      3    0        0     1     0     1     1     0     8    0
mcl16k     16384      2    0        0     1     0     1     1     0     8    0
mcl8k      8192       3    0        0     1     0     1     1     0     8    0
mcl4k      4096     108    0        0    14     0    14    14     0     8    0
mcl2k      2048      17    0        0     3     0     3     3     0     8    0
mextrefs    64       18    0        0     1     0     1     1     0     8    0
mtagpl      96        2    0        0     1     0     1     1     0     8    0
mbufpl     256     1192    0        0    75     0    75    75     0     8    0
bufpl      272     2384    0      102   153     0   153   153     0     8    0
anonpl      32     3721    0        0    30     0    30    30     0   247    0
amapchunkpl 152   10822    0    10322    30     0    30    30     0   158    6
amappl16   200     2043    0     2020     5     2     3     5     0     8    1
amappl15   192       10    0       10     1     1     0     1     0     8    0
amappl14   184      405    0      404     1     0     1     1     0     8    0
amappl13   176      122    0      112     1     0     1     1     0     8    0
amappl12   168      763    0      731     2     0     2     2     0     8    0
amappl11   160        2    0        2     1     1     0     1     0     8    0
amappl10   152       64    0       54     1     0     1     1     0     8    0
amappl9    144      280    0      280     1     1     0     1     0     8    0
amappl8    136       87    0       86     1     0     1     1     0     8    0
amappl7    128      157    0      146     1     0     1     1     0     8    0
amappl6    120      150    0      149     1     0     1     1     0     8    0
amappl5    112       98    0       91     1     0     1     1     0     8    0
amappl4    104      269    0      253     1     0     1     1     0     8    0
amappl3     96     1891    0     1796     4     1     3     3     0     8    0
amappl2     88      728    0      657     3     0     3     3     0     8    1
amappl1     80    11879    0    11322    18     0    18    18     0     8    2
amappl      88     3011    0     2844     5     0     5     5     0    92    0
uvmvnodes   80      101    0        0     3     0     3     3     0     8    0
dma4096    4096       1    0        1     1     1     0     1     0     8    0
dma1024    1024       1    0        0     1     0     1     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      72        6    0        1     1     0     1     1     0     8    0
uaddrrnd    24      521    0      487     1     0     1     1     0     8    0
uaddrbest   32        2    0        0     1     0     1     1     0     8    0
uaddr       24      521    0      487     1     0     1     1     0     8    0
vmmpekpl   168     6728    0     6687     3     0     3     3     0     8    0
vmmpepl    168    44658    0    42690   105     0   105   105     0   357   13
vmsppl     488      520    0      487     7     1     6     6     0     8    1
rwobjpl     80    16547    0    15629    26     0    26    26     0     8    2
pdppl      4096    1049    0      974   107    26    81    97     0     8    6
pvpl        32    12226    0        0    99     0    99    99     0   265    0
pmappl     256      520    0      487     4     1     3     3     0     8    0
extentpl    40       46    0       28     1     0     1     1     0     8    0
phpool     112      493    0       29    14     0    14    14     0     8    0
ddb{0}> machine ddbcpu 0
Invalid cpu 0
ddb{0}> trace
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438
panic(ffffffff83525295) at panic+0x1e5 sys/kern/subr_prf.c:198
amap_pp_adjref(fffff780777f1790,0,1,1) at amap_pp_adjref+0x74c sys/uvm/uvm_amap.c:880
amap_adjref_anons(fffff780777f1790,0,1,1,0) at amap_adjref_anons+0x22d sys/uvm/uvm_amap.c:1298
uvm_mapent_clone(fffff7806bde0028,c91fc250000,1000,0,1,7,61756f43285a9b73,fffff7806e3e8aa8,ffff80002a284058,fffff7806bde0028) at uvm_mapent_clone+0x17e sys/uvm/uvm_map.c:3503
uvm_mapent_forkcopy(1,fffff7806bde0028,fffff7800b1cb3d0,fffff7806e3e8aa8,ffff80002a284058) at uvm_mapent_forkcopy+0x6f sys/uvm/uvm_map.c:3573
uvmspace_fork(ffff800045ff3500) at uvmspace_fork+0x299 sys/uvm/uvm_map.c:3776
process_new(ffff800045fe2028,ffff800045ff3500,1) at process_new+0x583 sys/kern/kern_fork.c:282
fork1(ffff80002a222010,1,ffffffff811282c0,0,ffff80002a284230,0) at fork1+0x3f6 sys/kern/kern_fork.c:-1
syscall(ffff80002a2842e0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff80002a2842e0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7ef3e0cf87f0, count: -11
ddb{0}> machine ddbcpu 1
Stopped at      x86_ipi_db+0x27:        addq    $0x8,%rsp
x86_ipi_db(ffff80002999dff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394
x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27
__sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x54 kd_curproc sys/dev/kcov.c:585 [inline]
__sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x54 sys/dev/kcov.c:153
__mp_lock(ffffffff83ab4500) at __mp_lock+0x1a3 __mp_lock_spin sys/kern/kern_lock.c:142 [inline]
__mp_lock(ffffffff83ab4500) at __mp_lock+0x1a3 sys/kern/kern_lock.c:173
__mp_acquire_count(ffffffff83ab4500,1) at __mp_acquire_count+0x58 sys/kern/kern_lock.c:-1
sleep_finish(ffffffffffffffff,1) at sleep_finish+0x2d8 sys/kern/kern_synch.c:369
biowait(fffff7806244fde0) at biowait+0xc6 sys/kern/vfs_bio.c:1110
bwrite(fffff7806244fde0) at bwrite+0x359 sys/kern/vfs_bio.c:625
ffs_write(ffff800035bd2610) at ffs_write+0x810 sys/ufs/ffs/ffs_vnops.c:377
VOP_WRITE(fffff78076854b48,ffff800035bd27c8,7,fffff780097fd5b0) at VOP_WRITE+0x101 sys/kern/vfs_vops.c:245
vn_write(fffff7806cf56860,ffff800035bd27c8,0) at vn_write+0x1d3 sys/kern/vfs_vnops.c:414
dofilewritev(ffff80002a24c7e0,7,ffff800035bd27c8,0,ffff800035bd2880) at dofilewritev+0x2bd sys/kern/sys_generic.c:384
sys_write(ffff80002a24c7e0,ffff800035bd2930,ffff800035bd2880) at sys_write+0xa2 sys/kern/sys_generic.c:300
end trace frame: 0xffff800035bd2920, count: 0
ddb{1}> trace
x86_ipi_db(ffff80002999dff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394
x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27
__sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x54 kd_curproc sys/dev/kcov.c:585 [inline]
__sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x54 sys/dev/kcov.c:153
__mp_lock(ffffffff83ab4500) at __mp_lock+0x1a3 __mp_lock_spin sys/kern/kern_lock.c:142 [inline]
__mp_lock(ffffffff83ab4500) at __mp_lock+0x1a3 sys/kern/kern_lock.c:173
__mp_acquire_count(ffffffff83ab4500,1) at __mp_acquire_count+0x58 sys/kern/kern_lock.c:-1
sleep_finish(ffffffffffffffff,1) at sleep_finish+0x2d8 sys/kern/kern_synch.c:369
biowait(fffff7806244fde0) at biowait+0xc6 sys/kern/vfs_bio.c:1110
bwrite(fffff7806244fde0) at bwrite+0x359 sys/kern/vfs_bio.c:625
ffs_write(ffff800035bd2610) at ffs_write+0x810 sys/ufs/ffs/ffs_vnops.c:377
VOP_WRITE(fffff78076854b48,ffff800035bd27c8,7,fffff780097fd5b0) at VOP_WRITE+0x101 sys/kern/vfs_vops.c:245
vn_write(fffff7806cf56860,ffff800035bd27c8,0) at vn_write+0x1d3 sys/kern/vfs_vnops.c:414
dofilewritev(ffff80002a24c7e0,7,ffff800035bd27c8,0,ffff800035bd2880) at dofilewritev+0x2bd sys/kern/sys_generic.c:384
sys_write(ffff80002a24c7e0,ffff800035bd2930,ffff800035bd2880) at sys_write+0xa2 sys/kern/sys_generic.c:300
syscall(ffff800035bd2930) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline]
syscall(ffff800035bd2930) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xeaeea1fe220, count: -16

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/11 01:37 openbsd b56428e2942e 508909ea .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-setuid panic: amap_pp_adjref: negative reference count
2026/08/10 15:12 openbsd 8f9ffd180f26 558388e4 .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-setuid panic: amap_pp_adjref: negative reference count
2026/08/06 17:04 openbsd 07df0a216fc9 cc56899a .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-setuid panic: amap_pp_adjref: negative reference count
2026/08/03 17:40 openbsd 8bdaccf9d694 6b7c9f71 .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-setuid panic: amap_pp_adjref: negative reference count
2026/08/01 22:55 openbsd 59ec3ab4d107 e611ffe1 .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-setuid panic: amap_pp_adjref: negative reference count
2026/08/01 10:22 openbsd ec875f0e6c74 e611ffe1 .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-setuid panic: amap_pp_adjref: negative reference count
2026/08/01 02:32 openbsd ec875f0e6c74 e611ffe1 .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-setuid panic: amap_pp_adjref: negative reference count
2026/07/31 17:48 openbsd 6bf809100faf db462e94 .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-setuid panic: amap_pp_adjref: negative reference count
2026/07/30 04:49 openbsd cc5b7dd097c6 2377cd3d .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-setuid panic: amap_pp_adjref: negative reference count
2026/07/29 02:57 openbsd 7c9a09f11f52 19622d9d .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-setuid panic: amap_pp_adjref: negative reference count
2026/07/22 08:09 openbsd e524649e2c66 b561ce9c .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-setuid panic: amap_pp_adjref: negative reference count
2026/07/20 00:10 openbsd 2fc221d2874b 72524a66 .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-setuid panic: amap_pp_adjref: negative reference count
2026/05/30 16:02 openbsd 1e1be23b32e7 cb4e87ff .config console log report [disk image] [bsd.gdb] [kernel image] ci-openbsd-setuid panic: amap_pp_adjref: negative reference count
* Struck through repros no longer work on HEAD.