Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Aug 2004 19:10:15 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        grog@FreeBSD.org
Cc:        radek@raadradd.com
Subject:   Re: Current method of dumping a processor?
Message-ID:  <200408180210.i7I2AFbg007683@gw.catspoiler.org>
In-Reply-To: <20040817013525.GF81257@wantadilla.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/malloc.h>
 #include <sys/mount.h>
 #include <sys/namei.h>
+#include <sys/reboot.h>
 #include <sys/sleepqueue.h>
 #include <sys/stat.h>
 #include <sys/sysctl.h>
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408180210.i7I2AFbg007683>