Re: fstat triggered INVARIANTS panic in memrw()

From: Kris Kennaway <kris_at_obsecurity.org>
Date: Thu, 20 Jan 2005 15:05:26 -0800
On Thu, Jan 20, 2005 at 05:47:57PM -0500, Mark W. Krentel wrote:
> First, let me check that your panic requires three things to trigger:
> (1) heavy load, in your case ports building, (2) INVARIANTS compiled
> into the kernel, and (3) many calls to fstat(1).  Is that right?

I didn't try without INVARIANTS, but it doesn't require heavy load.
In fact I can panic the UP boxes just by running fstat in a loop
(typically panics within a few seconds).  SMP often panics on the first try.

> Also, you're running 6.0-current on an x86 SMP machine? 

I think it also happens on 5.x, but I'm not sure.  I first noticed the
problem some time in early December, but it might be older (I
previously did not run fstat on these machines).

> Can you bound
> the problem between two dates, that is, you compiled kernel/world on
> date X and it was ok, and updated on date Y and it panicked?  Are you
> changing the default kernel address space (3 Gig user and 1 Gig
> kernel) via KVA_PAGES?

Not on all affected machines (i.e. it happens on machines with the
default KVA_PAGES).

> arguments to kernacc() and vm_map_check_protection().  I didn't get a
> panic, but I can confirm that kernacc() is being called with arguments
> that constitute address wrap.  My tests were on a single-CPU P3-933.
> I ran buildworld along with a loop of fstat(1)s, and the address wrap
> happened within seconds.  It required both (1) and (3) above,
> INVARIANTS may be a red herring, I'm not sure.
> 
> How long did it take for your machine to panic?  Mine didn't panic,
> but maybe I didn't run the test long enough, or maybe I don't have
> enough open files.
> 
> Anyway, try this patch, see if it avoids the panic for you.
> 
> --Mark

Thanks, it sounds promising!

Kris

Received on Thu Jan 20 2005 - 22:05:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:26 UTC