From owner-freebsd-current@FreeBSD.ORG Wed Jun 9 15:04:53 2004 Return-Path: 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 413BC16A4CE; Wed, 9 Jun 2004 15:04:53 +0000 (GMT) Received: from hetzner.co.za (lfw.hetzner.co.za [196.7.18.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE1F543D5A; Wed, 9 Jun 2004 15:04:52 +0000 (GMT) (envelope-from ianf@hetzner.co.za) Received: from localhost ([127.0.0.1]) by hetzner.co.za with esmtp (Exim 3.36 #1) id 1BY4dE-000AOa-00; Wed, 09 Jun 2004 17:04:48 +0200 To: John Baldwin From: Ian FREISLICH In-Reply-To: Message from John Baldwin of "Wed, 09 Jun 2004 10:27:43 -0400." <200406091027.43054.jhb@FreeBSD.org> Date: Wed, 09 Jun 2004 17:04:48 +0200 Sender: ianf@hetzner.co.za Message-Id: cc: freebsd-current@FreeBSD.org Subject: Re: panic: spin lock held too long (reasonable load) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Wed, 09 Jun 2004 15:04:53 -0000 > On Wednesday 09 June 2004 09:25 am, Ian FREISLICH wrote: > > Hi > > > > I got this about an hour ago, maybe 10 minutes into a 'make world > > -j8' on my SMP system. I'll reproduce the panic and drop into the > > debugger if possible if someone is willing to tell me what information > > appart from this backtrace will be helpful. > > Unfortunately this is a known deadlock that can happen with swapping that > there isn't an easy fix for. If you want a quick hack, try commenting out > the 'wakeup(&proc0)' line in setrunnable(). It might take a bit longer for > the kernel to swap processes back in but should avoid the deadlock. You mean like this? diff -u -d -r1.249 kern_synch.c --- kern_synch.c 7 Jun 2004 09:35:00 -0000 1.249 +++ kern_synch.c 9 Jun 2004 15:03:09 -0000 @@ -402,7 +402,14 @@ if ((p->p_sflag & PS_INMEM) == 0) { if ((p->p_sflag & PS_SWAPPINGIN) == 0) { p->p_sflag |= PS_SWAPINREQ; - wakeup(&proc0); + /* + * XXX Nasty, Tricksy hack!!!! + * Perhaps avoid a deadlock at the expense of swap + * performance. + */ + /* + * wakeup(&proc0); + */ } } else sched_wakeup(td); Ian -- Ian Freislich