BUG: scheduling while atomic: swapper/1/0x00000002
Modules linked in:
Pid: 1, comm: swapper Tainted: G W 2.6.27-rc4-zenmmotm1 #4
[<c057a0c7>] schedule+0x287/0x6d0
[<c03672e6>] vsnprintf+0x3a6/0x6c0
[<c057a92d>] schedule_timeout+0x7d/0xb0
[<c021e0c8>] __wake_up+0x38/0x50
[<c057a74a>] wait_for_common+0x8a/0x130
[<c0220ab0>] default_wake_function+0x0/0x10
[<c0237743>] call_usermodehelper_exec+0xc3/0xf0
[<c0362ede>] kobject_uevent_env+0x37e/0x3a0
[<c03d5921>] device_add+0x551/0x630
[<c03d5ac3>] device_create_vargs+0xb3/0xd0
[<c06ccc47>] microcode_intel_module_init+0x0/0x39
[<c03d5b0b>] device_create+0x2b/0x30
[<c0385f2e>] misc_register+0xbe/0x170
[<c02137d1>] microcode_init+0x21/0xf0
[<c0201336>] do_one_initcall+0x26/0x170
[<c021e0c8>] __wake_up+0x38/0x50
[<c0237c98>] insert_work+0x48/0x50
[<c02380a5>] __queue_work+0x25/0x40
[<c023812a>] queue_work_on+0x3a/0x50
[<c06c29bf>] kernel_init+0x170/0x251
[<c06c284f>] kernel_init+0x0/0x251
[<c0204157>] kernel_thread_helper+0x7/0x10
=======================
On Mon, 25 Aug 2008 22:09:25 -0400 "Ryan Hope" <[email protected]> wrote:
> BUG: scheduling while atomic: swapper/1/0x00000002
> Modules linked in:
> Pid: 1, comm: swapper Tainted: G W 2.6.27-rc4-zenmmotm1 #4
> [<c057a0c7>] schedule+0x287/0x6d0
> [<c03672e6>] vsnprintf+0x3a6/0x6c0
> [<c057a92d>] schedule_timeout+0x7d/0xb0
> [<c021e0c8>] __wake_up+0x38/0x50
> [<c057a74a>] wait_for_common+0x8a/0x130
> [<c0220ab0>] default_wake_function+0x0/0x10
> [<c0237743>] call_usermodehelper_exec+0xc3/0xf0
> [<c0362ede>] kobject_uevent_env+0x37e/0x3a0
> [<c03d5921>] device_add+0x551/0x630
> [<c03d5ac3>] device_create_vargs+0xb3/0xd0
> [<c06ccc47>] microcode_intel_module_init+0x0/0x39
> [<c03d5b0b>] device_create+0x2b/0x30
> [<c0385f2e>] misc_register+0xbe/0x170
> [<c02137d1>] microcode_init+0x21/0xf0
> [<c0201336>] do_one_initcall+0x26/0x170
> [<c021e0c8>] __wake_up+0x38/0x50
> [<c0237c98>] insert_work+0x48/0x50
> [<c02380a5>] __queue_work+0x25/0x40
> [<c023812a>] queue_work_on+0x3a/0x50
> [<c06c29bf>] kernel_init+0x170/0x251
> [<c06c284f>] kernel_init+0x0/0x251
> [<c0204157>] kernel_thread_helper+0x7/0x10
> =======================
As a mad guess, I'd guess that someone changed get_online_cpus() so
that disables preemption (with a suitable config combination, perhaps).
Which would cause microcode_init()'s sysdev_driver_register() to run
in atomic context.
But that's just a guess - I can't immediately see any change in there
which does this. Ingo, any theories?
On Tue, Aug 26, 2008 at 8:37 AM, Andrew Morton
<[email protected]> wrote:
> On Mon, 25 Aug 2008 22:09:25 -0400 "Ryan Hope" <[email protected]> wrote:
>
>> BUG: scheduling while atomic: swapper/1/0x00000002
>> Modules linked in:
>> Pid: 1, comm: swapper Tainted: G W 2.6.27-rc4-zenmmotm1 #4
>> [<c057a0c7>] schedule+0x287/0x6d0
>> [<c03672e6>] vsnprintf+0x3a6/0x6c0
>> [<c057a92d>] schedule_timeout+0x7d/0xb0
>> [<c021e0c8>] __wake_up+0x38/0x50
>> [<c057a74a>] wait_for_common+0x8a/0x130
>> [<c0220ab0>] default_wake_function+0x0/0x10
>> [<c0237743>] call_usermodehelper_exec+0xc3/0xf0
>> [<c0362ede>] kobject_uevent_env+0x37e/0x3a0
>> [<c03d5921>] device_add+0x551/0x630
>> [<c03d5ac3>] device_create_vargs+0xb3/0xd0
>> [<c06ccc47>] microcode_intel_module_init+0x0/0x39
>> [<c03d5b0b>] device_create+0x2b/0x30
>> [<c0385f2e>] misc_register+0xbe/0x170
>> [<c02137d1>] microcode_init+0x21/0xf0
>> [<c0201336>] do_one_initcall+0x26/0x170
>> [<c021e0c8>] __wake_up+0x38/0x50
>> [<c0237c98>] insert_work+0x48/0x50
>> [<c02380a5>] __queue_work+0x25/0x40
>> [<c023812a>] queue_work_on+0x3a/0x50
>> [<c06c29bf>] kernel_init+0x170/0x251
>> [<c06c284f>] kernel_init+0x0/0x251
>> [<c0204157>] kernel_thread_helper+0x7/0x10
>> =======================
>
> As a mad guess, I'd guess that someone changed get_online_cpus() so
> that disables preemption (with a suitable config combination, perhaps).
> Which would cause microcode_init()'s sysdev_driver_register() to run
> in atomic context.
>
> But that's just a guess - I can't immediately see any change in there
> which does this. Ingo, any theories?
Looks like the kernel was W-tainted already... so likely there was a
BUG or a WARNING even before this. And I think this sort of warning
can happen if a(nother) process was killed while preemption was off
(e.g. a BUG() at the wrong moment). Ryan?
Vegard
--
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
-- E. W. Dijkstra, EWD1036
2008/8/26 Ryan Hope <[email protected]>:
> BUG: scheduling while atomic: swapper/1/0x00000002
> Modules linked in:
> Pid: 1, comm: swapper Tainted: G W 2.6.27-rc4-zenmmotm1 #4
> [<c057a0c7>] schedule+0x287/0x6d0
> [<c03672e6>] vsnprintf+0x3a6/0x6c0
> [<c057a92d>] schedule_timeout+0x7d/0xb0
> [<c021e0c8>] __wake_up+0x38/0x50
> [<c057a74a>] wait_for_common+0x8a/0x130
> [<c0220ab0>] default_wake_function+0x0/0x10
> [<c0237743>] call_usermodehelper_exec+0xc3/0xf0
> [<c0362ede>] kobject_uevent_env+0x37e/0x3a0
> [<c03d5921>] device_add+0x551/0x630
> [<c03d5ac3>] device_create_vargs+0xb3/0xd0
> [<c06ccc47>] microcode_intel_module_init+0x0/0x39
It doesn't look like Linus's tree... there is no
microcode_intel_module_init() in .27+. So what is it?
Anyway, your trace might be explained by a bug that has been already
fixed in Ingo's -tip.
Here is the commit:
http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=commit;h=8343ef2437c599d30568e6b5a257a40bf2f4902b
--
Best regards,
Dmitry Adamushko
On Tue, 26 Aug 2008 10:11:24 +0200 "Dmitry Adamushko" <[email protected]> wrote:
> 2008/8/26 Ryan Hope <[email protected]>:
> > BUG: scheduling while atomic: swapper/1/0x00000002
> > Modules linked in:
> > Pid: 1, comm: swapper Tainted: G W 2.6.27-rc4-zenmmotm1 #4
> > [<c057a0c7>] schedule+0x287/0x6d0
> > [<c03672e6>] vsnprintf+0x3a6/0x6c0
> > [<c057a92d>] schedule_timeout+0x7d/0xb0
> > [<c021e0c8>] __wake_up+0x38/0x50
> > [<c057a74a>] wait_for_common+0x8a/0x130
> > [<c0220ab0>] default_wake_function+0x0/0x10
> > [<c0237743>] call_usermodehelper_exec+0xc3/0xf0
> > [<c0362ede>] kobject_uevent_env+0x37e/0x3a0
> > [<c03d5921>] device_add+0x551/0x630
> > [<c03d5ac3>] device_create_vargs+0xb3/0xd0
> > [<c06ccc47>] microcode_intel_module_init+0x0/0x39
>
> It doesn't look like Linus's tree... there is no
> microcode_intel_module_init() in .27+. So what is it?
mmotm is linux-next plus -mm stuff
> Anyway, your trace might be explained by a bug that has been already
> fixed in Ingo's -tip.
>
> Here is the commit:
> http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=commit;h=8343ef2437c599d30568e6b5a257a40bf2f4902b
Yes, an unbalanced get_cpu() would explain it.
However that patch is already in current -mm. Ryan, can you please
check to see if it's in the version you tested? The "fixed" version
looks like this:
static int __init microcode_intel_module_init(void)
{
struct cpuinfo_x86 *c = &cpu_data(get_cpu());
if (c->x86_vendor == X86_VENDOR_INTEL)
return microcode_init(µcode_intel_ops, THIS_MODULE);
else
return -ENODEV;
}