Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Sep 2001 08:47:33 +0200 (CEST)
From:      Michael Class <michaelc@tmbbobmc.bbn.hp.com>
To:        <Tor.Egge@fast.no>
Cc:        <current@freebsd.org>
Subject:   Re: boot() called on cpu #1 - hang
Message-ID:  <20010911084119.G809-100000@tmbbobmc.bbn.hp.com>
In-Reply-To: <200109100456.GAA57477@midten.fast.no>

next in thread | previous in thread | raw e-mail | index | archive | help

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




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