Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1308364 > unrolled thread
| Started by | Keerthy <j-keerthy@ti.com> |
|---|---|
| First post | 2016-01-13 13:40 +0100 |
| Last post | 2016-01-14 15:30 +0100 |
| Articles | 8 — 5 participants |
Back to article view | Back to linux.kernel
[PATCH v2] reboot: Backup orderly_poweroff Keerthy <j-keerthy@ti.com> - 2016-01-13 13:40 +0100
Re: [PATCH v2] reboot: Backup orderly_poweroff Ingo Molnar <mingo@kernel.org> - 2016-01-14 10:10 +0100
Re: [PATCH v2] reboot: Backup orderly_poweroff Keerthy <a0393675@ti.com> - 2016-01-14 10:30 +0100
Re: [PATCH v2] reboot: Backup orderly_poweroff Ingo Molnar <mingo@kernel.org> - 2016-01-14 11:10 +0100
Re: [PATCH v2] reboot: Backup orderly_poweroff Keerthy <a0393675@ti.com> - 2016-01-14 11:50 +0100
Re: [PATCH v2] reboot: Backup orderly_poweroff Ingo Molnar <mingo@kernel.org> - 2016-01-14 12:30 +0100
Re: [PATCH v2] reboot: Backup orderly_poweroff One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-01-14 14:30 +0100
Re: [PATCH v2] reboot: Backup orderly_poweroff Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-01-14 15:30 +0100
| From | Keerthy <j-keerthy@ti.com> |
|---|---|
| Date | 2016-01-13 13:40 +0100 |
| Subject | [PATCH v2] reboot: Backup orderly_poweroff |
| Message-ID | <qQsSv-89F-27@gated-at.bofh.it> |
orderly_poweroff is triggered when a graceful shutdown
of system is desired. This may be used in many critical states of the
kernel such as when subsystems detects conditions such as critical
temperature conditions. However, in certain conditions in system
boot up sequences like those in the middle of driver probes being
initiated, userspace will be unable to power off the system in a clean
manner and leaves the system in a critical state. In cases like these,
the /sbin/poweroff will return success (having forked off to attempt
powering off the system. However, the system overall will fail to
completely poweroff (since other modules will be probed) and the system
is still functional with no userspace (since that would have shut itself
off).
However, there is no clean way of detecting such failure of userspace
powering off the system. In such scenarios, it is necessary for a backup
workqueue to be able to force a shutdown of the system when orderly
shutdown is not successful after a configurable time period.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Suggested-by: Eduardo Valentin <edubezval@gmail.com>
Reported-by: Nishanth Menon <nm@ti.com>
---
Links to previous discussion can be found here:
http://www.spinics.net/lists/linux-omap/msg124925.html
Boot tested on DRA7.
changes in v2:
* Changed #ifdef to #if CONFIG_SHUTDOWN_BACKUP_DELAY_MS
arch/Kconfig | 7 +++++++
kernel/reboot.c | 23 ++++++++++++++++++-----
2 files changed, 25 insertions(+), 5 deletions(-)
Index: linux/arch/Kconfig
===================================================================
--- linux.orig/arch/Kconfig 2016-01-11 15:26:07.732173131 +0530
+++ linux/arch/Kconfig 2016-01-11 15:26:07.728173205 +0530
@@ -37,6 +37,18 @@
def_bool y
depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64
+config SHUTDOWN_BACKUP_DELAY_MS
+ int "Backup shutdown delay in milli-seconds"
+ default 0
+ help
+ The number of milliseconds to delay before backup workqueue
+ executes attempting to poweroff the system after the
+ orderly_poweroff function has failed to complete.
+
+ If set to 0, the backup workqueue is not active. The value
+ should be conservatively configured based on userspace latencies
+ expected for a given system.
+
config KPROBES
bool "Kprobes"
depends on MODULES
Index: linux/kernel/reboot.c
===================================================================
--- linux.orig/kernel/reboot.c 2016-01-11 15:26:07.732173131 +0530
+++ linux/kernel/reboot.c 2016-01-11 15:38:33.502341511 +0530
@@ -424,6 +424,38 @@
return ret;
}
+#if CONFIG_SHUTDOWN_BACKUP_DELAY_MS
+
+/**
+ * shutdown_backup_func - shutdown backup work after a known delay
+ * @work: work_struct associated with the backup shutdown function
+ *
+ * In system bootup sequences like those in the middle of driver probes being
+ * initiated, userspace will be unable to power off the system in a clean
+ * manner and leaves the system in a critical state.
+ * In such scenarios, this backup workqueue forces a shutdown of the system
+ * when orderly shutdown is not successful after a configurable time period.
+ */
+static void shutdown_backup_func(struct work_struct *work)
+{
+ pr_warn("Orderly_poweroff has failed! Attempting kernel_power_off\n");
+ kernel_power_off();
+
+ pr_warn("kernel_power_off has failed! Attempting emergency_restart\n");
+ emergency_restart();
+}
+
+static DECLARE_DELAYED_WORK(bkup_shutdown_work, shutdown_backup_func);
+
+static inline void setup_backup_shutdown_workqueue(void)
+{
+ schedule_delayed_work(&bkup_shutdown_work,
+ msecs_to_jiffies(CONFIG_SHUTDOWN_BACKUP_DELAY_MS));
+}
+#else
+static inline void setup_backup_shutdown_workqueue(void) { }
+#endif
+
static int __orderly_poweroff(bool force)
{
int ret;
@@ -442,6 +474,12 @@
kernel_power_off();
}
+ /*
+ * Schedule a backup work function to execute after a known time
+ * when orderly shutdown fails.
+ */
+ setup_backup_shutdown_workqueue();
+
return ret;
}
[toc] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2016-01-14 10:10 +0100 |
| Message-ID | <qQM4O-4UH-13@gated-at.bofh.it> |
| In reply to | #1308364 |
* Keerthy <j-keerthy@ti.com> wrote: > orderly_poweroff is triggered when a graceful shutdown > of system is desired. This may be used in many critical states of the > kernel such as when subsystems detects conditions such as critical > temperature conditions. However, in certain conditions in system > boot up sequences like those in the middle of driver probes being > initiated, userspace will be unable to power off the system in a clean > manner and leaves the system in a critical state. In cases like these, > the /sbin/poweroff will return success (having forked off to attempt > powering off the system. However, the system overall will fail to > completely poweroff (since other modules will be probed) and the system > is still functional with no userspace (since that would have shut itself > off). > > However, there is no clean way of detecting such failure of userspace > powering off the system. In such scenarios, it is necessary for a backup > workqueue to be able to force a shutdown of the system when orderly > shutdown is not successful after a configurable time period. > > Signed-off-by: Keerthy <j-keerthy@ti.com> > Suggested-by: Eduardo Valentin <edubezval@gmail.com> > Reported-by: Nishanth Menon <nm@ti.com> > --- > Links to previous discussion can be found here: > > http://www.spinics.net/lists/linux-omap/msg124925.html > > Boot tested on DRA7. > > changes in v2: > > * Changed #ifdef to #if CONFIG_SHUTDOWN_BACKUP_DELAY_MS > > arch/Kconfig | 7 +++++++ > kernel/reboot.c | 23 ++++++++++++++++++----- > 2 files changed, 25 insertions(+), 5 deletions(-) > > Index: linux/arch/Kconfig > =================================================================== > --- linux.orig/arch/Kconfig 2016-01-11 15:26:07.732173131 +0530 > +++ linux/arch/Kconfig 2016-01-11 15:26:07.728173205 +0530 > @@ -37,6 +37,18 @@ > def_bool y > depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64 > > +config SHUTDOWN_BACKUP_DELAY_MS > + int "Backup shutdown delay in milli-seconds" > + default 0 > + help > + The number of milliseconds to delay before backup workqueue > + executes attempting to poweroff the system after the > + orderly_poweroff function has failed to complete. > + > + If set to 0, the backup workqueue is not active. The value > + should be conservatively configured based on userspace latencies > + expected for a given system. I don't really understand this. In what circumstances can a reboot fail? I think that is what should be fixed: a reboot should never fail, instead of introducing some sort of fragile timeout based method. Thanks, Ingo
[toc] | [prev] | [next] | [standalone]
| From | Keerthy <a0393675@ti.com> |
|---|---|
| Date | 2016-01-14 10:30 +0100 |
| Message-ID | <qQMoa-51q-9@gated-at.bofh.it> |
| In reply to | #1309094 |
Hi Ingo, On Thursday 14 January 2016 02:35 PM, Ingo Molnar wrote: > > * Keerthy <j-keerthy@ti.com> wrote: > >> orderly_poweroff is triggered when a graceful shutdown >> of system is desired. This may be used in many critical states of the >> kernel such as when subsystems detects conditions such as critical >> temperature conditions. However, in certain conditions in system >> boot up sequences like those in the middle of driver probes being >> initiated, userspace will be unable to power off the system in a clean >> manner and leaves the system in a critical state. In cases like these, >> the /sbin/poweroff will return success (having forked off to attempt >> powering off the system. However, the system overall will fail to >> completely poweroff (since other modules will be probed) and the system >> is still functional with no userspace (since that would have shut itself >> off). >> >> However, there is no clean way of detecting such failure of userspace >> powering off the system. In such scenarios, it is necessary for a backup >> workqueue to be able to force a shutdown of the system when orderly >> shutdown is not successful after a configurable time period. >> >> Signed-off-by: Keerthy <j-keerthy@ti.com> >> Suggested-by: Eduardo Valentin <edubezval@gmail.com> >> Reported-by: Nishanth Menon <nm@ti.com> >> --- >> Links to previous discussion can be found here: >> >> http://www.spinics.net/lists/linux-omap/msg124925.html >> >> Boot tested on DRA7. >> >> changes in v2: >> >> * Changed #ifdef to #if CONFIG_SHUTDOWN_BACKUP_DELAY_MS >> >> arch/Kconfig | 7 +++++++ >> kernel/reboot.c | 23 ++++++++++++++++++----- >> 2 files changed, 25 insertions(+), 5 deletions(-) >> >> Index: linux/arch/Kconfig >> =================================================================== >> --- linux.orig/arch/Kconfig 2016-01-11 15:26:07.732173131 +0530 >> +++ linux/arch/Kconfig 2016-01-11 15:26:07.728173205 +0530 >> @@ -37,6 +37,18 @@ >> def_bool y >> depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64 >> >> +config SHUTDOWN_BACKUP_DELAY_MS >> + int "Backup shutdown delay in milli-seconds" >> + default 0 >> + help >> + The number of milliseconds to delay before backup workqueue >> + executes attempting to poweroff the system after the >> + orderly_poweroff function has failed to complete. >> + >> + If set to 0, the backup workqueue is not active. The value >> + should be conservatively configured based on userspace latencies >> + expected for a given system. > > I don't really understand this. In what circumstances can a reboot fail? > > I think that is what should be fixed: a reboot should never fail, instead of > introducing some sort of fragile timeout based method. Here is the complete description of the scenario which was reported by Nishanth who encountered the issue. The link has bootlogs and description of the exact case which led to this patch. http://www.spinics.net/lists/linux-omap/msg124923.html Regards, Keerthy > > Thanks, > > Ingo >
[toc] | [prev] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2016-01-14 11:10 +0100 |
| Message-ID | <qQN0S-5vL-15@gated-at.bofh.it> |
| In reply to | #1309111 |
* Keerthy <a0393675@ti.com> wrote:
> Hi Ingo,
>
> On Thursday 14 January 2016 02:35 PM, Ingo Molnar wrote:
> >
> >* Keerthy <j-keerthy@ti.com> wrote:
> >
> >>orderly_poweroff is triggered when a graceful shutdown
> >>of system is desired. This may be used in many critical states of the
> >>kernel such as when subsystems detects conditions such as critical
> >>temperature conditions. However, in certain conditions in system
> >>boot up sequences like those in the middle of driver probes being
> >>initiated, userspace will be unable to power off the system in a clean
> >>manner and leaves the system in a critical state. In cases like these,
> >>the /sbin/poweroff will return success (having forked off to attempt
> >>powering off the system. However, the system overall will fail to
> >>completely poweroff (since other modules will be probed) and the system
> >>is still functional with no userspace (since that would have shut itself
> >>off).
> >>
> >>However, there is no clean way of detecting such failure of userspace
> >>powering off the system. In such scenarios, it is necessary for a backup
> >>workqueue to be able to force a shutdown of the system when orderly
> >>shutdown is not successful after a configurable time period.
> >>
> >>Signed-off-by: Keerthy <j-keerthy@ti.com>
> >>Suggested-by: Eduardo Valentin <edubezval@gmail.com>
> >>Reported-by: Nishanth Menon <nm@ti.com>
> >>---
> >>Links to previous discussion can be found here:
> >>
> >>http://www.spinics.net/lists/linux-omap/msg124925.html
> >>
> >>Boot tested on DRA7.
> >>
> >>changes in v2:
> >>
> >> * Changed #ifdef to #if CONFIG_SHUTDOWN_BACKUP_DELAY_MS
> >>
> >> arch/Kconfig | 7 +++++++
> >> kernel/reboot.c | 23 ++++++++++++++++++-----
> >> 2 files changed, 25 insertions(+), 5 deletions(-)
> >>
> >>Index: linux/arch/Kconfig
> >>===================================================================
> >>--- linux.orig/arch/Kconfig 2016-01-11 15:26:07.732173131 +0530
> >>+++ linux/arch/Kconfig 2016-01-11 15:26:07.728173205 +0530
> >>@@ -37,6 +37,18 @@
> >> def_bool y
> >> depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64
> >>
> >>+config SHUTDOWN_BACKUP_DELAY_MS
> >>+ int "Backup shutdown delay in milli-seconds"
> >>+ default 0
> >>+ help
> >>+ The number of milliseconds to delay before backup workqueue
> >>+ executes attempting to poweroff the system after the
> >>+ orderly_poweroff function has failed to complete.
> >>+
> >>+ If set to 0, the backup workqueue is not active. The value
> >>+ should be conservatively configured based on userspace latencies
> >>+ expected for a given system.
> >
> >I don't really understand this. In what circumstances can a reboot fail?
> >
> >I think that is what should be fixed: a reboot should never fail, instead of
> >introducing some sort of fragile timeout based method.
>
> Here is the complete description of the scenario which was reported by Nishanth
> who encountered the issue. The link has bootlogs and description of the exact
> case which led to this patch.
>
> http://www.spinics.net/lists/linux-omap/msg124923.html
it's a reply in the middle of a discussion ...
What I managed to decode is that this:
static int __orderly_poweroff(bool force)
{
int ret;
ret = run_cmd(poweroff_cmd);
if (ret && force) {
pr_warn("Failed to start orderly shutdown: forcing the issue\n");
/*
* I guess this should try to kick off some daemon to sync and
* poweroff asap. Or not even bother syncing if we're doing an
* emergency shutdown?
*/
emergency_sync();
kernel_power_off();
}
return ret;
}
could fail to actually power the system off, if the run_cmd(poweroff_cmd)
'succeeds', but due to a user-space bug it does not actually call the real
poweroff system call?
Thanks,
Ingo
[toc] | [prev] | [next] | [standalone]
| From | Keerthy <a0393675@ti.com> |
|---|---|
| Date | 2016-01-14 11:50 +0100 |
| Message-ID | <qQNDz-5Lf-1@gated-at.bofh.it> |
| In reply to | #1309142 |
Hi Ingo,
On Thursday 14 January 2016 03:39 PM, Ingo Molnar wrote:
>
> * Keerthy <a0393675@ti.com> wrote:
>
>> Hi Ingo,
>>
>> On Thursday 14 January 2016 02:35 PM, Ingo Molnar wrote:
>>>
>>> * Keerthy <j-keerthy@ti.com> wrote:
>>>
>>>> orderly_poweroff is triggered when a graceful shutdown
>>>> of system is desired. This may be used in many critical states of the
>>>> kernel such as when subsystems detects conditions such as critical
>>>> temperature conditions. However, in certain conditions in system
>>>> boot up sequences like those in the middle of driver probes being
>>>> initiated, userspace will be unable to power off the system in a clean
>>>> manner and leaves the system in a critical state. In cases like these,
>>>> the /sbin/poweroff will return success (having forked off to attempt
>>>> powering off the system. However, the system overall will fail to
>>>> completely poweroff (since other modules will be probed) and the system
>>>> is still functional with no userspace (since that would have shut itself
>>>> off).
>>>>
>>>> However, there is no clean way of detecting such failure of userspace
>>>> powering off the system. In such scenarios, it is necessary for a backup
>>>> workqueue to be able to force a shutdown of the system when orderly
>>>> shutdown is not successful after a configurable time period.
>>>>
>>>> Signed-off-by: Keerthy <j-keerthy@ti.com>
>>>> Suggested-by: Eduardo Valentin <edubezval@gmail.com>
>>>> Reported-by: Nishanth Menon <nm@ti.com>
>>>> ---
>>>> Links to previous discussion can be found here:
>>>>
>>>> http://www.spinics.net/lists/linux-omap/msg124925.html
>>>>
>>>> Boot tested on DRA7.
>>>>
>>>> changes in v2:
>>>>
>>>> * Changed #ifdef to #if CONFIG_SHUTDOWN_BACKUP_DELAY_MS
>>>>
>>>> arch/Kconfig | 7 +++++++
>>>> kernel/reboot.c | 23 ++++++++++++++++++-----
>>>> 2 files changed, 25 insertions(+), 5 deletions(-)
>>>>
>>>> Index: linux/arch/Kconfig
>>>> ===================================================================
>>>> --- linux.orig/arch/Kconfig 2016-01-11 15:26:07.732173131 +0530
>>>> +++ linux/arch/Kconfig 2016-01-11 15:26:07.728173205 +0530
>>>> @@ -37,6 +37,18 @@
>>>> def_bool y
>>>> depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64
>>>>
>>>> +config SHUTDOWN_BACKUP_DELAY_MS
>>>> + int "Backup shutdown delay in milli-seconds"
>>>> + default 0
>>>> + help
>>>> + The number of milliseconds to delay before backup workqueue
>>>> + executes attempting to poweroff the system after the
>>>> + orderly_poweroff function has failed to complete.
>>>> +
>>>> + If set to 0, the backup workqueue is not active. The value
>>>> + should be conservatively configured based on userspace latencies
>>>> + expected for a given system.
>>>
>>> I don't really understand this. In what circumstances can a reboot fail?
>>>
>>> I think that is what should be fixed: a reboot should never fail, instead of
>>> introducing some sort of fragile timeout based method.
>>
>> Here is the complete description of the scenario which was reported by Nishanth
>> who encountered the issue. The link has bootlogs and description of the exact
>> case which led to this patch.
>>
>> http://www.spinics.net/lists/linux-omap/msg124923.html
>
> it's a reply in the middle of a discussion ...
>
> What I managed to decode is that this:
>
> static int __orderly_poweroff(bool force)
> {
> int ret;
>
> ret = run_cmd(poweroff_cmd);
>
> if (ret && force) {
> pr_warn("Failed to start orderly shutdown: forcing the issue\n");
>
> /*
> * I guess this should try to kick off some daemon to sync and
> * poweroff asap. Or not even bother syncing if we're doing an
> * emergency shutdown?
> */
> emergency_sync();
> kernel_power_off();
> }
>
> return ret;
> }
>
> could fail to actually power the system off, if the run_cmd(poweroff_cmd)
> 'succeeds', but due to a user-space bug it does not actually call the real
> poweroff system call?
>
I tried to simulate the issue.
In the probe function of drivers/thermal/ti-soc-thermal/ti-bandgap.c
ti_bandgap_probe i call
orderly_poweroff(true);
This is while driver probes are still on going. I observe that
ret = run_cmd(poweroff_cmd);
ret is a non-zero value and we enter the if condition:
Even after the
emergency_sync();
kernel_power_off();
calls
the console remained active in weird state.
> Thanks,
>
> Ingo
>
[toc] | [prev] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2016-01-14 12:30 +0100 |
| Message-ID | <qQOgh-6eV-1@gated-at.bofh.it> |
| In reply to | #1309169 |
* Keerthy <a0393675@ti.com> wrote: > I tried to simulate the issue. > > In the probe function of drivers/thermal/ti-soc-thermal/ti-bandgap.c > ti_bandgap_probe i call > > orderly_poweroff(true); > > This is while driver probes are still on going. I observe that > ret = run_cmd(poweroff_cmd); > > ret is a non-zero value and we enter the if condition: > > Even after the > > emergency_sync(); > kernel_power_off(); > > calls > > the console remained active in weird state. Now _that_ is clearly an architecture bug that should not be papered over ... If kernel_power_off() is called then the system should power off. No ifs and whens. Thanks, Ingo
[toc] | [prev] | [next] | [standalone]
| From | One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> |
|---|---|
| Date | 2016-01-14 14:30 +0100 |
| Message-ID | <qQQ8r-7DE-29@gated-at.bofh.it> |
| In reply to | #1309188 |
> > If kernel_power_off() is called then the system should power off. No ifs and > whens. Even if it doesn't the watchdog should kill it. That is broken on some platforms on the watchdog side as the watchdog shuts down during our power off callbacks - because the system firmware is too stupid to reset the watchdog as it powers back up (so keeps rebooting). If you watchdog and firmware function properly you shouldn't even have to care if you crash during the kernel power off. Alan
[toc] | [prev] | [next] | [standalone]
| From | Russell King - ARM Linux <linux@arm.linux.org.uk> |
|---|---|
| Date | 2016-01-14 15:30 +0100 |
| Message-ID | <qQR4u-8kt-23@gated-at.bofh.it> |
| In reply to | #1309188 |
On Thu, Jan 14, 2016 at 12:23:54PM +0100, Ingo Molnar wrote: > * Keerthy <a0393675@ti.com> wrote: > > I tried to simulate the issue. > > > > In the probe function of drivers/thermal/ti-soc-thermal/ti-bandgap.c > > ti_bandgap_probe i call > > > > orderly_poweroff(true); > > > > This is while driver probes are still on going. I observe that > > ret = run_cmd(poweroff_cmd); > > > > ret is a non-zero value and we enter the if condition: > > > > Even after the > > > > emergency_sync(); > > kernel_power_off(); > > > > calls > > > > the console remained active in weird state. > > Now _that_ is clearly an architecture bug that should not be papered over ... No, it's not an architecture bug - it's a platform bug. The ARM architecture has no standard way to control CPU reset or system power, all that is up to the platform. > If kernel_power_off() is called then the system should power off. No > ifs and whens. There definitely are ifs and whens. Only if the platform has support, and when that support works. If the platform does not provide such support, or that support is broken, there's nothing that can be done at the architecture level. Looking at the log given via the message that was referred to in a previous message in this thread, it looks like userspace fails to get to the point of calling into the kernel: 159.636627] rc S c0756104 0 527 1 0x00000000 159.643027] [<c0756104>] (__schedule) from [<c0756778>] (schedule+0x40/0x98) 159.650108] [<c0756778>] (schedule) from [<c0193c50>] (pipe_wait+0x60/0x9c) 159.657102] [<c0193c50>] (pipe_wait) from [<c0193cc0>] (wait_for_partner+0x34/0x 159.664792] [<c0193cc0>] (wait_for_partner) from [<c01947fc>] (fifo_open+0x1a4/0 159.672658] [<c01947fc>] (fifo_open) from [<c018a5c0>] (do_dentry_open+0x1c8/0x3 159.680351] [<c018a5c0>] (do_dentry_open) from [<c019855c>] (do_last+0x64c/0xce0 159.687867] [<c019855c>] (do_last) from [<c019adf8>] (path_openat+0x80/0x608) 159.695036] [<c019adf8>] (path_openat) from [<c019be34>] (do_filp_open+0x2c/0x88 159.702555] [<c019be34>] (do_filp_open) from [<c018b94c>] (do_sys_open+0xfc/0x1c 159.710158] [<c018b94c>] (do_sys_open) from [<c00102a0>] (ret_fast_syscall+0x0/0 and later on, it's still there: 219.253041] rc S c0756104 0 527 1 0x00000000 219.259443] [<c0756104>] (__schedule) from [<c0756778>] (schedule+0x40/0x98) 219.266524] [<c0756778>] (schedule) from [<c0193c50>] (pipe_wait+0x60/0x9c) 219.273516] [<c0193c50>] (pipe_wait) from [<c0193cc0>] (wait_for_partner+0x34/0x 219.281206] [<c0193cc0>] (wait_for_partner) from [<c01947fc>] (fifo_open+0x1a4/0 219.289071] [<c01947fc>] (fifo_open) from [<c018a5c0>] (do_dentry_open+0x1c8/0x3 219.296762] [<c018a5c0>] (do_dentry_open) from [<c019855c>] (do_last+0x64c/0xce0 The 'rc' script in sysvinit/upstart is normally responsible for walking through /etc/rc?.d/* running the scripts in order. It looks like this has wedged, and so it's not getting anywhere near to asking the kernel to shut down. That's even more confirmed by there being no "Power down" message in the log, which is printed by kernel_power_off(). So I'm not convinced that the pointed to log is actually an illustration of the problem that its being discussed here: it looks to me like some other failure, and it looks like 'rc' is stuck trying to open a fifo. It would be nice to see an example of a log where we have proof that kernel_power_off() was called (via the "Power down" message being in the log.) In any case, at the architecture level, if a platform code fails to reboot, we print "Reboot failed -- System halted", disable IRQs and spin. We don't print anything if a platform hasn't provided a "pm_power_off()" hook, or that hook fails though - we just fall back to the generic code which does a do_exit(0) for the caller. I think some people have their power off/reboot stuff as part of their watchdog driver, which can be a loadable module - if the module isn't loaded, then these facilities are not available. -- RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web