Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jan 2000 17:35:34 +1000
From:      Stephen McKay <syssgm@detir.qld.gov.au>
To:        freebsd-current@freebsd.org
Cc:        syssgm@detir.qld.gov.au
Subject:   Crash from ^T during heavy paging
Message-ID:  <200001100735.RAA51943@nymph.detir.qld.gov.au>

next in thread | raw e-mail | index | archive | help
I'm currently giving 4.0 a thrashing in the best way I know.  I run way too
much stuff and let it page madly all day.  Here's how I killed it:

1) pick a 32MB box
2) make -j20 buildworld
3) lean on ^T and let autorepeat go for it

Soon it dies in calcru() called from ttyinfo().  The stack trace showed
that I caught it part way through a fork().  In calcru(), p->p_stats has
a bad value because it is initialised in vm_fork() sometime *after* the
P_INMEM flag is set, and there are some M_WAITOK mallocs between them.

The problem is that calcru() thinks that P_INMEM means that the proc
structure is fully and accurately populated.  But P_INMEM is one of the
first flags set.

A few places test for p->p_stats == NULL but that doesn't look applicable
since p->p_stats is uninitialised in this case.  Hmm.  I can't see any
use for that test at first glance.

So, calcru() and possibly some other places, are looking at a struct proc
before it's all there.  What's the "proper" way to do it?

Stephen.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001100735.RAA51943>