From: Michael Bohan <mbohan@codeaurora.org>
To: cernekee@gmail.com, mingo@elte.hu, akpm@linux-foundation.org,
simon.kagstrom@netinsight.net, David.Woodhouse@intel.com,
lethal@linux-sh.org, tj@kernel.orglethal@linux-sh.org
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: console_cpu_notify can cause scheduling BUG during CPU hotplug
Date: Mon, 25 Apr 2011 16:33:27 -0700 [thread overview]
Message-ID: <4DB604C7.8090305@codeaurora.org> (raw)
Hi,
I've run into a crash scenario during CPU hotplug on ARM/MSM where we
BUG() due to a schedule while atomic in v2.6.38-rc6. The issue appears
to be that the console cpu notifier can block on a semaphore during
cpu_stopper_thread's atomic code path. Preemption is explicitly disabled
in cpu_stopper_thread.
The suspected path was added with this commit:
commit 034260d6779087431a8b2f67589c68b919299e5c
Author: Kevin Cernekee <cernekee@gmail.com>
Date: Thu Jun 3 22:11:25 2010 -0700
printk: fix delayed messages from CPU hotplug events
I was curious if this scenario was accounted for in the design of the
console CPU notifier. One workaround for this problem is to remove
CPU_DEAD from the possible actions in console_cpu_notify(). In fact,
v1-v4 of the patch above did not have CPU_DEAD, CPU_DYING or
CPU_DOWN_FAILED in the list of actions. I wasn't able to track down why
the other cases were added in the final patch.
Crash log:
<3>[ 21.408237] BUG: scheduling while atomic: migration/1/371/0x00000002
<4>[ 21.408247] Modules linked in:
<4>[ 21.408286] [<c0050e40>] (unwind_backtrace+0x0/0x128) from
[<c056748c>] (schedule+0x9c/0x6c4)
<4>[ 21.408303] [<c056748c>] (schedule+0x9c/0x6c4) from [<c0567d04>]
(schedule_timeout+0x1c/0x208)
<4>[ 21.408319] [<c0567d04>] (schedule_timeout+0x1c/0x208) from
[<c0568fac>] (__down+0x68/0x98)
<4>[ 21.408337] [<c0568fac>] (__down+0x68/0x98) from [<c00d844c>]
(down+0x2c/0x3c)
<4>[ 21.408354] [<c00d844c>] (down+0x2c/0x3c) from [<c00bb23c>]
(console_lock+0x38/0x60)
<4>[ 21.408377] [<c00bb23c>] (console_lock+0x38/0x60) from
[<c0564c80>] (console_cpu_notify+0x20/0x2c)
<4>[ 21.408394] [<c0564c80>] (console_cpu_notify+0x20/0x2c) from
[<c00d8488>] (notifier_call_chain+0x2c/0x70)
<4>[ 21.408410] [<c00d8488>] (notifier_call_chain+0x2c/0x70) from
[<c00bc318>] (__cpu_notify+0x24/0x3c)
<4>[ 21.408425] [<c00bc318>] (__cpu_notify+0x24/0x3c) from
[<c0552e7c>] (take_cpu_down+0x2c/0x34)
<4>[ 21.408444] [<c0552e7c>] (take_cpu_down+0x2c/0x34) from
[<c00f34d4>] (stop_machine_cpu_stop+0xc0/0x11c)
<4>[ 21.408462] [<c00f34d4>] (stop_machine_cpu_stop+0xc0/0x11c) from
[<c00f337c>] (cpu_stopper_thread+0xc8/0x160)
<4>[ 21.408482] [<c00f337c>] (cpu_stopper_thread+0xc8/0x160) from
[<c00d30b0>] (kthread+0x80/0x88)
<4>[ 21.408498] [<c00d30b0>] (kthread+0x80/0x88) from [<c004b6a0>]
(kernel_thread_exit+0x0/0x8)
Thanks,
Mike
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
WARNING: multiple messages have this Message-ID (diff)
From: mbohan@codeaurora.org (Michael Bohan)
To: linux-arm-kernel@lists.infradead.org
Subject: console_cpu_notify can cause scheduling BUG during CPU hotplug
Date: Mon, 25 Apr 2011 16:33:27 -0700 [thread overview]
Message-ID: <4DB604C7.8090305@codeaurora.org> (raw)
Hi,
I've run into a crash scenario during CPU hotplug on ARM/MSM where we
BUG() due to a schedule while atomic in v2.6.38-rc6. The issue appears
to be that the console cpu notifier can block on a semaphore during
cpu_stopper_thread's atomic code path. Preemption is explicitly disabled
in cpu_stopper_thread.
The suspected path was added with this commit:
commit 034260d6779087431a8b2f67589c68b919299e5c
Author: Kevin Cernekee <cernekee@gmail.com>
Date: Thu Jun 3 22:11:25 2010 -0700
printk: fix delayed messages from CPU hotplug events
I was curious if this scenario was accounted for in the design of the
console CPU notifier. One workaround for this problem is to remove
CPU_DEAD from the possible actions in console_cpu_notify(). In fact,
v1-v4 of the patch above did not have CPU_DEAD, CPU_DYING or
CPU_DOWN_FAILED in the list of actions. I wasn't able to track down why
the other cases were added in the final patch.
Crash log:
<3>[ 21.408237] BUG: scheduling while atomic: migration/1/371/0x00000002
<4>[ 21.408247] Modules linked in:
<4>[ 21.408286] [<c0050e40>] (unwind_backtrace+0x0/0x128) from
[<c056748c>] (schedule+0x9c/0x6c4)
<4>[ 21.408303] [<c056748c>] (schedule+0x9c/0x6c4) from [<c0567d04>]
(schedule_timeout+0x1c/0x208)
<4>[ 21.408319] [<c0567d04>] (schedule_timeout+0x1c/0x208) from
[<c0568fac>] (__down+0x68/0x98)
<4>[ 21.408337] [<c0568fac>] (__down+0x68/0x98) from [<c00d844c>]
(down+0x2c/0x3c)
<4>[ 21.408354] [<c00d844c>] (down+0x2c/0x3c) from [<c00bb23c>]
(console_lock+0x38/0x60)
<4>[ 21.408377] [<c00bb23c>] (console_lock+0x38/0x60) from
[<c0564c80>] (console_cpu_notify+0x20/0x2c)
<4>[ 21.408394] [<c0564c80>] (console_cpu_notify+0x20/0x2c) from
[<c00d8488>] (notifier_call_chain+0x2c/0x70)
<4>[ 21.408410] [<c00d8488>] (notifier_call_chain+0x2c/0x70) from
[<c00bc318>] (__cpu_notify+0x24/0x3c)
<4>[ 21.408425] [<c00bc318>] (__cpu_notify+0x24/0x3c) from
[<c0552e7c>] (take_cpu_down+0x2c/0x34)
<4>[ 21.408444] [<c0552e7c>] (take_cpu_down+0x2c/0x34) from
[<c00f34d4>] (stop_machine_cpu_stop+0xc0/0x11c)
<4>[ 21.408462] [<c00f34d4>] (stop_machine_cpu_stop+0xc0/0x11c) from
[<c00f337c>] (cpu_stopper_thread+0xc8/0x160)
<4>[ 21.408482] [<c00f337c>] (cpu_stopper_thread+0xc8/0x160) from
[<c00d30b0>] (kthread+0x80/0x88)
<4>[ 21.408498] [<c00d30b0>] (kthread+0x80/0x88) from [<c004b6a0>]
(kernel_thread_exit+0x0/0x8)
Thanks,
Mike
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
WARNING: multiple messages have this Message-ID (diff)
From: Michael Bohan <mbohan@codeaurora.org>
To: cernekee@gmail.com, mingo@elte.hu, akpm@linux-foundation.org,
simon.kagstrom@netinsight.net, David.Woodhouse@intel.com,
lethal@linux-sh.org, tj@kernel.org, lethal@linux-sh.org
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: console_cpu_notify can cause scheduling BUG during CPU hotplug
Date: Mon, 25 Apr 2011 16:33:27 -0700 [thread overview]
Message-ID: <4DB604C7.8090305@codeaurora.org> (raw)
Hi,
I've run into a crash scenario during CPU hotplug on ARM/MSM where we
BUG() due to a schedule while atomic in v2.6.38-rc6. The issue appears
to be that the console cpu notifier can block on a semaphore during
cpu_stopper_thread's atomic code path. Preemption is explicitly disabled
in cpu_stopper_thread.
The suspected path was added with this commit:
commit 034260d6779087431a8b2f67589c68b919299e5c
Author: Kevin Cernekee <cernekee@gmail.com>
Date: Thu Jun 3 22:11:25 2010 -0700
printk: fix delayed messages from CPU hotplug events
I was curious if this scenario was accounted for in the design of the
console CPU notifier. One workaround for this problem is to remove
CPU_DEAD from the possible actions in console_cpu_notify(). In fact,
v1-v4 of the patch above did not have CPU_DEAD, CPU_DYING or
CPU_DOWN_FAILED in the list of actions. I wasn't able to track down why
the other cases were added in the final patch.
Crash log:
<3>[ 21.408237] BUG: scheduling while atomic: migration/1/371/0x00000002
<4>[ 21.408247] Modules linked in:
<4>[ 21.408286] [<c0050e40>] (unwind_backtrace+0x0/0x128) from
[<c056748c>] (schedule+0x9c/0x6c4)
<4>[ 21.408303] [<c056748c>] (schedule+0x9c/0x6c4) from [<c0567d04>]
(schedule_timeout+0x1c/0x208)
<4>[ 21.408319] [<c0567d04>] (schedule_timeout+0x1c/0x208) from
[<c0568fac>] (__down+0x68/0x98)
<4>[ 21.408337] [<c0568fac>] (__down+0x68/0x98) from [<c00d844c>]
(down+0x2c/0x3c)
<4>[ 21.408354] [<c00d844c>] (down+0x2c/0x3c) from [<c00bb23c>]
(console_lock+0x38/0x60)
<4>[ 21.408377] [<c00bb23c>] (console_lock+0x38/0x60) from
[<c0564c80>] (console_cpu_notify+0x20/0x2c)
<4>[ 21.408394] [<c0564c80>] (console_cpu_notify+0x20/0x2c) from
[<c00d8488>] (notifier_call_chain+0x2c/0x70)
<4>[ 21.408410] [<c00d8488>] (notifier_call_chain+0x2c/0x70) from
[<c00bc318>] (__cpu_notify+0x24/0x3c)
<4>[ 21.408425] [<c00bc318>] (__cpu_notify+0x24/0x3c) from
[<c0552e7c>] (take_cpu_down+0x2c/0x34)
<4>[ 21.408444] [<c0552e7c>] (take_cpu_down+0x2c/0x34) from
[<c00f34d4>] (stop_machine_cpu_stop+0xc0/0x11c)
<4>[ 21.408462] [<c00f34d4>] (stop_machine_cpu_stop+0xc0/0x11c) from
[<c00f337c>] (cpu_stopper_thread+0xc8/0x160)
<4>[ 21.408482] [<c00f337c>] (cpu_stopper_thread+0xc8/0x160) from
[<c00d30b0>] (kthread+0x80/0x88)
<4>[ 21.408498] [<c00d30b0>] (kthread+0x80/0x88) from [<c004b6a0>]
(kernel_thread_exit+0x0/0x8)
Thanks,
Mike
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
next reply other threads:[~2011-04-25 23:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-25 23:33 Michael Bohan [this message]
2011-04-25 23:33 ` console_cpu_notify can cause scheduling BUG during CPU hotplug Michael Bohan
2011-04-25 23:33 ` Michael Bohan
2011-04-26 0:18 ` Kevin Cernekee
2011-04-26 0:18 ` Kevin Cernekee
2011-04-26 5:58 ` Santosh Shilimkar
2011-04-26 5:58 ` Santosh Shilimkar
2011-04-26 5:58 ` Santosh Shilimkar
2011-04-26 21:06 ` Michael Bohan
2011-04-26 21:06 ` Michael Bohan
2011-04-27 7:38 ` Borislav Petkov
2011-04-27 7:38 ` Borislav Petkov
2011-04-27 22:12 ` Michael Bohan
2011-04-27 22:12 ` Michael Bohan
2011-04-27 22:12 ` Michael Bohan
2011-04-30 8:38 ` Borislav Petkov
2011-04-30 8:38 ` Borislav Petkov
2011-05-09 20:39 ` Michael Bohan
2011-05-09 20:39 ` Michael Bohan
2011-05-09 20:39 ` Michael Bohan
-- strict thread matches above, loose matches on Subject: below --
2011-08-30 8:37 Shen Canquan
2011-09-05 8:34 ` canquan.shen
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=4DB604C7.8090305@codeaurora.org \
--to=mbohan@codeaurora.org \
--cc=David.Woodhouse@intel.com \
--cc=akpm@linux-foundation.org \
--cc=cernekee@gmail.com \
--cc=lethal@linux-sh.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=simon.kagstrom@netinsight.net \
--cc=tj@kernel.orglethal \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.