Re: Bug in latest rev kern_acct.c: panic: Trying sleep, but thread marked as sleeping prohibited

From: Wojciech A. Koszek <dunstan_at_freebsd.czest.pl>
Date: Tue, 27 Dec 2005 17:34:35 +0000
On Wed, Dec 21, 2005 at 11:11:43AM -0500, John Baldwin wrote:
> On Tuesday 20 December 2005 09:18 pm, Richard Todd wrote:
> > I've been getting this panic a good bit recently after updating -current
> > sources a couple days ago.  The panic occurs in the acctwatch() callout
> > routine run from the clock ithread, apparently when it tries to sleep
> > on a lock (which is, I gather, verboten in ithreads.)   The panics seemed
> > to occur randomly but, on reflection, always occured when
> >   1) there was a good bit of system activity and
> >   2) I had just done something to allocate or free enough space on /usr to
> >      cause accounting to be either suspended or resumed.
> > and thus would cause the acctwatch() routine to have to do something.
> > "make clean; make" in a big port seemed to be fairly effective in
> > triggering the bug. :-)
> >
> > My previous kernel, which dated from Oct 24, didn't have this
> > problem, which helps point suspicion at the latest rev of kern_acct.c
> > (rev 1.76, date: 2005/11/12 10:45:13) which involved a bunch of changes
> > in the lock handling of kernel accounting.
> 
> acctwatch() probably isn't a good thing to do from a callout since it wants to 
> do VOPs and such.  Probably the easiest fix is to stick acctwatch() in its 
> own kthread.

I think I didn't break current behaviour. Patch is here:

http://freebsd.czest.pl/dunstan/FreeBSD/kern_acct.0.patch

Richard, could you try to repeat your problem with my patch?

-- 
* Wojciech A. Koszek && dunstan_at_FreeBSD.czest.pl
Received on Tue Dec 27 2005 - 16:31:58 UTC

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