From owner-freebsd-current@FreeBSD.ORG Tue Dec 27 17:31:58 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 160F216A41F; Tue, 27 Dec 2005 17:31:58 +0000 (GMT) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8B1743D5F; Tue, 27 Dec 2005 17:31:46 +0000 (GMT) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4]) by freebsd.czest.pl (8.12.10/8.12.9) with ESMTP id jBRHYbPx053582; Tue, 27 Dec 2005 17:34:39 GMT (envelope-from dunstan@freebsd.czest.pl) Received: (from dunstan@localhost) by freebsd.czest.pl (8.13.4/8.12.9/Submit) id jBRHYahM053581; Tue, 27 Dec 2005 17:34:36 GMT (envelope-from dunstan) Date: Tue, 27 Dec 2005 17:34:35 +0000 From: "Wojciech A. Koszek" To: John Baldwin Message-ID: <20051227173434.GA53513@FreeBSD.czest.pl> References: <20051221031526.31ABC290@mx2.synetsystems.com> <200512211111.44268.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <200512211111.44268.jhb@freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: rwatson@freebsd.org, freebsd-current@freebsd.org, Richard Todd Subject: Re: Bug in latest rev kern_acct.c: panic: Trying sleep, but thread marked as sleeping prohibited X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Dec 2005 17:31:58 -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@FreeBSD.czest.pl