public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Jenkins <alan-jenkins-cCz0Lq7MMjm9FHfhHBbuYA@public.gmane.org>
To: "Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>
Cc: Kernel Testers List
	<kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux acpi <linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-kernel
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Regression: BUG when battery is removed before resuming from hibernation
Date: Wed, 09 Jun 2010 10:07:20 +0100	[thread overview]
Message-ID: <4C0F59C8.8020704@tuffmail.co.uk> (raw)
In-Reply-To: <201006082252.49452.rjw-KKrjLPT3xs0@public.gmane.org>

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.

  parent reply	other threads:[~2010-06-09  9:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-08 13:08 Regression: BUG when battery is removed before resuming from hibernation Alan Jenkins
     [not found] ` <4C0E40E1.2080108-cCz0Lq7MMjm9FHfhHBbuYA@public.gmane.org>
2010-06-08 15:27   ` Alan Jenkins
2010-06-08 20:52   ` Regression: " Rafael J. Wysocki
     [not found]     ` <201006082252.49452.rjw-KKrjLPT3xs0@public.gmane.org>
2010-06-09  9:07       ` Alan Jenkins [this message]
     [not found]         ` <4C0F59C8.8020704-cCz0Lq7MMjm9FHfhHBbuYA@public.gmane.org>
2010-06-09  9:14           ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C0F59C8.8020704@tuffmail.co.uk \
    --to=alan-jenkins-ccz0lq7mmjm9fhfhhbbuya@public.gmane.org \
    --cc=kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rjw-KKrjLPT3xs0@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox