Re: reboot or shutdown not working with -current

From: John Baldwin (jhb_at_FreeBSD.org)
Date: 06/04/04

  • Next message: Paul Seniura: "buildworld failing with "make: don't know how to make @/dev/pccard/pccarddevs.h""
    To: freebsd-current@FreeBSD.org
    Date: Fri, 4 Jun 2004 11:08:33 -0400
    
    

    On Friday 04 June 2004 10:51 am, Kenneth Culver wrote:
    > Quoting John Baldwin <jhb@FreeBSD.org>:
    > > On Thursday 03 June 2004 11:04 am, Dan Nelson wrote:
    > >> In the last episode (Jun 03), David Gurvich said:
    > >> > Recent cvsup has caused system to hang on reboot or shutdown,
    > >> > occasionally hangs on startup with detection of optical drive on 2nd
    > >> > ide. Anyone know how to get system logs in this situation?
    > >> > Motherboard is ASUS A7N266-VM. System worked reasonably with APIC
    > >> > turned off 5/26/2004.
    > >>
    > >> Back out sys/i386/i386/intr_machdep.c rev 1.6.
    > >
    > > Or for the real fix, try this:
    > >
    > > Index: acpi_cpu.c
    > > ===================================================================
    > > RCS file: /usr/cvs/src/sys/dev/acpica/acpi_cpu.c,v
    > > retrieving revision 1.36
    > > diff -u -r1.36 acpi_cpu.c
    > > --- acpi_cpu.c 7 May 2004 05:22:37 -0000 1.36
    > > +++ acpi_cpu.c 4 Jun 2004 14:44:33 -0000
    > > @@ -376,8 +376,7 @@
    > >
    > > /* Wait for all processors to exit acpi_cpu_idle(). */
    > > smp_rendezvous(NULL, NULL, NULL, NULL);
    > > - while (cpu_idle_busy > 0)
    > > - DELAY(1);
    > > + DELAY(1);
    > >
    > > return_VALUE (0);
    > > }
    > >
    > >
    > > --
    > > John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
    > > "Power Users Use the Power to Serve" = http://www.FreeBSD.org
    > > _______________________________________________
    > > freebsd-current@freebsd.org mailing list
    > > http://lists.freebsd.org/mailman/listinfo/freebsd-current
    > > To unsubscribe, send any mail to
    > > "freebsd-current-unsubscribe@freebsd.org"
    >
    > You know that the reboot problems go away when
    > /usr/src/sys/i386/i386/intr_machdep.c is reverted from 1.16 to 1.15 right?

    Yes, because the real bug is above. Disabling interrupt preemption just masks
    it. The gory details are that almost all (in fact on UP, 100%) of context
    switches away from the idlethread are due to interrupts. When interrupt
    preemption is enabled, this means that idle threads are switched away from
    before they've had a chance to decrement the cpu_idle_busy counter in
    acpi_cpu_idle(). Thus, when the thread doing shutdown gets to this loop, it
    never terminates because the idlethread of the CPU executing the shutdown
    request never gets a chance to go back and decrement its idle_busy count. In
    truth, you don't actually need the loop, once you do the rendezvous, any
    other CPUs that are idle will wake up, exit acpi_cpu_idle() and re-enter
    after finding no runnable jobs. I tracked this down after a couple of hours
    on Wednesday but was very busy with ${REALJOB} work yesterday and haven't had
    a chance to send an e-mail out about this.

    -- 
    John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
    "Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
    

  • Next message: Paul Seniura: "buildworld failing with "make: don't know how to make @/dev/pccard/pccarddevs.h""

    Relevant Pages

    • How to diagnose kernel panic?
      ... Fatal exception in interrupt ... The replacement machine ... software to hardware RAID1. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: dual layered DVDs vs single layer etc....
      ... Steve McIntyre wrote: ... there was a chance that we might make sarge fit on a single DL ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: Was: More ULE bugs fixed. Is: Mouse problem?
      ... And it's an absolute truth (just tested back and ... > the new interrupt handler. ... influence. ... To unsubscribe, ...
      (freebsd-current)
    • Re: Wrong CD? testing official snapshot i386 binary-2
      ... "Far and away the best prize that life has to offer is the chance to ... work hard at work worth doing." ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
      (Debian-User)
    • Re: how to build from _modified_ source package
      ... patches) and build in one step, not giving a chance to make ... local edits. ... to have readline support, history support in gnuplot. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)