Bug 840120

Summary: System crashes on shutdown, fails to power off
Product: [Fedora] Fedora Reporter: Bill Davidsen <davidsen>
Component: dracutAssignee: dracut-maint
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 16CC: dracut-maint, gansalmon, harald, itamar, jonathan, kernel-maint, madhu.chinakonda
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-20 15:31:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
photo of screen dump - log files unmounted prior to crash
none
lsinitrd information as requested none

Description Bill Davidsen 2012-07-13 19:07:24 UTC
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 18:42:04 UTC
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 14:34:38 UTC
which version of dracut is this?

# rpm -q dracut

Comment 3 Bill Davidsen 2012-09-18 17:59:43 UTC
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 09:27:31 UTC
what is the output of:

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

?

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

libtinfo does appear to be there

Comment 6 Harald Hoyer 2012-09-24 13:48:58 UTC
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 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 15:53:02 UTC
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 13:12:06 UTC
(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 10:22:05 UTC
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 10:23:12 UTC
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 08:22:05 UTC
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 15:31:41 UTC
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.