From owner-freebsd-current Mon Sep 10 23:48: 7 2001 Delivered-To: freebsd-current@freebsd.org Received: from bbnmg1.net.external.hp.com (bbnmg1.net.external.hp.com [192.6.76.73]) by hub.freebsd.org (Postfix) with ESMTP id 0A6C537B408 for ; Mon, 10 Sep 2001 23:47:48 -0700 (PDT) Received: from hpbbn.bbn.hp.com (hpbbn.bbn.hp.com [15.140.169.23]) by bbnmg1.net.external.hp.com (Postfix) with ESMTP id 2E0C225D; Tue, 11 Sep 2001 08:47:33 +0200 (METDST) Received: from tmbbobmc.bbn.hp.com (tmbbobmc.bbn.hp.com [15.136.123.54]) by hpbbn.bbn.hp.com (8.9.3 (PHNE_18979)/8.9.3 SMKit6.0.6) with ESMTP id IAA24562; Tue, 11 Sep 2001 08:47:41 +0200 (METDST) Received: from localhost (michaelc@localhost) by tmbbobmc.bbn.hp.com (8.11.5/8.11.1) with ESMTP id f8B6lXS00874; Tue, 11 Sep 2001 08:47:34 +0200 (CEST) (envelope-from michaelc@tmbbobmc.bbn.hp.com) Date: Tue, 11 Sep 2001 08:47:33 +0200 (CEST) From: Michael Class Reply-To: To: Cc: Subject: Re: boot() called on cpu #1 - hang In-Reply-To: <200109100456.GAA57477@midten.fast.no> Message-ID: <20010911084119.G809-100000@tmbbobmc.bbn.hp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 10 Sep 2001 Tor.Egge@fast.no wrote: > > Hello Tor, > > > > thank you for your quick response, unfortunately your patch did > > not fix the problem. > > > Your machine seems to hang too early for the patch to have any effect. > (the patch affects a hang that occurs after the kernel has printed > cpu reset called on cpu#1 > cpu_reset: Stopping other CPUs > ) > > > I have now tested a little bit more with the following sequence: > > > > boot machine to single-user > > reboot > > > > I did this more then 10 times. It now got stuck every time > > Approx. 8 time with > > > > boot() called on cpu #1 > > W > > > > And 3 times with > > > > boot() called on cpu #0 > > Wa > > > > or > > > > boot() called on cpu #0 > > Waiting (max > > > > It looks to me that the kernel-printf gets somehow stuck. > > > Did you use -O2 when compiling the kernel ? That sometimes causes > strange problems. > > The kernel doesn't appear do do much before printing the > > Waiting (max %d seconds) for system process `%s' to stop > > message in kproc_shutdown. > > > boot() in /usr/src/sys/kern/kern_shutdown.c contains > > #ifdef SMP > if (smp_active) > printf("boot() called on cpu#%d\n", PCPU_GET(cpuid)); > #endif > /* > * Do any callouts that should be done BEFORE syncing the filesystems. > */ > EVENTHANDLER_INVOKE(shutdown_pre_sync, howto); > > > where the EVENTHANDLER_INVOKE macro expands to a lockmgr() call and > invocation of the two events associated with shutdown_pre_sync: > > kproc_shutdown(bufdaemonproc, howto) > kproc_shutdown(updateproc, howto) > > The normal output is > > Waiting (max 60 seconds) for system process `bufdaemon' to stop...stopped > Waiting (max 60 seconds) for system process `syncer' to stop...stopped > > If the lockmgr lock for the event list is damaged, further damage > elsewhere might occur due to the lockmgr call. If a debug printf > before the lockmgr call in EVENTHANDLER_INVOKE() works while a debug > printf after the lockmgr call isn't properly printed, then the > probability for the problem being related to the lockmgr call is > increased (cf. /usr/src/sys/sys/eventhandler.h) > > - Tor Egge > > Hello Tor, I have added a printf right before and after the lockmgr call in the EVENTHANDLER_INVOKE() Macro in /usr/src/sys/sys/eventhandler.h. But both of these printf do work! The output I am getting then is: Boot() called on cpu #1 before lockmgr after lockmgr W What else could I test? Michael To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message