Red Hat Bugzilla – Bug 772730
Kernel panic after ACPI power event with x86_64 kernel
Last modified: 2013-01-10 03:26:33 EST
Description of problem:
Dell Inspiron Duo i1090 (Atom N570). When connecting or disconnecting the power connector while the system is awake (= not suspended), the x86_64 kernel panics. This does not happen with an i686 kernel.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Boot x86_64 kernel (tested with standard boot, single user and "rdbreak=pre-udev")
2. Remove (or attach) power cord
3. Kernel panic
* Does not happen with i686 kernels ;
* "acpi=none" makes no difference, "pci=noapic" does not boot ;
* Reported on Ubuntu as early as July 2011 :
* Power can be connected and disconnected when the system is in sleep mode, as long as, before resuming, power is reverted to its original state before the suspend.
I installed and ran kdump as specified in wiki (http://fedoraproject.org/wiki/How_to_use_kdump_to_debug_kernel_crashes), unfortunately to no avail.
The i1090 has no serial port.
Hence, please find some panic screenshots in attach.
1. in 'img1', some info has already scrolled past the visible screen ;
2. after a pause of approx. 20 seconds, 'img2' appears' ;
3. after approx. 2 seconds, 'img3' is the final feedback.
Created attachment 551654 [details]
screenshot 1 of kernel panic
Created attachment 551655 [details]
screenshot 2 of kernel panic
Created attachment 551656 [details]
screenshot 3 of kernel panic
Created attachment 551658 [details]
i1090 dmesg (single user mode)
It seems the firmware is registering two devices with the same name (or so I'm told). Can you attach the output of acpidump?
Created attachment 551677 [details]
acpidump --output i1090_acpidump.out
(In reply to comment #5)
> Can you attach the output of acpidump?
Thank you for the fast reply, Josh ; much appreciated.
Attachment #5 [details].
OK, there are definitely two ACAD entries in the ACPI DSDT table. One is on the system bus, the other is off of PCI0 but the naming makes them ambiguous. I'll send this to linux-acpi
Thank you, Josh.
Would it be relevant if I'd attach i686 dmesg/acpi data, for the sake of comparison ?
I can reproduce this crash at will on my Dell Inspiron Duo i1090 with 64-bit kernel. Stables with 32-bit one.
I circumvented the x64 kernel crash by hibernating (instead of suspending) before attaching/detaching the power connector.
Unfortunately, resume on hibernation is currently failing (starting with 3.2.x kernel series, I guess). Bugger !
*** Bug 767896 has been marked as a duplicate of this bug. ***
In case more screenshots are needed:
kernel-3.3.0-4.fc16 has been pushed to the Fedora 16 stable repository.
Please retest with this update.
I tested this morning with kernel-3.3.0-4.fc16 :
- in single user mode, 4 or 5 subsequent power source changes yielded no oops ;
- booted in initlevel 5, the power source change immediately invoked an oops.
I will run a new batch of tests tomorrow.
Created attachment 572207 [details]
screenshot 4 of kernel panic (kernel-3.3.0-4.fc16)
Tested with kernel-3.3.0-4.fc16 x86_64 ; the kernel still OOPSes, both in single- and multiuser.
I updated the screenshot (the 3.3.0 stack trace may reveal more info).
Tested with kernel-3.3.2-1.fc16.x86_64 : the kernel still panics.
Kernel panic in F17 too
(tested with kernel-3.3.7-1.fc17.x86_64).
Tested with kernel-3.4.0-1.fc17.x86_64 (updates-testing repo) :
the kernel still panics when connecting or removing an AC adapter.
Panics with 3.4.2-4.fc17.x86_64.
Not wanting to spam, so is there any use in me reporting failing kernels ?
I poked linux-acpi upstream again.
/* bows */
Created attachment 594375 [details]
Can you try this patch and test again?
The patch applied cleanly against kernel-3.4.4-3.fc17 (Fedora 17 updates-testing).
I can now change power states at will without oopses ; thank you VERY much.
I would be very much obliged if this patch could be accepted for the next kernel update.
Status : CLOSED -> UPSTREAM ?
Created attachment 595219 [details]
Can you help me to test this patch which maybe more decent? If ok, I will send this one to acpi maillist. Thx.
Due to vacation abroad, I'll be able to test in about two weeks ...
I'll test it, but I'm not sure where to put that code. If you add a few instructions so I get the gist of it, I'd be happy to help
Thanks. That's easy. Just add a check return value of power_supply_register() in the driver/acpi/ac.c.
at line 295.
result = power_supply_register(&ac->device->dev, &ac->charger);
I used to run Fedora on my Dell, but now I run arch.. I did a search for ac.c but there is no such file on the system, so clearly arch handles drivers differently. I found an ac.ko.gz file, and a few acpi related header files, but nothing that I could pin down as the driver. Sorry I couldn't help!
Can you git a kernerl tree?
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
modified code, compile kernel and test.
(In reply to comment #27)
> Created attachment 595219 [details]
This patch, applied to kernel 3.4.5-2.fc17, works perfectly.
Thanks, Lan !
(In reply to comment #33)
> (In reply to comment #27)
> > Created attachment 595219 [details]
> This patch, applied to kernel 3.4.5-2.fc17, works perfectly.
> Thanks, Lan !
Thank you for testing Didier. Lan, if you post this upstream could you please put a link to it in this bug? We can get the patch added into the Fedora kernel shortly after that.
I have sent this patch to acpi maillist but no response.
(In reply to comment #35)
> hi josh:
> I have sent this patch to acpi maillist but no response.
That's fine. We'll pull it into Fedora for now and we can adjust the patch as needed.
Many thanks again.
Patch applied to all Fedora branches.
kernel-3.4.6-2.fc17 has been submitted as an update for Fedora 17.
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-3.4.6-2.fc17'
as soon as you are able to, then reboot.
Please go to the following url:
then log in and leave karma (feedback).
kernel-3.4.6-2.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
kernel-3.4.6-1.fc16 has been submitted as an update for Fedora 16.
shipped upstream in Linux-3.6-merge.
was also cc: -stable
Author: Lan Tianyu <firstname.lastname@example.org>
Date: Fri Jul 20 13:29:16 2012 +0800
ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check
kernel-3.4.6-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.