Re: boot() called on cpu #1 - hang

2001-09-10 Thread Michael Class


On Mon, 10 Sep 2001 [EMAIL PROTECTED] 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: boot() called on cpu #1 - hang

2001-09-09 Thread Michael Class

Hello Tor,

thank you for your quick response, unfortunately your patch did
not fix the problem.

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.

Michael


On Sun, 9 Sep 2001 [EMAIL PROTECTED] wrote:

> > Hello,
> >
> > on a 5.0-current i386-SMP system of today I am still getting on about
> > every second reboot the message:
> >
> > boot() called on cpu #1
> > W
>
> Try applying the enclosed patch.
>
> - Tor Egge
>
>
>

-
michael class, viktor-renner str. 39, 72074 tuebingen, frg
E-Mail: [EMAIL PROTECTED]
 Phone: +49 7031 14-3707 (work) +49 7071 81950 (private)
-


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: boot() called on cpu #1 - hang

2001-09-08 Thread Tor . Egge

> Hello,
> 
> on a 5.0-current i386-SMP system of today I am still getting on about
> every second reboot the message:
> 
> boot() called on cpu #1
> W

Try applying the enclosed patch.

- Tor Egge




Index: vm_machdep.c
===
RCS file: /home/ncvs/src/sys/i386/i386/vm_machdep.c,v
retrieving revision 1.169
diff -u -r1.169 vm_machdep.c
--- vm_machdep.c4 Sep 2001 08:36:46 -   1.169
+++ vm_machdep.c4 Sep 2001 19:58:38 -
@@ -424,8 +433,13 @@
 {
 
cpu_reset_proxy_active = 1;
+   wbinvd();
while (cpu_reset_proxy_active == 1)
;/* Wait for other cpu to see that we've started */
+   cpu_reset_proxy_active = 3;
+   wbinvd();
+   while (cpu_reset_proxy_active == 3)
+   ;  /* Wait for other cpu to enable interrupts */
stop_cpus((1<