Re: sys/uvm: fix uao_dropswap() index typo

Kirill A. Korinsky <[email protected]> Wed, 22 Jul 2026 22:57:36 +0200
Newsgroups gmane.os.openbsd.tech
Message-ID <[email protected]>
On Wed, 22 Jul 2026 22:49:58 +0200,
Kirill A. Korinsky <[email protected]> wrote:
> 
> On Wed, 22 Jul 2026 22:28:23 +0200,
> Mark Kettenis <[email protected]> wrote:
> > 
> > > Date: Wed, 22 Jul 2026 20:48:47 +0200
> > > From: Kirill A. Korinsky <[email protected]>
> > > 
> > > tech@,
> > > 
> > > the loop variable indexes the current pgs[] batch, not the page within the
> > > object. Pass the fetched page's object offset to uao_dropswap(), as the
> > > other resident page callers do.
> > > 
> > > Thoughts? Ok?
> > 
> > Good find.  Trying to think about what the consequences would be of
> > this bug.  I guess bad things may happen if we partially wire down an
> > object and then unwire it again.  Some other pages in the object will
> > get their swap dropped if they're swapped out.
> > 
> > Probably doesn't happen a lot.  Possibly cuases corruption of GPU
> > memory?
> >
> 
> Not sure that it is limited only to GPU memory.
> 
> My daily driver had random crashed processes when almost all ram was used
> and machine started to touch swap.
> 
> Crashes was SIGABRT libc’s alloc. A few times it kills initd by the same
> reason.
> 
> As soon as I fixed it, machine seems much stabled.
> 

The last and cleanest for investigation .core was from crashed pcscd and if
I recall right it was calloc -> validate_junk -> abort()

Unfortently that core was in /tmp and I rebooted machine, so it lost.

-- 
wbr, Kirill