Bug 1541

Summary: preempt-rt kernel shutdown now command does not work
Product: [Yocto Project Subprojects] Kernel Reporter: kishore <kishore.k.bodke>
Component: kernel-toolingAssignee: Bruce Ashfield <bruce.ashfield>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Medium CC: bruce.ashfield, yp.kernel.watcher, yp.watcher
Version: unspecified   
Target Milestone: 1.2   
Hardware: x86   
OS: x86_64   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description kishore 2011-09-29 19:56:34 UTC
“shutdown –h now” command is not working on core-image-sato image with preempt-rt kernel 3.0.4  on Romley and crystal forest BSP

I get 
Warning**: could not initialize ACPI battery.
Xinit: connection to X server lost.
xinit: uexpected signal 15


For the non-rt "shutdown now" works perfectly fine. 
For the rt kernel, after the command is issued, it tries to halt the system and hangs there  forever after the connection to the X server is lost.

Thanks
Kishore
Comment 1 Darren Hart 2011-10-03 09:21:18 UTC
Confirmed on the n450 -rt vs. -minimal images. The Xinit messages are a red herring, they appear on non-rt as well. However, using a core-image-rt image, I see the following on the console, and then the system hangs, unresponsive to user input and does not shutdown:

INIT: Switching to runlevel: 0
INIT: Switching to runlevel: 0
INIT: Sending processes the TERM signal
INIT: Sending processes the KILL signal
Stopping syslogd/klogd: stopped syslogd (pid 1010)
stopped klogd (pid 1012)
done
Deconfiguring network interfaces... done.
Sending processes the TERM signal
Sending processes the KILL signal
Unmounting remote filesystems...
Deactivating swap...
Unmounting lcoal filesystems...
md: stopping all md device.
e1000e 0000:04:00.0: PCI INT A disabled

Running "reboot" however works as expected.

Booting with "maxcpus=1" allows "shutdown -h now" to work properly as well, per Bruce's suggestion.
Comment 2 Darren Hart 2011-10-04 15:52:42 UTC
This is fixed in -rt16, which is the version following -rt14 (where it was still broken). The delta from 14 to 15 is available here:

https://tglx.de/~tglx/rt/older/patch-3.0.4-rt14-rt15.patch.gz

Changes from 15 to 16 are just dropping patches to apply against 3.0.6.

Full preempt_rt 3.0.6-rt16 patch is available here:
https://tglx.de/~tglx/rt/patch-3.0.6-rt16.patch.gz

And the broken out patch set is available here:
https://tglx.de/~tglx/rt/patches-3.0.6-rt16.tar.gz

Bruce, so long as preempt-rt remains in a rebasing quilt tree, I suggest we rebase and use the full patch set. I'd rather rebase and have the individual patches than not rebase and have a non-contextual chunk to patch from -14 to -15.

This will get fixed once we update the main yocto repository to 3.0.6 and then update the preempt-rt branch to -rt16.

Assigning to Bruce to make that clear, although I can help with the preempt-rt branch once 3.0.6 is in.
Comment 3 Bruce Ashfield 2011-10-04 19:13:12 UTC
I've been sitting on the -rt updates on purpose, since this close to 1.1 a non-fastforward
update isn't something I'd like to do to the repo, and even less do any real tweaking of
the -rt content. 

An issue like this, I'd suggest we can fix it post 1.1 with a new / rebased -rt patch queue,
but if we fix it for 1.1, I'd want to do an incremental update on the rt branches, not a rebuild.

I think we agree here, since we don't be doing 3.0.6 for 1.1, we can deal with both these at
the same time. The plan has always been to rebuild the rt series when appropriate, and I'd
agree that it is appropriate post 1.1.

As such, I tagged this as 1.2. If anyone disagrees, feel free to interject.
Comment 4 Bruce Ashfield 2011-12-15 11:37:53 UTC
This has been fixed by the RT updates in the 3.0.x kernel.