Bug 51661 - Computer stops working after power supply introduced
Computer stops working after power supply introduced
Status: CLOSED CODE_FIX
Product: ACPI
Classification: Unclassified
Component: Power-Battery
x86-64 Linux
: P1 normal
Assigned To: acpi_power-battery
:
: 51721 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-13 00:21 UTC by William Giokas
Modified: 2013-01-28 23:20 UTC (History)
11 users (show)

See Also:
Kernel Version: 3.7
Tree: Mainline
Regression: Yes


Attachments
3.8-rc1 patch backported to 3.7 (2.71 KB, patch)
2013-01-08 02:54 UTC, Len Brown
Details | Diff

Description William Giokas 2012-12-13 00:21:16 UTC
After upgrading from 3.7-rc8 to 3.7, I can no longer plug in the power supply to my laptop and not freeze everything. Downgrading to 3.7-rc8 fixes the problem.

Steps to reproduce:
1) Install linux 3.7
2) Unplug power supply if connected
3) Plug power supply back in

Results:
Computer becomes wholly unresponsive.

Expected results:
Computer should continue working fine.

Build date and platform:
Build Date     : Tue 11 Dec 2012 12:30:56 AM CST
Platform       : Arch Linux




Additional Information:

I ran a git bisect from 3.7-rc8 to 3.7, and this seems to be the offending commit: 

8d4516904b39507458bee8115793528e12b1d8dd is the first bad commit
commit 8d4516904b39507458bee8115793528e12b1d8dd
Author: Thomas Gleixner <tglx@linutronix.de>
Date:   Tue Dec 4 18:59:34 2012 +0100

    watchdog: Fix CPU hotplug regression
    
    Norbert reported:
    "3.7-rc6 booted with nmi_watchdog=0 fails to suspend to RAM or
     offline CPUs. It's reproducable with a KVM guest and physical
     system."
    
    The reason is that commit bcd951cf(watchdog: Use hotplug thread
    infrastructure) missed to take this into account. So the cpu offline
    code gets stuck in the teardown function because it accesses non
    initialized data structures.
    
    Add a check for watchdog_enabled into that path to cure the issue.
    
    Reported-and-tested-by: Norbert Warmuth <nwarmuth@t-online.de>
    Tested-by: Joseph Salisbury <joseph.salisbury@canonical.com>
    Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1211231033230.2701@ionos
    Link: http://bugs.launchpad.net/bugs/1079534
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

:040000 040000 32962c88d16bc0cf841e114b181163c9450dabde dc9ba81b3cf7a8b40f739855dd9c1a08aaa2fbc5 M      kernel

Thank you,
William Giokas
Comment 1 Matthias Blaicher 2012-12-15 13:01:31 UTC
I see this too on my Lenovo X220. Probably bug #51721 is a duplicate of this bug.
Comment 2 wander.homer 2012-12-15 14:12:08 UTC
*** Bug 51721 has been marked as a duplicate of this bug. ***
Comment 3 William Giokas 2012-12-15 16:41:37 UTC
https://lkml.org/lkml/2012/12/14/65

There seems to be someone else that found the same commit as I did.
Comment 4 Matthias Blaicher 2012-12-15 17:09:27 UTC
Makes sense - I'm running laptop mode.
Comment 5 wander.homer 2012-12-15 17:19:40 UTC
Confirmed:

echo 0 > /proc/sys/kernel/nmi_watchdog
echo 1 > /proc/sys/kernel/nmi_watchdog

results in a kernel panic and disabling laptop-mode-tools works for now.
Comment 6 Matthias Blaicher 2012-12-17 12:41:55 UTC
So if it understand it correctly, this is not yet fixed in Linus' master tree - which means that it is not yet in the upcoming release Linux 3.7.1.

I think the patch posted by Bjørn Mork looks reasonable, thought:
> https://lkml.org/lkml/2012/12/14/146
Comment 7 Maciej Rutecki 2012-12-18 20:44:39 UTC
Confirm the same problem on my machine
Comment 9 joni 2013-01-02 06:46:15 UTC
I can conform this bug on two Lenovo machines (U160 + e330) trying the latest kernel v3.7.1. The machines freeze also when they are in standby mode I plug in the power supply and wake them up.
Comment 10 Bernhard Cygan 2013-01-07 11:54:28 UTC
confirmed on my laptop (Dell Latitude E6420), running kernel 3.7.0-7-generic
Comment 11 Len Brown 2013-01-08 02:54:56 UTC
Created attachment 90661 [details]
3.8-rc1 patch backported to 3.7

try this 3.8-rc1 pach in your 3.7.* kernel

it is marked for .stable, but doesn't appear in 3.7-stable yet.
Comment 12 Mike Rogers 2013-01-12 04:26:52 UTC
Bug still exists in 3.7.2.
Comment 13 Bjørn Mork 2013-01-17 17:34:49 UTC
3.7.3 is now released with the fix for this bug, and everybody should be happy. Enjoy!
Comment 14 Len Brown 2013-01-28 23:19:53 UTC
closed

3.7.3 tree:

commit b791ca8fdc546678386a98a17be6f872472f50a4
Author: Bjørn Mork <bjorn@mork.no>
Date:   Wed Dec 19 20:51:31 2012 +0100

    watchdog: Fix disable/enable regression
    
    commit 3935e89505a1c3ab3f3b0c7ef0eae54124f48905 upstream.
    
    Commit 8d4516904b39 ("watchdog: Fix CPU hotplug regression") causes an
    oops or hard lockup when doing

Note You need to log in before you can comment on or make changes to this bug.