Bug 840120 - System crashes on shutdown, fails to power off
System crashes on shutdown, fails to power off
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dracut (Show other bugs)
16
i686 Linux
unspecified Severity medium
: ---
: ---
Assigned To: dracut-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-13 15:07 EDT by Bill Davidsen
Modified: 2012-12-20 10:31 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-20 10:31:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
photo of screen dump - log files unmounted prior to crash (426.13 KB, image/jpeg)
2012-07-13 15:07 EDT, Bill Davidsen
no flags Details
lsinitrd information as requested (154.88 KB, text/plain)
2012-09-20 11:57 EDT, Bill Davidsen
no flags Details

  None (edit)
Description Bill Davidsen 2012-07-13 15:07:24 EDT
Created attachment 598152 [details]
photo of screen dump - log files unmounted prior to crash

Description of problem:System crashes on shutdown, fails to power off


Version-Release number of selected component (if applicable):3.4.4-4.fc16.i686


How reproducible:100%


Steps to Reproduce:
1.Click logout or the power symbol on the login splash
2.Click "shutdown"
3.
  
Actual results:kernel crash after partial shutdown, logs never written, power left on until battery dies


Expected results:power off


Additional info:Laptop, Acer 1681, Pentium-M
Doesn't happen with any previous kernel.
I'm guessing the library mentioned didn't get installed properly by the upgrade
last log message was "stopping klog"
Comment 1 Josh Boyer 2012-09-17 14:42:04 EDT
This isn't really a kernel problem.  Init exited and the kernel doesn't like that so the kernel panics.  In this case, I would guess that the library mentioned wasn't included in the saved initramfs image that is kept and switched back to during shutdown.

Subsequent kernel updates would include a new initramfs, so perhaps this is already resovled but reassigning to dracut for now.
Comment 2 Harald Hoyer 2012-09-18 10:34:38 EDT
which version of dracut is this?

# rpm -q dracut
Comment 3 Bill Davidsen 2012-09-18 13:59:43 EDT
dracut-018-55.git20120606.fc16.noarch

However, the system was fully patched up to date as of the time of the error report, hopefully support has records of what was current at that time, I don't. The system has been patched to current at least once since then, so it may not be what it was in the months before more info was requested. Since the system still crashes and locks up solid, probably the issue is still present. If I can get it back up without pulling the battery I will reboot and update to current.

Test 1: to see if the issue was related to the XFCE shutdown logic I manually ran
  "shutdown -P -t10 now"
as root. That also hung. I then started a yum upgrade to current.

Test 2: with the system upgraded to current fc16 and cold booted, I observed the dracut version didn't change. Upon shutdown from the XFCE icon the system makes no attempt to shutdown, but does a logout instead, returning to the login screen with networking disabled. Selecting poweroff from the login splash page upper right results in a crash again.

Reboot from GNOME and text terminal also crash.

This system was a clean install and fully updated, and is used five times a year to process a large spreadsheet for scores at a sporting event. There are no apps installed but office calc, and no other uses or users. It's our only laptop with 17in screen, and is totally unenhanced, so this is a problem in the Fedora distribution code.

Note that this is the Pentium-M CPU, if that is useful, and I did try booting with lapic enabled, which changed nothing.
Comment 4 Harald Hoyer 2012-09-20 05:27:31 EDT
what is the output of:

# lsinitrd /boot/initramfs-$(uname -r).img

?
Comment 5 Bill Davidsen 2012-09-20 11:57:52 EDT
Created attachment 614968 [details]
lsinitrd information as requested

libtinfo does appear to be there
Comment 6 Harald Hoyer 2012-09-24 09:48:58 EDT
Does it help if you change /usr/lib/systemd/system/dracut-shutdown.service?

Change the line
Before=reboot.service

to:
Before=reboot.service shutdown.target

so, that it looks like this:

[Unit]
Description=Restore /run/initramfs
After=getty@tty1.service prefdm.service
Before=reboot.service shutdown.target
DefaultDependencies=no
ConditionPathExists=/run/initramfs/.need_shutdown
ConditionPathExists=!/run/initramfs/bin/sh

[Service]
ExecStart=/usr/share/dracut/dracut-initramfs-restore
Type=oneshot
RemainAfterExit=yes
Comment 7 Bill Davidsen 2012-09-24 11:53:02 EDT
I found that file in /lib not /usr/lib, for what that's worth. In any case the change worked perfectly and the system now powers down flawlessly, suspends, hibernates, and in all tested cases works as expected.

Thanks for the fix! Is that a change I can safely make in general, or should it go in the tricks file only to be tried on systems otherwise failing?
Comment 8 Harald Hoyer 2012-09-26 09:12:06 EDT
(In reply to comment #7)
> I found that file in /lib not /usr/lib, for what that's worth. In any case
> the change worked perfectly and the system now powers down flawlessly,
> suspends, hibernates, and in all tested cases works as expected.
> 
> Thanks for the fix! Is that a change I can safely make in general, or should
> it go in the tricks file only to be tried on systems otherwise failing?

I will release a new dracut version with the fix. It's a timing issue and your computer is faster/slower than others. Thanks for finding this!
Comment 9 Fedora Update System 2012-09-27 06:22:05 EDT
dracut-018-60.git20120927.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/dracut-018-60.git20120927.fc16
Comment 10 Fedora Update System 2012-09-27 06:23:12 EDT
dracut-018-105.git20120927.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/dracut-018-105.git20120927.fc17
Comment 11 Fedora Update System 2012-09-28 04:22:05 EDT
Package dracut-018-60.git20120927.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dracut-018-60.git20120927.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14959/dracut-018-60.git20120927.fc16
then log in and leave karma (feedback).
Comment 12 Fedora Update System 2012-12-20 10:31:41 EST
dracut-018-60.git20120927.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

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