Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2007 12:56:55 -0500
From:      Guy Helmer <ghelmer@palisadesys.com>
To:        freebsd-stable@freebsd.org
Subject:   Re: 6.2-amd64 Hang at reboot on Supermicro X7DBR-i+
Message-ID:  <45FECEE7.6080107@palisadesys.com>
In-Reply-To: <45FAA837.6060603@palisadesys.com>
References:  <45FAA837.6060603@palisadesys.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Guy Helmer wrote:
> (reposting since this involves 6-stable)
>
> I'm investigating a problem where a pretty much stock 6.2 SMP kernel 
> randomly hangs on multiple Supermicro X7DBR-i+ and X7DBR-8+ systems. 
> The system syncs the filesystems and prints "Uptime: ...", then hangs.
>
> So far, I've narrowed it down to the MOD_SHUTDOWN request to the 
> "rootbus" module. Adding a printf() before and after the
> "device_shutdown(child);" line in subr_bus.c method 
> bus_generic_shutdown() seems to make the problem go away, as does 
> running a kernel with INVARIANTS, WITNESS, and DDB/KDB. I'm trying to 
> reproduce the hang on a plain SMP kernel with just DDB/KDB, but it 
> hasn't hung yet.
>
I'm still not clear as to why, but the following change to 
bus_generic_shutdown() has kept the machines in question successfully 
rebooting continuously without hanging for the past three days:

Index: sys/kern/subr_bus.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/subr_bus.c,v
retrieving revision 1.184.2.4
diff -u -r1.184.2.4 subr_bus.c
--- sys/kern/subr_bus.c	22 Sep 2006 18:49:14 -0000	1.184.2.4
+++ sys/kern/subr_bus.c	16 Mar 2007 17:59:04 -0000
@@ -2913,7 +2913,11 @@
 	device_t child;
 
 	TAILQ_FOREACH(child, &dev->children, link) {
+		//printf(" Calling device_shutdown on child '%s':\n", child->nameunit);
+		DELAY(1000);
 		device_shutdown(child);
+		//printf(" Returned from device_shutdown on child '%s'.\n", child->nameunit);
+		DELAY(1000);
 	}
 
 	return (0);





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