# weird "bad: scheduling from the idle thread!" error

## nekromancer

I got a weird error in my  kern.log and it filled up most of my log.. like 20 or 30 times per second.

I think it happened while I was shuting down my laptop from the root console.

I'll post the first top half of the error message and then the other part that just repeats a million times to fill my kern.log to 238MB   :Confused: 

```

Dec 30 17:49:27 toshi BUG: scheduling while atomic: swapper/0/0x00000100

Dec 30 17:49:27 toshi 

Dec 30 17:49:27 toshi Pid: 0, comm: swapper Tainted: P          (2.6.26-gentoo-r3 #8)

Dec 30 17:49:27 toshi EIP: 0060:[<c0343abd>] EFLAGS: 00000286 CPU: 1

Dec 30 17:49:27 toshi EIP is at acpi_idle_enter_bm+0x27e/0x2e9

Dec 30 17:49:27 toshi EAX: f7c6bf84 EBX: 00002435 ECX: 0000f4f4 EDX: 02fd8000

Dec 30 17:49:27 toshi ESI: 00000000 EDI: 00bccf24 EBP: 00bcaaef ESP: f7c6bf84

Dec 30 17:49:27 toshi DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068

Dec 30 17:49:27 toshi CR0: 8005003b CR2: b5b31000 CR3: 007e5000 CR4: 000006f0

Dec 30 17:49:27 toshi DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000

Dec 30 17:49:27 toshi DR6: ffff0ff0 DR7: 00000400

Dec 30 17:49:27 toshi [<c045bfcd>] ? cpuidle_idle_call+0x52/0x7d

Dec 30 17:49:27 toshi [<c045bf7b>] ? cpuidle_idle_call+0x0/0x7d

Dec 30 17:49:27 toshi [<c01018be>] ? cpu_idle+0x8d/0xa9

Dec 30 17:49:27 toshi =======================

Dec 30 17:49:27 toshi bad: scheduling from the idle thread!

Dec 30 17:49:27 toshi Pid: 0, comm: swapper Tainted: P          2.6.26-gentoo-r3 #8

Dec 30 17:49:27 toshi [<c011dbd1>] dequeue_task_idle+0x15/0x1e

Dec 30 17:49:27 toshi [<c011924f>] dequeue_task+0xa/0x14

Dec 30 17:49:27 toshi [<c0119297>] deactivate_task+0x1b/0x30

Dec 30 17:49:27 toshi [<c058d1c0>] schedule+0x12b/0x5ed

Dec 30 17:49:27 toshi [<c012835d>] lock_timer_base+0x19/0x35

Dec 30 17:49:27 toshi [<c012846f>] __mod_timer+0x98/0xa2

Dec 30 17:49:27 toshi [<c058d925>] schedule_timeout+0x6b/0x86

Dec 30 17:49:27 toshi [<c012809a>] process_timeout+0x0/0x5

Dec 30 17:49:27 toshi [<c058d920>] schedule_timeout+0x66/0x86

Dec 30 17:49:27 toshi [<c0128486>] msleep+0xd/0x12

Dec 30 17:49:27 toshi [<c036e4dd>] iwl4965_scan_cancel_timeout+0x34/0x6a

Dec 30 17:49:27 toshi [<c0372376>] iwl4965_mac_update_tkip_key+0xae/0x18b

Dec 30 17:49:27 toshi [<c057353a>] ieee80211_tkip_decrypt_data+0x174/0x1e5

Dec 30 17:49:27 toshi [<c056c073>] ieee80211_crypto_tkip_decrypt+0xaa/0xeb

Dec 30 17:49:27 toshi [<c0575b27>] ieee80211_rx_h_decrypt+0x124/0x140

Dec 30 17:49:27 toshi [<c05745bd>] ieee80211_invoke_rx_handlers+0x21/0x1bf

Dec 30 17:49:27 toshi [<c0574a44>] __ieee80211_rx_handle_packet+0x2a3/0x79d

Dec 30 17:49:27 toshi [<c013420f>] getnstimeofday+0x32/0xb8

Dec 30 17:49:27 toshi [<c0576a2a>] __ieee80211_rx+0x440/0x492

Dec 30 17:49:27 toshi [<c036e366>] iwl4965_rx_queue_restock+0xa4/0x11c

Dec 30 17:49:27 toshi [<c0568ba4>] ieee80211_tasklet_handler+0x4b/0xe7

Dec 30 17:49:27 toshi [<c0125115>] tasklet_action+0x53/0xa5

Dec 30 17:49:27 toshi [<c0124d0a>] __do_softirq+0x5d/0xc1

Dec 30 17:49:27 toshi [<c0124da0>] do_softirq+0x32/0x36

Dec 30 17:49:27 toshi [<c0125045>] irq_exit+0x35/0x67

Dec 30 17:49:27 toshi [<c0104979>] do_IRQ+0x73/0x82

Dec 30 17:49:27 toshi [<c01034c7>] common_interrupt+0x23/0x28

Dec 30 17:49:27 toshi [<c01300d8>] bump_cpu_timer+0x90/0x130

Dec 30 17:49:27 toshi [<c0343abd>] acpi_idle_enter_bm+0x27e/0x2e9

Dec 30 17:49:27 toshi [<c045bfcd>] cpuidle_idle_call+0x52/0x7d

Dec 30 17:49:27 toshi [<c045bf7b>] cpuidle_idle_call+0x0/0x7d

Dec 30 17:49:27 toshi [<c01018be>] cpu_idle+0x8d/0xa9

Dec 30 17:49:27 toshi =======================

Dec 30 17:49:27 toshi BUG: scheduling while atomic: swapper/0/0x00000100

Dec 30 17:49:27 toshi 

Dec 30 17:49:27 toshi Pid: 0, comm: swapper Tainted: P          (2.6.26-gentoo-r3 #8)

Dec 30 17:49:27 toshi EIP: 0060:[<c0343abd>] EFLAGS: 00000286 CPU: 1

Dec 30 17:49:27 toshi EIP is at acpi_idle_enter_bm+0x27e/0x2e9

Dec 30 17:49:27 toshi EAX: f7c6bf84 EBX: 00002435 ECX: 0000f4f4 EDX: 02fd8000

Dec 30 17:49:27 toshi ESI: 00000000 EDI: 00bccf24 EBP: 00bcaaef ESP: f7c6bf84

Dec 30 17:49:27 toshi DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068

Dec 30 17:49:27 toshi CR0: 8005003b CR2: b5b31000 CR3: 36026000 CR4: 000006f0

Dec 30 17:49:27 toshi DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000

Dec 30 17:49:27 toshi DR6: ffff0ff0 DR7: 00000400

Dec 30 17:49:27 toshi [<c045bfcd>] ? cpuidle_idle_call+0x52/0x7d

Dec 30 17:49:27 toshi [<c045bf7b>] ? cpuidle_idle_call+0x0/0x7d

Dec 30 17:49:27 toshi [<c01018be>] ? cpu_idle+0x8d/0xa9

Dec 30 17:49:27 toshi =======================

Dec 30 17:49:27 toshi bad: scheduling from the idle thread!

Dec 30 17:49:27 toshi Pid: 0, comm: swapper Tainted: P          2.6.26-gentoo-r3 #8

Dec 30 17:49:27 toshi [<c011dbd1>] dequeue_task_idle+0x15/0x1e

Dec 30 17:49:27 toshi [<c011924f>] dequeue_task+0xa/0x14

Dec 30 17:49:27 toshi [<c0119297>] deactivate_task+0x1b/0x30

Dec 30 17:49:27 toshi [<c058d1c0>] schedule+0x12b/0x5ed

Dec 30 17:49:27 toshi [<c012835d>] lock_timer_base+0x19/0x35

Dec 30 17:49:27 toshi [<c012846f>] __mod_timer+0x98/0xa2

Dec 30 17:49:27 toshi [<c058d925>] schedule_timeout+0x6b/0x86

Dec 30 17:49:27 toshi [<c012809a>] process_timeout+0x0/0x5

Dec 30 17:49:27 toshi [<c058d920>] schedule_timeout+0x66/0x86

Dec 30 17:49:27 toshi [<c0128486>] msleep+0xd/0x12

Dec 30 17:49:27 toshi [<c036e4dd>] iwl4965_scan_cancel_timeout+0x34/0x6a

Dec 30 17:49:27 toshi [<c0372376>] iwl4965_mac_update_tkip_key+0xae/0x18b

Dec 30 17:49:27 toshi [<c057353a>] ieee80211_tkip_decrypt_data+0x174/0x1e5

Dec 30 17:49:27 toshi [<c056c073>] ieee80211_crypto_tkip_decrypt+0xaa/0xeb

Dec 30 17:49:27 toshi [<c0575b27>] ieee80211_rx_h_decrypt+0x124/0x140

Dec 30 17:49:27 toshi [<c05745bd>] ieee80211_invoke_rx_handlers+0x21/0x1bf

Dec 30 17:49:27 toshi [<c0574a44>] __ieee80211_rx_handle_packet+0x2a3/0x79d

Dec 30 17:49:27 toshi [<c013420f>] getnstimeofday+0x32/0xb8

Dec 30 17:49:27 toshi [<c0576a2a>] __ieee80211_rx+0x440/0x492

Dec 30 17:49:27 toshi [<c036e366>] iwl4965_rx_queue_restock+0xa4/0x11c

Dec 30 17:49:27 toshi [<c0568ba4>] ieee80211_tasklet_handler+0x4b/0xe7

Dec 30 17:49:27 toshi [<c0125115>] tasklet_action+0x53/0xa5

Dec 30 17:49:27 toshi [<c0124d0a>] __do_softirq+0x5d/0xc1

Dec 30 17:49:27 toshi [<c0124da0>] do_softirq+0x32/0x36

Dec 30 17:49:27 toshi [<c0125045>] irq_exit+0x35/0x67

Dec 30 17:49:27 toshi [<c0104979>] do_IRQ+0x73/0x82

Dec 30 17:49:27 toshi [<c01034c7>] common_interrupt+0x23/0x28

Dec 30 17:49:27 toshi [<c01300d8>] bump_cpu_timer+0x90/0x130

Dec 30 17:49:27 toshi [<c0343abd>] acpi_idle_enter_bm+0x27e/0x2e9

Dec 30 17:49:27 toshi [<c045bfcd>] cpuidle_idle_call+0x52/0x7d

Dec 30 17:49:27 toshi [<c045bf7b>] cpuidle_idle_call+0x0/0x7d

Dec 30 17:49:27 toshi [<c01018be>] cpu_idle+0x8d/0xa9

Dec 30 17:49:27 toshi =======================

Dec 30 17:49:27 toshi BUG: scheduling while atomic: swapper/0/0x00000100

Dec 30 17:49:27 toshi 

Dec 30 17:49:27 toshi Pid: 0, comm: swapper Tainted: P          (2.6.26-gentoo-r3 #8)

Dec 30 17:49:27 toshi EIP: 0060:[<c0343abd>] EFLAGS: 00000286 CPU: 1

Dec 30 17:49:27 toshi EIP is at acpi_idle_enter_bm+0x27e/0x2e9

Dec 30 17:49:27 toshi EAX: f7c6bf84 EBX: 00002435 ECX: 0000f4f4 EDX: 02fd8000

Dec 30 17:49:27 toshi ESI: 00000000 EDI: 00bccf24 EBP: 00bcaaef ESP: f7c6bf84

Dec 30 17:49:27 toshi DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068

Dec 30 17:49:27 toshi CR0: 8005003b CR2: 0808f024 CR3: 30cbf000 CR4: 000006f0

Dec 30 17:49:27 toshi DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000

Dec 30 17:49:27 toshi DR6: ffff0ff0 DR7: 00000400

Dec 30 17:49:27 toshi [<c045bfcd>] ? cpuidle_idle_call+0x52/0x7d

Dec 30 17:49:27 toshi [<c045bf7b>] ? cpuidle_idle_call+0x0/0x7d

Dec 30 17:49:27 toshi [<c01018be>] ? cpu_idle+0x8d/0xa9de

Dec 30 17:49:27 toshi =======================

Dec 30 17:49:27 toshi bad: scheduling from the idle thread!

Dec 30 17:49:27 toshi Pid: 0, comm: swapper Tainted: P          2.6.26-gentoo-r3 #8

Dec 30 17:49:27 toshi [<c011dbd1>] dequeue_task_idle+0x15/0x1e

Dec 30 17:49:27 toshi [<c011924f>] dequeue_task+0xa/0x14

Dec 30 17:49:27 toshi [<c0119297>] deactivate_task+0x1b/0x30

Dec 30 17:49:27 toshi [<c058d1c0>] schedule+0x12b/0x5ed

Dec 30 17:49:27 toshi [<c012835d>] lock_timer_base+0x19/0x35

Dec 30 17:49:27 toshi [<c012846f>] __mod_timer+0x98/0xa2

Dec 30 17:49:27 toshi [<c058d925>] schedule_timeout+0x6b/0x86

Dec 30 17:49:27 toshi [<c012809a>] process_timeout+0x0/0x5

Dec 30 17:49:27 toshi [<c058d920>] schedule_timeout+0x66/0x86

Dec 30 17:49:27 toshi [<c0128486>] msleep+0xd/0x12

Dec 30 17:49:27 toshi [<c036e4dd>] iwl4965_scan_cancel_timeout+0x34/0x6a

Dec 30 17:49:27 toshi [<c0372376>] iwl4965_mac_update_tkip_key+0xae/0x18b

Dec 30 17:49:27 toshi [<c057353a>] ieee80211_tkip_decrypt_data+0x174/0x1e5

Dec 30 17:49:27 toshi [<c056c073>] ieee80211_crypto_tkip_decrypt+0xaa/0xeb

Dec 30 17:49:27 toshi [<c0575b27>] ieee80211_rx_h_decrypt+0x124/0x140

Dec 30 17:49:27 toshi [<c05745bd>] ieee80211_invoke_rx_handlers+0x21/0x1bf

Dec 30 17:49:27 toshi [<c0574a44>] __ieee80211_rx_handle_packet+0x2a3/0x79d

Dec 30 17:49:27 toshi [<c013420f>] getnstimeofday+0x32/0xb8

Dec 30 17:49:27 toshi [<c0576a2a>] __ieee80211_rx+0x440/0x492

Dec 30 17:49:27 toshi [<c036e366>] iwl4965_rx_queue_restock+0xa4/0x11c

Dec 30 17:49:27 toshi [<c0568ba4>] ieee80211_tasklet_handler+0x4b/0xe7

Dec 30 17:49:27 toshi [<c0125115>] tasklet_action+0x53/0xa5

Dec 30 17:49:27 toshi [<c0124d0a>] __do_softirq+0x5d/0xc1

Dec 30 17:49:27 toshi [<c0124da0>] do_softirq+0x32/0x36

Dec 30 17:49:27 toshi [<c0125045>] irq_exit+0x35/0x67

Dec 30 17:49:27 toshi [<c0104979>] do_IRQ+0x73/0x82

Dec 30 17:49:27 toshi [<c01034c7>] common_interrupt+0x23/0x28

Dec 30 17:49:27 toshi [<c01300d8>] bump_cpu_timer+0x90/0x130

Dec 30 17:49:27 toshi [<c0343abd>] acpi_idle_enter_bm+0x27e/0x2e9

Dec 30 17:49:27 toshi [<c045bfcd>] cpuidle_idle_call+0x52/0x7d

Dec 30 17:49:27 toshi [<c045bf7b>] cpuidle_idle_call+0x0/0x7d

Dec 30 17:49:27 toshi [<c01018be>] cpu_idle+0x8d/0xa9

```

And then after that the following segment is repeated thousands of times

```

Dec 30 17:49:27 toshi bad: scheduling from the idle thread!

Dec 30 17:49:27 toshi Pid: 0, comm: swapper Tainted: P          2.6.26-gentoo-r3 #8

Dec 30 17:49:27 toshi [<c011dbd1>] dequeue_task_idle+0x15/0x1e

Dec 30 17:49:27 toshi [<c011924f>] dequeue_task+0xa/0x14

Dec 30 17:49:27 toshi [<c0119297>] deactivate_task+0x1b/0x30

Dec 30 17:49:27 toshi [<c058d1c0>] schedule+0x12b/0x5ed

Dec 30 17:49:27 toshi [<c0137f14>] tick_nohz_restart_sched_tick+0xdc/0x10a

Dec 30 17:49:27 toshi [<c045bf7b>] cpuidle_idle_call+0x0/0x7d

Dec 30 17:49:27 toshi [<c01018d5>] cpu_idle+0xa4/0xa9

```

I'm not sure what caused this, and i'm more than willing to provide extra info on my system for anyone who catches an interest in this.

thanks.

----------

## mroconnor

Im interested because the same thing just happened to me. And the odd thing is I haven't done anything to this machine recently that would have caused a major change.

MIne happens on boot up on 2.6.27 zen kernel.

----------

## nekromancer

Well I don't know where to start, it happended to me once only. I am using the 2.6.26-gentoo-r3 kernel on a toshiba P300 laptop.

I've got wireless lan, hibernation, and ati-graphics driver installed.

Just looking at the stack trace it might be a problem with the wireless adapter or the hibernation support. I only say this because I See this on the following line

```

Dec 30 17:49:27 toshi [<c058d920>] schedule_timeout+0x66/0x86

Dec 30 17:49:27 toshi [<c0128486>] msleep+0xd/0x12

Dec 30 17:49:27 toshi [<c036e4dd>] iwl4965_scan_cancel_timeout+0x34/0x6a

Dec 30 17:49:27 toshi [<c0372376>] iwl4965_mac_update_tkip_key+0xae/0x18b

Dec 30 17:49:27 toshi [<c057353a>] ieee80211_tkip_decrypt_data+0x174/0x1e5 

```

stuff related to the wireless adapter.

I've got net-wireless/iwl3945-ucode-2.14.1.5  and net-wireless/iwl4965-ucode-4.44.1.20  emerged (don't know which one it's actually using.)

----------

## mroconnor

Not sure what the 'F' I did, but what fixed it was this:

```
emerge --sync && emerge -ve system
```

Everything was right as rain after that, but unfortunately I was lazy and never really found out what the cause was. I am a bad Gentooer.  :Sad: 

----------

