From owner-freebsd-current@FreeBSD.ORG Wed Aug 18 02:10:24 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 8679516A4CE; Wed, 18 Aug 2004 02:10:24 +0000 (GMT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 368E343D1D; Wed, 18 Aug 2004 02:10:24 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.11/8.12.11) with ESMTP id i7I2AFbg007683; Tue, 17 Aug 2004 19:10:18 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200408180210.i7I2AFbg007683@gw.catspoiler.org> Date: Tue, 17 Aug 2004 19:10:15 -0700 (PDT) From: Don Lewis To: grog@FreeBSD.org In-Reply-To: <20040817013525.GF81257@wantadilla.lemis.com> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: mb@imp.ch cc: FreeBSD-current@FreeBSD.org cc: radek@raadradd.com Subject: Re: Current method of dumping a processor? 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, 18 Aug 2004 02:10:24 -0000 On 17 Aug, Greg 'groggy' Lehey wrote: > On Friday, 13 August 2004 at 1:07:41 +0200, Radek Kozlowski wrote: >> On Fri, Aug 13, 2004 at 07:28:59AM +0930, Greg 'groggy' Lehey wrote: >>> I've tried it on kernels built in January, May and yesterday. In each >>> case, I did: >>> >>> dumpon /dev/ad0s2b >>> >>> (for appropriate values of ad0s2b). All kernels include ddb. I >>> entered the debugger with ctrl-alt-esc and entered "panic". The >>> kernel from January dumps just fine. The kernels from May and August >>> hang. >>> >>> Am I doing something wrong? Has something else changed? Does anybody >>> else have this problem? >> >> I also had this problem back in June when I was trying to get a crash >> dump, but nobody replied (see >> http://lists.freebsd.org/pipermail/freebsd-current/2004-June/029434.html). >> I then learnt that I can use call doadump in ddb and have been using >> that since then. > > Thanks. Yes, this seems to work. Are we agreed that it's a bug that > the 'panic' command just hangs? Try the patch below. I suspect that syncer_shutdown() is the most likely culprit, but a number of the other shutdown_pre_sync handlers could potentially hang. They should probably be tweaked to only execute if they can run without blocking. Index: sys/kern/vfs_subr.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_subr.c,v retrieving revision 1.522 diff -u -r1.522 vfs_subr.c --- sys/kern/vfs_subr.c 16 Aug 2004 08:33:37 -0000 1.522 +++ sys/kern/vfs_subr.c 18 Aug 2004 01:54:56 -0000 @@ -60,6 +60,7 @@ #include #include #include +#include #include #include #include @@ -1742,6 +1743,8 @@ { struct thread *td; + if (howto & RB_NOSYNC) + return; td = FIRST_THREAD_IN_PROC(updateproc); sleepq_remove(td, &lbolt); mtx_lock(&sync_mtx);