Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Dec 2009 08:40:48 -0800
From:      David Wolfskill <david@catwhisker.org>
To:        current@freebsd.org
Subject:   Poweroff (shutdown -p) fails to power off as of r200252?
Message-ID:  <20091208164048.GL1258@albert.catwhisker.org>

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

--p7S+EREVcBHk3zUG
Content-Type: multipart/mixed; boundary="d6d1KVhp94hk3Jrm"
Content-Disposition: inline


--d6d1KVhp94hk3Jrm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I was finally able to replace my old build machine (2x850 MHz PIII) with
a considerably faster one over the weekend, and it's been working well.

This morning, however, it ddn't power off when its daily duties were
ended; this surprised me, as it had done so previously.

Some background: The machine in question maintains a private mirror of
the FreeBSD.org CVS & SVN repositories.  It is also configured (as is my
laptop) to boot from any of the 4 slices on drive 0:

* slice 1: FreeBSD 6.4-STABLE (stable/6)
* slice 2: FreeBSD 7.2-STABLE (stable/7)
* slice 3: FreeBSD 8.0-STABLE (stable/8)
* slice 4: FreeBSD 9.0-CURRENT (head)

(Slices 1 - 3 each contain only 2 partitions; the a partition is for the
root file system; the d partition is for the "usr" file system.  Slice 4
has those, as well as swap on b and /var on f.  I have a couple of other
file systems on the other drive.)

Anyway, today there were (small, in some cases) changes for each
of the 4, so I ended up building each, in the above sequence.
Finally, after rebuilding head, then booting it (both as a reality check
and to delete old libraries), I'm in the habit of running the command:

sudo boot0cfg -s 1 aacd0 && sudo shutdown -p now || sudo shutdown -r now

which I did, then went on about other things ... until I noticed the
"login: " prompt from the machine's serial console.

Hmmm...?

So I logged in, noted that it was running 6.4-STABLE, switched to
9.0-CURRENT (via "sudo boot0cfg -s 4 aacd0 && sudo shutdown -r now")
and tried the above sequence that includes "shutdown -p now"; the serial
console mentioned something about powering off ... but then it didn't do
that -- it came bak up again.

While that might be an admirable quality in some situations, I rather
like the notion that in this relationship, the master is the one with
opposable thumbs... and whenm I tell a machine to do something, I don't
want it to do something different.  :-}

I'll try it again & show what I see on the serial console:

First, before I do anything, I see

|...
|Starting background file system checks in 60 seconds.
|
|Tue Dec  8 07:40:58 PST 2009
|
|FreeBSD/i386 (freebeast.catwhisker.org) (ttyu0)
|
|login:

So now I'll login & try the command:

|login: david
|Password:
|Last login: Tue Dec  8 07:42:56 from 172.16.8.13
|...
|freebeast(9.0-C)[1] uname -a
|FreeBSD freebeast.catwhisker.org 9.0-CURRENT FreeBSD 9.0-CURRENT #4 r20025=
2: Tue Dec  8 06:50:43 PST 2009     root@freebeast.catwhisker.org:/common/S=
4/obj/usr/src/sys/GENERIC  i386
|freebeast(9.0-C)[2] sudo boot0cfg -s 1 aacd0 && sudo shutdown -p now || su=
do shutdown -r now
|Password:Shutdown NOW!
|shutdown: [pid 1403]
|freebeast(9.0-C)[3]                                                       =
                        =20
|*** FINAL System shutdown message from david@freebeast.catwhisker.org *** =
  =20
|System going down IMMEDIATELY                                             =
    =20
|                                                                          =
    =20
|                                                                          =
    =20
|Dec  8 08:05:02 freebeast shutdown: power-down by david:=20
|
|System shutdown Stopping cron.
|Stopping sshd.
|Stopping cvsupd.
|Stopping rsyncd.
|Waiting for PIDS: 1135.
|Stopping powerd.
|Stopping ntpd.
|Stopping lpd.
|Stopping amd.
|Waiting for PIDS: 889.
|Stopping ypbind.
|Stopping rpcbind.
|Stopping devd.
|Writing entropy file:.
|Terminated
|.
|Dec  8 08:05:09 freebeast syslogd: exiting on signal 15
|Waiting (max 60 seconds) for system process `vnlru' to stop...done
|Waiting (max 60 seconds) for system process `bufdaemon' to stop...done
|
|Waiting (max 60 seconds) for system process `syncer' to stop...Syncing dis=
ks, vnodes remaining...7 7 7 7 4 4 3 2 0 0 0 0 done
|All buffers synced.
|lock order reversal:
| 1st 0xc66a67ac ufs (ufs) @ /usr/src/sys/kern/vfs_mount.c:1204
| 2nd 0xc66a6594 devfs (devfs) @ /usr/src/sys/ufs/ffs/ffs_vfsops.c:1194
|KDB: stack backtrace:
|db_trace_self_wrapper(c0c90502,e416499c,c08cc275,c08bd03b,c0c933b8,...) at=
 db_trace_self_wrapper+0x26
|kdb_backtrace(c08bd03b,c0c933b8,c5930500,c5930430,e41649f8,...) at kdb_bac=
ktrace+0x29
|_witness_debugger(c0c933b8,c66a6594,c0c81ecc,c5930430,c0cb40ba,...) at _wi=
tness_debugger+0x25
|witness_checkorder(c66a6594,9,c0cb40ba,4aa,c66a65b0,...) at witness_checko=
rder+0x839
|__lockmgr_args(c66a6594,80400,c66a65b0,0,0,...) at __lockmgr_args+0x7a7
|vop_stdlock(e4164b00,556,e4164af8,80400,c66a653c,...) at vop_stdlock+0x62
|VOP_LOCK1_APV(c0d72620,e4164b00,c67b753c,c0db2080,c66a653c,...) at VOP_LOC=
K1_APV+0xb5
|_vn_lock(c66a653c,80400,c0cb40ba,4aa,c600ac00,...) at _vn_lock+0x5e
|ffs_flushfiles(c6721508,2,c5971d80,556,3,...) at ffs_flushfiles+0xa7
|softdep_flushfiles(c6721508,2,c5971d80,c0c9a60e,8aa,...) at softdep_flushf=
iles+0x2e
|ffs_unmount(c6721508,80000,e4164bf4,4f9,e4160008,...) at ffs_unmount+0x149
|dounmount(c6721508,80000,c5971d80,c55a5830,0,...) at dounmount+0x46d
|vfs_unmountall(c0c9a2c1,0,c0c8d069,129,0,...) at vfs_unmountall+0x4e
|boot(c0de69d0,0,c0c8d069,ac,bfbfe9c0,...) at boot+0x44f
|reboot(c5971d80,e4164cf8,4,c0c945ec,c0d76444,...) at reboot+0x69
|syscall(e4164d38) at syscall+0x2a3
|Xint0x80_syscall() at Xint0x80_syscall+0x20
|--- syscall (55, FreeBSD ELF32, reboot), eip =3D 0x80510b3, esp =3D 0xbfbf=
e88c, ebp =3D 0xbfbfe968 ---
|Uptime: 4m36s
|aac0: shutting down controller...done
|acpi0: Powering system off
|

And then it starts taking this "Phoenix BIOS" thing a bit too
literally (well, I suppose I'm thankful that no flames were involved)
and starts booting up again....

I'm pretty sure the poweroff worked as expected yesterday (r200211).

As an experiment, I tried booting into single-user mode, then issuing
"halt -p" ... yup; same effect.

Booting to single-user mode in 8.0-STABLE (slice 3), then issuing
"halt -p" appears to work OK.


Here's a list (courtesy "svn update") of updates from yesterday to
today:

U    sys/sparc64/sparc64/trap.c
U    sys/cam/ata/ata_xpt.c
U    sys/cam/ata/ata_pmp.c
U    sys/cam/ata/ata_all.c
U    sys/boot/i386/libi386/libi386.h
U    sys/boot/i386/libi386/biosmem.c
U    sys/boot/i386/loader/main.c
U    sys/ia64/ia64/exception.S
U    sys/fs/ntfs/ntfs.h
U    sys/fs/ntfs/ntfs_subr.c
U    sys/fs/ntfs/ntfs_vfsops.c
U    sys/dev/e1000/e1000_82575.c
U    sys/dev/e1000/e1000_ich8lan.h
U    sys/dev/e1000/e1000_82575.h
U    sys/dev/e1000/e1000_regs.h
U    sys/dev/e1000/e1000_api.c
U    sys/dev/e1000/if_igb.c
U    sys/dev/e1000/e1000_80003es2lan.c
U    sys/dev/e1000/if_igb.h
U    sys/dev/e1000/e1000_defines.h
U    sys/dev/e1000/e1000_hw.h
U    sys/dev/e1000/e1000_82541.c
U    sys/dev/e1000/e1000_80003es2lan.h
U    sys/dev/e1000/e1000_manage.c
U    sys/dev/e1000/LICENSE
U    sys/dev/e1000/e1000_mac.c
U    sys/dev/e1000/e1000_phy.c
U    sys/dev/e1000/e1000_phy.h
U    sys/dev/e1000/if_em.c
U    sys/dev/e1000/e1000_osdep.h
U    sys/dev/e1000/if_em.h
U    sys/dev/e1000/e1000_ich8lan.c
U    sys/dev/e1000/e1000_82571.c
U    sys/dev/uart/uart_bus_pci.c
U    sys/dev/siis/siis.c
U    sys/dev/siis/siis.h
U    sys/dev/mfi/mfi.c
U    sys/dev/aac/aacvar.h
U    sys/dev/aac/aac.c
U    sys/dev/aac/aac_cam.c
U    sys/dev/bge/if_bge.c
U    sys/dev/ixgbe/ixgbe.c
U    sys/dev/ixgbe/ixgbe_82599.c
U    sys/dev/ixgbe/ixgbe_phy.c
U    sys/dev/ixgbe/ixgbe.h
U    sys/dev/ixgbe/ixgbe_phy.h
U    sys/dev/ixgbe/ixgbe_type.h
U    sys/dev/ixgbe/ixgbe_common.c
U    sys/dev/ixgbe/ixgbe_api.c
U    sys/dev/ixgbe/ixgbe_common.h
U    sys/dev/ixgbe/ixgbe_api.h
U    sys/dev/ixgbe/ixgbe_82598.c
U    sys/dev/ixgbe/ixgbe_osdep.h
U    sys/dev/puc/pucdata.c
U    sys/dev/usb/input/atp.c
U    sys/net80211/ieee80211_hostap.c


I've attached a dmesg.boot from 9/0-CURRENT, as well.

I'm fairly open to testing stuff on the machine, but I'll need a bit of
direction.

I'm about to build today's CURRENT on my laptop (as it is now doing an
installworld for 8.0-STABLE); I'll see if the poweroff acts similarly on
it.

Peace,
david
--=20
David H. Wolfskill				david@catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.

--d6d1KVhp94hk3Jrm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="dmesg.boot"
Content-Transfer-Encoding: quoted-printable

Copyright (c) 1992-2009 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.0-CURRENT #4 r200252: Tue Dec  8 06:50:43 PST 2009
    root@freebeast.catwhisker.org:/common/S4/obj/usr/src/sys/GENERIC i386
WARNING: WITNESS option enabled, expect reduced performance.
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Xeon(TM) CPU 3.60GHz (3600.15-MHz 686-class CPU)
  Origin =3D "GenuineIntel"  Id =3D 0xf41  Stepping =3D 1
  Features=3D0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PG=
E,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=3D0x659d<SSE3,DTES64,MON,DS_CPL,EST,TM2,CNXT-ID,CX16,xTPR>
  AMD Features=3D0x20100000<NX,LM>
  TSC: P-state invariant
real memory  =3D 2147483648 (2048 MB)
avail memory =3D 2086223872 (1989 MB)
ACPI APIC Table: <PTLTD  	 APIC  >
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 2 package(s) x 1 core(s) x 2 HTT threads
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP/HT): APIC ID:  1
 cpu2 (AP): APIC ID:  6
 cpu3 (AP/HT): APIC ID:  7
ioapic0 <Version 2.0> irqs 0-23 on motherboard
ioapic1 <Version 2.0> irqs 24-47 on motherboard
ioapic2 <Version 2.0> irqs 48-71 on motherboard
kbd1 at kbdmux0
acpi0: <PTLTD   RSDT> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: <unknown> at device 0.1 (no driver attached)
pci0: <base peripheral> at device 1.0 (no driver attached)
pcib1: <ACPI PCI-PCI bridge> irq 16 at device 2.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> at device 0.0 on pci1
pci2: <ACPI PCI bus> on pcib2
aac0: <Adaptec SCSI RAID 2200S> mem 0xdc000000-0xdfffffff irq 24 at device =
1.0 on pci2
aac0: Enable Raw I/O
aac0: New comm. interface enabled
aac0: [ITHREAD]
aac0: Adaptec 2200S, aac driver 2.0.0-1
aacp0: <SCSI Passthrough Bus> on aac0
aacp1: <SCSI Passthrough Bus> on aac0
pcib3: <ACPI PCI-PCI bridge> at device 0.2 on pci1
pci3: <ACPI PCI bus> on pcib3
em0: <Intel(R) PRO/1000 Network Connection 6.9.24> port 0x2000-0x203f mem 0=
xd8200000-0xd821ffff irq 54 at device 2.0 on pci3
em0: [FILTER]
em0: Ethernet address: 00:30:48:2d:32:6a
em1: <Intel(R) PRO/1000 Network Connection 6.9.24> port 0x2040-0x207f mem 0=
xd8220000-0xd823ffff irq 55 at device 2.1 on pci3
em1: [FILTER]
em1: Ethernet address: 00:30:48:2d:32:6b
pcib4: <ACPI PCI-PCI bridge> irq 16 at device 4.0 on pci0
pci4: <ACPI PCI bus> on pcib4
pcib5: <ACPI PCI-PCI bridge> irq 16 at device 6.0 on pci0
pci5: <ACPI PCI bus> on pcib5
uhci0: <Intel 82801EB (ICH5) USB controller USB-A> port 0x1400-0x141f irq 1=
6 at device 29.0 on pci0
uhci0: [ITHREAD]
usbus0: <Intel 82801EB (ICH5) USB controller USB-A> on uhci0
uhci1: <Intel 82801EB (ICH5) USB controller USB-B> port 0x1420-0x143f irq 1=
9 at device 29.1 on pci0
uhci1: [ITHREAD]
usbus1: <Intel 82801EB (ICH5) USB controller USB-B> on uhci1
uhci2: <Intel 82801EB (ICH5) USB controller USB-C> port 0x1440-0x145f irq 1=
8 at device 29.2 on pci0
uhci2: [ITHREAD]
usbus2: <Intel 82801EB (ICH5) USB controller USB-C> on uhci2
uhci3: <Intel 82801EB (ICH5) USB controller USB-D> port 0x1460-0x147f irq 1=
6 at device 29.3 on pci0
uhci3: [ITHREAD]
usbus3: <Intel 82801EB (ICH5) USB controller USB-D> on uhci3
ehci0: <Intel 82801EB/R (ICH5) USB 2.0 controller> mem 0xd8001000-0xd80013f=
f irq 23 at device 29.7 on pci0
ehci0: [ITHREAD]
usbus4: EHCI version 1.0
usbus4: <Intel 82801EB/R (ICH5) USB 2.0 controller> on ehci0
pcib6: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci6: <ACPI PCI bus> on pcib6
vgapci0: <VGA-compatible display> port 0x3000-0x30ff mem 0xd9000000-0xd9fff=
fff,0xd8300000-0xd8300fff irq 17 at device 1.0 on pci6
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH5 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177=
,0x376,0x14a0-0x14af at device 31.1 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
acpi_button0: <Power Button> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x77 irq 8 on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: [ITHREAD]
psm0: model Generic PS/2 mouse, device ID 0
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart0: [FILTER]
uart0: console (9600,n,8,1)
uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0
uart1: [FILTER]
fdc0: <floppy drive controller> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0
fdc0: [FILTER]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
cpu0: <ACPI CPU> on acpi0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr 122d00000e24
device_attach: est0 attach returned 6
p4tcc0: <CPU Frequency Thermal Control> on cpu0
cpu1: <ACPI CPU> on acpi0
est1: <Enhanced SpeedStep Frequency Control> on cpu1
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr 122d00000e24
device_attach: est1 attach returned 6
p4tcc1: <CPU Frequency Thermal Control> on cpu1
cpu2: <ACPI CPU> on acpi0
est2: <Enhanced SpeedStep Frequency Control> on cpu2
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr 122d00000e24
device_attach: est2 attach returned 6
p4tcc2: <CPU Frequency Thermal Control> on cpu2
cpu3: <ACPI CPU> on acpi0
est3: <Enhanced SpeedStep Frequency Control> on cpu3
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr 122d00000e24
device_attach: est3 attach returned 6
p4tcc3: <CPU Frequency Thermal Control> on cpu3
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xc8fff,0xc9000-0x=
c9fff,0xca000-0xcafff,0xcb000-0xcf7ff pnpid ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=3D0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ppc0: parallel port not found.
Timecounters tick every 1.000 msec
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 12Mbps Full Speed USB v1.0
usbus2: 12Mbps Full Speed USB v1.0
usbus3: 12Mbps Full Speed USB v1.0
usbus4: 480Mbps High Speed USB v2.0
ata1: DMA limited to UDMA33, controller found non-ATA66 cable
ugen0.1: <Intel> at usbus0
uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <Intel> at usbus1
uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen2.1: <Intel> at usbus2
uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
ugen3.1: <Intel> at usbus3
uhub3: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
ugen4.1: <Intel> at usbus4
uhub4: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus4
acd0: DVDROM <MATSHITADVD-ROM SR-8178/PZ16> at ata1-slave UDMA33=20
aacd0: <RAID 1 (Mirror)> on aac0
aacd0: 34970MB (71619584 sectors)
aacd1: <RAID 1 (Mirror)> on aac0
aacd1: 69974MB (143307008 sectors)
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
uhub3: 2 ports with 2 removable, self powered
uhub4: 8 ports with 8 removable, self powered
ses0 at aacp0 bus 0 scbus0 target 6 lun 0
ses0: <SUPER GEM318 0> Fixed Uninstalled SCSI-2 device=20
ses0: 3.300MB/s transfers
ses0: SAF-TE Compliant Device
SMP: AP CPU #2 Launched!
SMP: AP CPU #1 Launched!
SMP: AP CPU #3 Launched!
WARNING: WITNESS option enabled, expect reduced performance.
Trying to mount root from ufs:/dev/aacd0s4a
em0: link state changed to UP

--d6d1KVhp94hk3Jrm--

--p7S+EREVcBHk3zUG
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.13 (FreeBSD)

iEYEARECAAYFAksegYoACgkQmprOCmdXAD14WwCfUs6offrQ8yitQze/sVrNEbKO
wYIAnilPxI+T8bNxKojXEoMUSyEo2who
=bZzu
-----END PGP SIGNATURE-----

--p7S+EREVcBHk3zUG--



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