[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] 2.6.30: per_cpu__runqueues spinlock recursion



Has anyone run the mainline Microblaze kernel with spinlock debugging
turned on?

I recently enabled it to debug a spurious interrupt that's causing our
kernel to die in do_IRQ(). Now the kernel occasionally locks up on boot;
when I used mb-gdb to pull the log buffer, I get this:

<5>Linux version 2.6.30-svn9308 (smagnani@xxxxxxxxxxxxxxxxxxxxxxxx) (gcc
version 3.4.1 ( PetaLinux 0.20 Build -rc1 050607 )) #298 Thu Jun 25
13:43:27 CDT 2009
<6>setup_memory: Main mem: 0x20000000-0x2fffffff, size 0x0fffffff
<6>setup_memory: kernel addr=0x20000000-0x204dd000 size=0x004dd000
<6>setup_memory: max_mapnr: 0xffff
<6>setup_memory: min_low_pfn: 0x20000
<6>setup_memory: max_low_pfn: 0x2ffff
<7>On node 0 totalpages: 65535
<7>free_area_init_node: node 0, pgdat 2023d034, node_mem_map 204dd000
<7>  Normal zone: 512 pages used for memmap
<7>  Normal zone: 0 pages reserved
<7>  Normal zone: 65023 pages, LIFO batch:0
<4>Built 1 zonelists in Zone order, mobility grouping on.  Total pages:
65023
<5>Kernel command line: debug root=/dev/mtdblock1
<6>NR_IRQS:32
<6>INTC #0 at 0x60120000, num_irq=13, edge=0x1000
<4>PID hash table entries: 1024 (order: 10, 4096 bytes)
<6>microblaze_timer_set_mode: shutdown
<6>microblaze_timer_set_mode: periodic
<6>Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
<6>Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
<6>Memory: 254892k/262140k available
<6>Calibrating delay loop... 61.44 BogoMIPS (lpj=307200)
<4>Mount-cache hash table entries: 512
<0>BUG: spinlock cpu recursion on CPU#0, swapper/2
<0> lock: per_cpu__runqueues, .magic: dead4ead, .owner:
swapper/0, .owner_cpu: 0
<6>
<6>Stack:
<6>  2f01bcc4 000000a0 00000056 00000000 2002f274 200d2308 201fa330
2022f54c 
<4>  dead4ead 2022e4c4 00000000 00000000 2022f54c 2f013918 00000000
00000000 
<4>  201dce44 00000000 1312d002 200197b8 200196bc 000240d0 2003e8a4
2f01bd4c 
<5>Call Trace: <5>
<4>[<2002f274>] clocksource_get_next+0x54/0x70
<4>[<200d2308>] _raw_spin_lock+0x68/0x15c
<4>[<201dce44>] _spin_lock+0xc/0x20
<4>[<200197b8>] do_timer+0x44/0xfc
<4>[<200196bc>] run_local_timers+0xc/0x38
<4>[<2003e8a4>] __alloc_pages_internal+0xa8/0x438
<4>[<2000a360>] scheduler_tick+0x24/0x108
<4>[<200196c8>] run_local_timers+0x18/0x38
<4>[<2001974c>] update_process_times+0x64/0x8c
<4>[<2001971c>] update_process_times+0x34/0x8c
<4>[<20019740>] update_process_times+0x58/0x8c
<4>[<201dd064>] _spin_unlock+0xc/0x20
<4>[<200315a0>] tick_periodic+0xe4/0xf8
<4>[<20031588>] tick_periodic+0xcc/0xf8
<4>[<201dce04>] _write_trylock+0x1c/0x30
<4>[<2004ca6c>] kmem_cache_alloc+0x88/0xe8
<4>[<200315cc>] tick_handle_periodic+0x18/0xf8
<4>[<200051b0>] __enqueue_entity+0xbc/0xe4
<4>[<20002b28>] timer_interrupt+0x28/0x40
<4>[<200058c0>] enqueue_task_fair+0x100/0x130
<4>[<20033708>] handle_IRQ_event+0x48/0x148
<4>[<201dce44>] _spin_lock+0xc/0x20
<4>[<201dd064>] _spin_unlock+0xc/0x20
<4>[<20005d10>] check_preempt_wakeup+0x34/0x1d0
<4>[<20006158>] task_new_fair+0xc8/0xf4
<4>[<200357fc>] handle_level_irq+0xbc/0x140
<4>[<200357ec>] handle_level_irq+0xac/0x140
<4>[<20000fc8>] do_IRQ+0xbc/0x120
<4>[<20000f34>] do_IRQ+0x28/0x120
<4>[<200038d0>] _interrupt+0x110/0x118
<4>[<20005c78>] wakeup_preempt_entity+0x18c/0x1f0
<4>[<20005ef4>] pick_next_task_fair+0x48/0xc0
<4>[<20009820>] finish_task_switch+0x1c/0xc4
<4>[<200098e4>] schedule_tail+0x1c/0x60
<4>[<20009820>] finish_task_switch+0x1c/0xc4
<4>[<200098e4>] schedule_tail+0x1c/0x60
<4>[<20005f40>] pick_next_task_fair+0x94/0xc0
<4>[<201dce60>] _spin_lock_irqsave+0x8/0x34
<4>[<20003d9c>] ret_from_fork+0xc/0x24
<4>[<201da854>] __schedule+0x164/0x2f0
<4>[<201da730>] __schedule+0x40/0x2f0
<4>[<2000a82c>] complete+0x50/0x88
<4>[<200252c4>] kthreadd+0x0/0x150
<4>[<200015d0>] kernel_thread_helper+0x0/0x20
<5>
<0>BUG: spinlock lockup on CPU#0, swapper/2, per_cpu__runqueues
<6>
<6>Stack:
<6>  2f01bcf0 2022f54c 2f013918 00000000 00000000 201dce44 201fa39c
00000000 
<4>  2f013b14 00000002 2022f54c 00000d82 2f01bd4c 2f013918 00000000
00000000 
<4>  2000a360 200196c8 2f013918 00000000 00000000 00000000 2f013918
2001974c 
<5>Call Trace: <5>
<4>[<201dce44>] _spin_lock+0xc/0x20
<4>[<2000a360>] scheduler_tick+0x24/0x108
<4>[<200196c8>] run_local_timers+0x18/0x38
<4>[<2001974c>] update_process_times+0x64/0x8c
<4>[<2001971c>] update_process_times+0x34/0x8c
<4>[<20019740>] update_process_times+0x58/0x8c
<4>[<201dd064>] _spin_unlock+0xc/0x20
<4>[<200315a0>] tick_periodic+0xe4/0xf8
<4>[<20031588>] tick_periodic+0xcc/0xf8
<4>[<201dce04>] _write_trylock+0x1c/0x30
<4>[<2004ca6c>] kmem_cache_alloc+0x88/0xe8
<4>[<200315cc>] tick_handle_periodic+0x18/0xf8
<4>[<200051b0>] __enqueue_entity+0xbc/0xe4
<4>[<20002b28>] timer_interrupt+0x28/0x40
<4>[<200058c0>] enqueue_task_fair+0x100/0x130
<4>[<20033708>] handle_IRQ_event+0x48/0x148
<4>[<201dce44>] _spin_lock+0xc/0x20
<4>[<201dd064>] _spin_unlock+0xc/0x20
<4>[<20005d10>] check_preempt_wakeup+0x34/0x1d0
<4>[<20006158>] task_new_fair+0xc8/0xf4
<4>[<200357fc>] handle_level_irq+0xbc/0x140
<4>[<200357ec>] handle_level_irq+0xac/0x140
<4>[<20000fc8>] do_IRQ+0xbc/0x120
<4>[<20000f34>] do_IRQ+0x28/0x120
<4>[<200038d0>] _interrupt+0x110/0x118
<4>[<20005c78>] wakeup_preempt_entity+0x18c/0x1f0
<4>[<20005ef4>] pick_next_task_fair+0x48/0xc0
<4>[<20009820>] finish_task_switch+0x1c/0xc4
<4>[<200098e4>] schedule_tail+0x1c/0x60
<4>[<20009820>] finish_task_switch+0x1c/0xc4
<4>[<200098e4>] schedule_tail+0x1c/0x60
<4>[<20005f40>] pick_next_task_fair+0x94/0xc0
<4>[<201dce60>] _spin_lock_irqsave+0x8/0x34
<4>[<20003d9c>] ret_from_fork+0xc/0x24
<4>[<201da854>] __schedule+0x164/0x2f0
<4>[<201da730>] __schedule+0x40/0x2f0
<4>[<2000a82c>] complete+0x50/0x88
<4>[<200252c4>] kthreadd+0x0/0x150
<4>[<200015d0>] kernel_thread_helper+0x0/0x20


I did some searching on the Internet but didn't see anyone mention this
type of problem with per_cpu__runqueues (for any architecture).

------------------------------------------------------------------------
 Steven J. Magnani               "I claim this network for MARS!
 www.digidescorp.com              Earthling, return my space modulator!"

 #include <standard.disclaimer>


___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/