Bug 890547

Summary: The system restarts when doing a shutdown
Product: [Fedora] Fedora Reporter: Mikko Huhtala <mhuhtala>
Component: kernelAssignee: systemd-maint
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: gansalmon, harald, itamar, johannbg, jonathan, kernel-maint, lnykryn, madhu.chinakonda, metherid, mschmidt, msekleta, notting, plautrba, systemd-maint, vpavlin
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-18 20:45:05 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
Output of lspci -vvv on a Lenovo B590
none
photo screenshot of "ps ax" (1/2)
none
photo screenshot of "ps ax" (2/2) none

Description Mikko Huhtala 2012-12-27 17:36:37 UTC
Created attachment 669638 [details]
Output of lspci -vvv on a Lenovo B590

Description of problem:
When "Power Off" is selected from Gnome Shell, the system does a restart instead.

Version-Release number of selected component (if applicable):
systemd-195-13.fc18.x86_64
kernel-3.6.11-3.fc18.x86_64
initscripts-9.42.1-1.fc18.x86_64
gnome-settings-daemon-3.6.3-2.fc18.x86_64

How reproducible:
Frequently

Steps to Reproduce:
1. Start Gnome Shell session in F18
2. "Power Off"
  
Actual results:
A restart.

Expected results:
Shutdown.


Additional info:
The machine exhibiting the bug is a Lenovo B590 laptop. I'm attaching the output of lspci -vvv. The machine uses UEFI firmware with Secure Boot disabled. The bug is not completely reproducible, but it does occur on about 3 out of 4 shutdowns. The closed bug #710532 is the same issue. Therein is a reference to the following kernel bug that has been closed as fixed:

https://bugzilla.kernel.org/show_bug.cgi?id=35262

I don't know whether this is a systemd or kernel issue.

Comment 1 Lennart Poettering 2013-01-03 20:41:49 UTC
Can you do the following on the console:

sync 
systemctl poweroff -ff

This will immediately power off your machine, so make sure to sync things before, in order not to lose any data. Is the issue reproducible with this? If so, then this is a kernel issue.

Comment 2 Mikko Huhtala 2013-01-04 23:57:14 UTC
Tried that twice, and got one shutdown and one restart. Looks like a kernel bug. This is still on 3.6.11-3.fc18.x86_64. I changed the component.

Comment 3 Josh Boyer 2013-01-07 15:56:14 UTC
Can you try this scratch build when it completes?  It contains the patch referenced in the kernel.org bug.

http://koji.fedoraproject.org/koji/taskinfo?taskID=4845767

Comment 4 Mikko Huhtala 2013-01-08 11:31:55 UTC
That seems to work for me. With 3.7.1-3.4.fc18.x86_64, "power off" stayed powered off 5 times out of 5 tests.

Comment 5 Josh Boyer 2013-01-08 12:17:26 UTC
Great, thank you for testing.  I'll get the patch included into Fedora and in an official build later today.

Comment 6 Fedora Update System 2013-01-08 19:53:11 UTC
kernel-3.7.1-5.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/kernel-3.7.1-5.fc18

Comment 7 Fedora Update System 2013-01-08 22:30:05 UTC
kernel-3.6.11-4.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/kernel-3.6.11-4.fc16

Comment 8 Fedora Update System 2013-01-08 22:51:01 UTC
kernel-3.6.11-5.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/kernel-3.6.11-5.fc17

Comment 9 Fedora Update System 2013-01-09 22:52:23 UTC
Package kernel-3.7.1-5.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-3.7.1-5.fc18'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-0518/kernel-3.7.1-5.fc18
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2013-01-12 15:06:50 UTC
kernel-3.7.2-201.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/kernel-3.7.2-201.fc18

Comment 11 Mikko Huhtala 2013-01-13 15:12:28 UTC
I just got two restarts on power off on 3.7.1-3.4.fc18.x86_64. I will test the latest version later today.

Comment 12 Mikko Huhtala 2013-01-13 18:50:11 UTC
3.7.2-201.fc18.x86_64 does not fix the bug on my system. 3 out of 6 attempts at shutdown resulted in restart.

Comment 13 Mikko Huhtala 2013-01-13 19:01:44 UTC
I seem to have had a period of five days and maybe 20 problem-free shutdowns on kernel version 3.7.1-3.4.fc18.x86_64. Then the bug recurred today on both 3.7.1-3.4.fc18.x86_64 and now 3.7.2-201.fc18.x86_64. Maybe that was just chance, but I did install some updates yesterday (2013-01-12), including a new version of systemd (195-15.fc18.x86_64). I don't know whether that has anything to do with this.

Comment 14 Fedora Update System 2013-01-14 04:15:10 UTC
kernel-3.7.2-201.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Mikko Huhtala 2013-01-14 11:19:27 UTC
The problem still persists.

Comment 16 Michal Schmidt 2013-01-14 12:03:56 UTC
Please test "sync && systemctl poweroff -ff" again to make sure it's not caused by something else this time.

Comment 17 Mikko Huhtala 2013-01-15 03:14:34 UTC
Did "sync && systemctl poweroff -ff" twice and again got one shutdown and one restart (3.7.1-3.4.fc18.x86_64).

Comment 18 Mikko Huhtala 2013-01-15 03:23:43 UTC
Here are the version details that the firmware on this machine (Lenovo B590) reports.

UEFI BIOS version: H1ET63WW (1.06)
UEFI BIOS date: 2012-09-04
Embedded controller version: H1EC31WW (1.11)
Machine type model: 627429G

Comment 19 Fedora Update System 2013-01-18 20:45:08 UTC
kernel-3.6.11-5.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Mikko Huhtala 2013-01-26 08:26:26 UTC
The problem does still persist on

3.7.2-204.fc18.x86_64

I can also confirm this on a Compaq desktop (Intel Core i3, HD4000 graphics (I don't have more chipset information handy) in addition to the Lenovo B590 laptop.

Comment 21 Fedora Update System 2013-01-28 14:53:20 UTC
kernel-3.6.11-4.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 22 Mikko Huhtala 2013-02-09 02:38:44 UTC
I have experienced a couple of restarts on power off on

3.7.5-201.fc18.x86_64

I don't quite understand why this bug is closed, but I suppose that's one way of fixing it.

Comment 23 Harald Hoyer 2013-02-12 14:43:52 UTC
(In reply to comment #22)
> I have experienced a couple of restarts on power off on
> 
> 3.7.5-201.fc18.x86_64
> 
> I don't quite understand why this bug is closed, but I suppose that's one
> way of fixing it.

Does the file "/run/initramfs/.need_shutdown" exist, when you are booted up?

Comment 24 Mikko Huhtala 2013-02-17 07:16:03 UTC
> Does the file "/run/initramfs/.need_shutdown" exist, when you are booted up?

Yes.

I'm still on 3.7.5-201, because I'm using wireless drivers from RPM Fusion that are not available for 3.7.6-201 yet. I haven't confirmed the unwanted restarts on 3.7.6-201.

Comment 25 Mikko Huhtala 2013-03-02 06:04:46 UTC
The bug is still there in 3.7.9-205.fc18.x86_64.

Comment 26 Harald Hoyer 2013-03-07 16:09:27 UTC
Can you do this:

# mkdir -p /run/initramfs/etc/cmdline.d
# echo "rd.break=shutdown rd.debug" > /run/initramfs/etc/cmdline.d/debug.conf
# touch /run/initramfs/.need_shutdown

and then you are dropped to a shell at the very last shutdown stage.

You might want to do this

# ps ax

and maybe take a picture of the output. Then you can try:

# poweroff -f -d -n

Comment 27 Mikko Huhtala 2013-03-12 16:23:59 UTC
Created attachment 709066 [details]
photo screenshot of "ps ax" (1/2)

Comment 28 Mikko Huhtala 2013-03-12 16:24:43 UTC
Created attachment 709067 [details]
photo screenshot of "ps ax" (2/2)

Comment 29 Mikko Huhtala 2013-03-12 16:27:22 UTC
I took a photo of the screen after "ps ax", or actually two, as I got two screenfuls of processes. I did get one unwanted reboot after "poweroff -f -d -n" on 3.8.2-206.fc18.x86_64, so I can confirm the problem on the current kernel version.

Comment 30 Harald Hoyer 2013-03-15 08:54:12 UTC
(In reply to comment #28)
> Created attachment 709067 [details]
> photo screenshot of "ps ax" (2/2)

looks good ... processes with [] are kernel thread and are of no harm.

Comment 31 Harald Hoyer 2013-03-15 08:54:46 UTC
(In reply to comment #29)
> I took a photo of the screen after "ps ax", or actually two, as I got two
> screenfuls of processes. I did get one unwanted reboot after "poweroff -f -d
> -n" on 3.8.2-206.fc18.x86_64, so I can confirm the problem on the current
> kernel version.

so, that's a real kernel problem then.