Re: Regression: BUG when battery is removed before resuming fromhibernation
From: Alan Jenkins
Date: Wed Jun 09 2010 - 05:07:40 EST
Rafael J. Wysocki wrote:
On Tuesday 08 June 2010, Alan Jenkins wrote:
I found this bug 2.6.34 on my Asus EeePC 701 (x86_32 arch). It didn't
happen to me before, when I was running nearly-2.6.33 or 2.6.32-release.
I used git-bisect, but unfortunately the result isn't very helpful. My
next step will be to try to narrowing down the culprits by disabling
individual CONFIG options. Here are my results so far, in case anyone
is interested.
== Steps to reproduce ==
I) Boot off mains power, with battery removed. Login to KDE4 session,
with Konsole as the only running application.
II) Run "sudo pm-hibernate"
1. When the system switches to text mode (a.k.a the console),
immediately insert the battery.
2. Once the system has fully hibernated, remove the battery.
3. Press the power button to resume. The backtrace below is generated
during resume.
You're not supposed to be doing that.
Rafael
I take it you mean "don't plug devices in during hibernation; you'll run
out of memory, Bad Things will happen, and you can expect resume to
fail". Pity. It wasn't an artificial test case, just an unusual usage
pattern of mine[1].
I guess it wouldn't be guaranteed safe even if I was plugging the device
in first. The battery connection could take a few seconds to stabilize,
and there's software equivalents in things like the usb-storage delay.
I can't complain about safety margins; other people might want to do
similar things with an entire docking station...
Any chance of a big screaming warning? IIRC there's one global flag to
fail userspace call-outs while userspace is frozen. Would it be
acceptable to document this in code & behaviour by aborting the
hibernation on hot-plug? (hot-*un*plug would presumably be allowed).
Alan
[1] I do this for conservation. I'm told batteries last longer if I
don't use them & let them get warm. I put the battery in for
hibernation so I can remove mains power without waiting. I start
hibernation first, because in practice you have to have the screen
closed in order to plug or unplug the battery.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/