From owner-freebsd-current@FreeBSD.ORG Wed Mar 8 21:31:01 2006 Return-Path: X-Original-To: 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 DF25D16A422; Wed, 8 Mar 2006 21:31:01 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id B97F043D48; Wed, 8 Mar 2006 21:30:45 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k28LUgNq038080; Wed, 8 Mar 2006 16:30:42 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Kris Kennaway Date: Wed, 8 Mar 2006 16:30:29 -0500 User-Agent: KMail/1.9.1 References: <20060308195906.GA51429@xor.obsecurity.org> <200603081504.35845.jhb@freebsd.org> <20060308211501.GA52538@xor.obsecurity.org> In-Reply-To: <20060308211501.GA52538@xor.obsecurity.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200603081630.32617.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1318/Tue Mar 7 15:55:18 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: freebsd-current@freebsd.org, current@freebsd.org Subject: Re: "spin lock sched lock held by 0xc63b7870 for > 5 seconds" at reboot 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: Wed, 08 Mar 2006 21:31:02 -0000 On Wednesday 08 March 2006 16:15, Kris Kennaway wrote: > On Wed, Mar 08, 2006 at 03:04:33PM -0500, John Baldwin wrote: > > On Wednesday 08 March 2006 14:59, Kris Kennaway wrote: > > > i386 SMP server, up-to-date current: > > > > Yes, I know about this one and had sent a workaround to someone > > I thought. I think the real fix is that we need to disable > > interrupts in cpu_reset() (perhaps earlier, our whole SMP > > shutdown sequence needs thought I think, i.e. I think we > > need to IPI all the CPUs during a non-panic shutdown to ask > > them to go idle and block until that happens and then > > disable interrupts and finish the shutdown). > > OK, cool. I'm happy to test the workaround if you can find it. Here's a workaround from scratch: Index: vm_machdep.c =================================================================== RCS file: /usr/cvs/src/sys/i386/i386/vm_machdep.c,v retrieving revision 1.267 diff -u -r1.267 vm_machdep.c --- vm_machdep.c 14 Nov 2005 00:43:44 -0000 1.267 +++ vm_machdep.c 8 Mar 2006 21:29:48 -0000 @@ -528,6 +528,7 @@ cpu_reset_proxy() { + disable_intr(); cpu_reset_proxy_active = 1; while (cpu_reset_proxy_active == 1) ; /* Wait for other cpu to see that we've started */ @@ -552,6 +553,7 @@ #ifdef SMP u_int cnt, map; + disable_intr(); if (smp_active) { map = PCPU_GET(other_cpus) & ~stopped_cpus; if (map != 0) { -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org