Bug 228393 - Shutdown halt hangs after system halted
Shutdown halt hangs after system halted
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: sysvinit (Show other bugs)
6
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-12 15:41 EST by Chad
Modified: 2014-03-16 23:05 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-24 16:31:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chad 2007-02-12 15:41:16 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20070126 Ubuntu/dapper-security Firefox/1.5.0.9

Description of problem:
If the system is shutdown from a virtual terminal (eg: xterm inside of fluxbox) the system hangs, regardless of the 'halt' variant used, including init 0.  If the system is halted from an actual tty, or if the command is called with:
xterm -e "halt", then the system completely shuts off as expected.  In addition, I can press the power button on the front of the computer and the system is completely shutdown and powered off.  Recap:
halt from CTRL ALT F1, works.  Pressing power button on front of PC works.
halt from xterm in fluxbox, doesn't actual shut system off, but finishes stopping processes and stops the hard drives.  The same happens when using a script, or using an application that calls halt (or poweroff, or shutdown -h now, or init 0, or...) such as MythTV.

All of these steps are performed as root to rule out any permission issues.

Version-Release number of selected component (if applicable):
SysVinit-2.86-14

How reproducible:
Always


Steps to Reproduce:
1.  Boot system, log in.
2.  Open xterm, type halt.
3.  Walk 20 feet to computer system and hold down power button to shutdown completely.

Actual Results:
After step 2, the system goes through the shutdown process and then hangs after "System Halted".  After step 3, the system turns off ;)

If I get a successful shutdown by switching to an actual console (CTRL ATL F1) and calling halt, the last line is acpi_power_off called.  This line never appears in the above problem.

Expected Results:
I should have been able to choose the option in MythTV to "Exit MythTV and Shutdown" and have the system turn off.  Or, at the very least, I should be able to type "halt" into an xterm (as root) and have the system shutdown completely.

Additional info:
Running FC6, on an Asus M2NPV-VM with both single and dual core AMD64 CPUs running on the 32bit FC6 install.  

uname -a:
Linux localhost.localdomain 2.6.19-1.2895.fc6 #1 SMP Wed Jan 10 19:28:18 EST 2007 i686 athlon i386 GNU/Linux

dmesg | grep acpi:
If you got timer trouble try acpi_use_timer_override
If you got timer trouble try acpi_use_timer_override
If you got timer trouble try acpi_use_timer_override
If you got timer trouble try acpi_use_timer_override
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] disabled)
ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
ACPI Exception (acpi_processor-0681): AE_NOT_FOUND, Processor Device is not present [20060707]
ACPI: Getting cpuindex for acpiid 0x1
ibm_acpi: ec object not found

And ACPI:
 BIOS-e820: 0000000037ef0000 - 0000000037ef3000 (ACPI NVS)
 BIOS-e820: 0000000037ef3000 - 0000000037f00000 (ACPI data)
ACPI: RSDP (v002 Nvidia                                ) @ 0x000f7570
ACPI: XSDT (v001 Nvidia ASUSACPI 0x42302e31 AWRD 0x00000000) @ 0x37ef30c0
ACPI: FADT (v003 Nvidia ASUSACPI 0x42302e31 AWRD 0x00000000) @ 0x37efb440
ACPI: SSDT (v001 PTLTD  POWERNOW 0x00000001  LTP 0x00000001) @ 0x37efb640
ACPI: MCFG (v001 Nvidia ASUSACPI 0x42302e31 AWRD 0x00000000) @ 0x37efb840
ACPI: MADT (v001 Nvidia ASUSACPI 0x42302e31 AWRD 0x00000000) @ 0x37efb580
ACPI: DSDT (v001 NVIDIA ASUSACPI 0x00001000 MSFT 0x03000000) @ 0x00000000
Nvidia board detected. Ignoring ACPI timer override.
Nvidia board detected. Ignoring ACPI timer override.
Nvidia board detected. Ignoring ACPI timer override.
Nvidia board detected. Ignoring ACPI timer override.
ACPI: PM-Timer IO Port: 0x4008
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] disabled)
ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 0 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 14 global_irq 14 high edge)
ACPI: INT_SRC_OVR (bus 0 bus_irq 15 global_irq 15 high edge)
ACPI: IRQ0 used by override.
ACPI: IRQ9 used by override.
ACPI: IRQ14 used by override.
ACPI: IRQ15 used by override.
Using ACPI (MADT) for SMP configuration information
ACPI: Core revision 20060707
ACPI: bus type pci registered
ACPI: Interpreter enabled
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.HUB0._PRT]
ACPI: PCI Interrupt Link [LNK1] (IRQs 5 7 9 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNK2] (IRQs 5 7 9 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNK3] (IRQs 5 7 9 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNK4] (IRQs 5 7 9 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNK5] (IRQs 5 7 9 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNK6] (IRQs 5 7 9 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNK7] (IRQs *5 7 9 10 11 14 15)
ACPI: PCI Interrupt Link [LNK8] (IRQs 5 7 9 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LUBA] (IRQs 5 7 9 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LUBB] (IRQs 5 7 9 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LMAC] (IRQs 5 7 9 10 *11 14 15)
ACPI: PCI Interrupt Link [LACI] (IRQs 5 7 9 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LAZA] (IRQs 5 *7 9 10 11 14 15)
ACPI: PCI Interrupt Link [LPMU] (IRQs 5 7 9 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LMCI] (IRQs 5 7 9 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LSMB] (IRQs 5 7 9 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LUB2] (IRQs 5 7 9 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LIDE] (IRQs 5 7 9 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LSID] (IRQs *5 7 9 10 11 14 15)
ACPI: PCI Interrupt Link [LFID] (IRQs *5 7 9 10 11 14 15)
ACPI: PCI Interrupt Link [APC1] (IRQs 16) *0, disabled.
ACPI: PCI Interrupt Link [APC2] (IRQs 17) *0, disabled.
ACPI: PCI Interrupt Link [APC3] (IRQs 18) *0, disabled.
ACPI: PCI Interrupt Link [APC4] (IRQs 19) *0, disabled.
ACPI: PCI Interrupt Link [APC5] (IRQs 16) *0, disabled.
ACPI: PCI Interrupt Link [APC6] (IRQs 16) *0, disabled.
ACPI: PCI Interrupt Link [APC7] (IRQs 16) *0, disabled.
ACPI: PCI Interrupt Link [APC8] (IRQs 16) *0, disabled.
ACPI: PCI Interrupt Link [APCF] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCG] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCH] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCJ] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APMU] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [AAZA] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCK] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCS] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCL] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCM] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCZ] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APSI] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APSJ] (IRQs 20 21 22 23) *0, disabled.
pnp: PnP ACPI init
pnp: PnP ACPI: found 11 devices
PCI: Using ACPI for IRQ routing
apm: overridden by ACPI.
ACPI: Fan [FAN] (on)
ACPI Exception (acpi_processor-0681): AE_NOT_FOUND, Processor Device is not present [20060707]
ACPI: Getting cpuindex for acpiid 0x1
ACPI: Thermal Zone [THRM] (40 C)
ACPI: (supports S0 S1 S3 S4 S5)
ACPI: PCI Interrupt Link [APCF] enabled at IRQ 23
ACPI: PCI Interrupt 0000:00:0b.0[A] -> Link [APCF] -> GSI 23 (level, low) -> IRQ 16
ACPI: PCI Interrupt Link [APCL] enabled at IRQ 22
ACPI: PCI Interrupt 0000:00:0b.1[B] -> Link [APCL] -> GSI 22 (level, low) -> IRQ 17
ACPI: PCI Interrupt Link [APSI] enabled at IRQ 21
ACPI: PCI Interrupt 0000:00:0e.0[A] -> Link [APSI] -> GSI 21 (level, low) -> IRQ 18
ACPI: PCI Interrupt Link [APSJ] enabled at IRQ 20
ACPI: PCI Interrupt 0000:00:0f.0[A] -> Link [APSJ] -> GSI 20 (level, low) -> IRQ 19
ACPI: PCI Interrupt Link [APCH] enabled at IRQ 23
ACPI: PCI Interrupt 0000:00:14.0[A] -> Link [APCH] -> GSI 23 (level, low) -> IRQ 16
ACPI: PCI Interrupt Link [APC4] enabled at IRQ 19
ACPI: PCI Interrupt 0000:04:05.0[A] -> Link [APC4] -> GSI 19 (level, low) -> IRQ 20
ACPI: PCI Interrupt Link [AAZA] enabled at IRQ 22
ACPI: PCI Interrupt 0000:00:10.1[B] -> Link [AAZA] -> GSI 22 (level, low) -> IRQ 17
ACPI: PCI Interrupt Link [APC7] enabled at IRQ 16
ACPI: PCI Interrupt 0000:00:05.0[A] -> Link [APC7] -> GSI 16 (level, low) -> IRQ 21
ACPI: Power Button (FF) [PWRF]
ACPI: Power Button (CM) [PWRB]
Comment 1 Bill Nottingham 2007-02-12 15:57:35 EST
What happens if you pass '-p' to halt?
Comment 2 Chad 2007-02-13 03:41:30 EST
It works!  Which means I must have been mistaken when I said I tried poweroff...
 So, any hints on how I apply this so it works when halt and shutdown -h now are
called?

Thank you!

-Chad
Comment 3 Chad 2007-02-13 06:01:20 EST
Something that works:

Editing /etc/rc.d/init.d/halt where near the end:

----------
# First, try kexec. If that fails, fall back to rebooting the old way.
[ -n "$kexec_command" ] && $kexec_command -e >& /dev/null

HALTARGS="-d"
[ -f /poweroff -o ! -f /halt ] && HALTARGS="$HALTARGS -p"

exec $command $HALTARGS
--------------

Moving the -p up into the first HALTARGS argument so it looks like this instead:
-----------------
HALTARGS="-p -d"
[ -f /poweroff -o ! -f /halt ] && HALTARGS="$HALTARGS"
-----------------

Allows it to work correctly.

Thank you again.  If there is a better 'fix' please let me know.

-Chad
Comment 4 Bill Nottingham 2007-02-13 11:59:34 EST
shutdown -h should poweroff - are you getting any SELinux errors? Are you
calling it as a user or as root?
Comment 5 Bill Nottingham 2007-04-23 17:55:37 EDT
Going back... this *appears* to be working as expected.

halt == halt, no poweroff
poweroff == poweroff
halt -p == poweroff

Under what circumstances do you actually get just 'halt' to power the machine off?
Comment 6 Chad 2007-04-23 22:17:13 EDT
I thought I updated this bug, and now I feel like a jerk for not doing it
because I cannot remember the circumstances or what I did to fix it (other than
the above fix).  I no longer have the issue though, and thank you for the follow
up.  If I can provide any info from my current setup, please let me know and
I'll post it up.

FWIW:
I am calling it as root, and I do not get any SELinux errors.

Thank you.

-Chad
Comment 7 Bill Nottingham 2007-04-24 16:31:45 EDT
OK. For now, closing as WORKSFORME.
Comment 8 David Lawrence 2007-06-21 22:11:30 EDT
Package name is now sysvinit in Fedora.

Note You need to log in before you can comment on or make changes to this bug.