- 论坛徽章:
- 0
|
2.6.16.46-0.12-smp #1 SMP Thu May 17 14:00:09 UTC 2007 x86_64 x86_64 x86_64 GNU/Linux
----------- [cut here ] --------- [please bite here ] ---------
Kernel BUG at kernel/timer.c:415
invalid opcode: 0000 [1]
Pid: 0, comm: swapper Tainted: P U 2.6.16.46-0.12-smp #1
RIP: 0010:[<ffffffff8013ac10>]
unparseable log message: "<ffffffff8013ac10>{cascade+37}"
RSP: 0018:ffffffff80417f00 EFLAGS: 00010006
RAX: 0000000000000080 RBX: ffff810001038418 RCX: 0000000101420099
RDX: 0000000000000008 RSI: ffff810028867d10 RDI: ffff810001036f80
RBP: ffff810028867d10 R08: 0000000000000099 R09: ffffffff80417f18
R10: ffffffff803d9ed8 R11: ffffffff80417f68 R12: ffff810001036f80
R13: 0000000000000008 R14: ffffffff803fcca0 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffffffff803be000(0000) knlGS:0000000000000000
CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 00000000f7a75000 CR3: 000000008dc97000 CR4: 00000000000006e0
Process swapper (pid: 0, threadinfo ffffffff803d8000, task ffffffff80341340)
unparseable log message: "<ffffffff8013b945>{run_timer_softirq+145}"
unparseable log message: "<ffffffff8013775d>{__do_softirq+85}"
unparseable log message: "<ffffffff8010c11e>{call_softirq+30}"
unparseable log message: "<ffffffff8010d07c>{do_softirq+44}"
unparseable log message: "<ffffffff80109e3a>{mwait_idle+0}"
static int cascade(tvec_base_t *base, tvec_t *tv, int index)
{
/* cascade all the timers from tv up one level */
struct list_head *head, *curr;
head = tv->vec + index;
curr = head->next;
/*
* We are removing _all_ timers from the list, so we don't have to
* detach them individually, just clear the list afterwards.
*/
while (curr != head) {
struct timer_list *tmp;
tmp = list_entry(curr, struct timer_list, entry);
BUG_ON(tmp->base != &base->t_base); // OOPS
curr = curr->next;
internal_add_timer(base, tmp);
}
INIT_LIST_HEAD(head);
return index;
}
1,从堆栈信息看,OOPS在cascade函数的
BUG_ON(tmp->base != &base->t_base);
2,获取tmp->base 和 &base->t_base的值
cascade汇编代码
ffffffff8013abeb <cascade>:
ffffffff8013abeb: 41 55 push %r13
ffffffff8013abed: 48 63 c2 movslq %edx,%rax
ffffffff8013abf0: 41 89 d5 mov %edx,%r13d
ffffffff8013abf3: 48 c1 e0 04 shl $0x4,%rax
ffffffff8013abf7: 41 54 push %r12
ffffffff8013abf9: 49 89 fc mov %rdi,%r12
ffffffff8013abfc: 55 push %rbp
ffffffff8013abfd: 53 push %rbx
ffffffff8013abfe: 48 8d 1c 06 lea (%rsi,%rax,1),%rbx
ffffffff8013ac02: 48 8b 2b mov (%rbx),%rbp
ffffffff8013ac05: eb 1f jmp ffffffff8013ac26 <cascade+0x3b>
ffffffff8013ac07: 4c 39 65 28 cmp %r12,0x28(%rbp)
寄存器rbp为tmp的值,r12为&base->t_base的值
RBP: ffff810001050a88
R12:ffff81000104ee80
RBP偏移40个字节不等于R12,从而导致core。
3,&base->t_base为per_cpu__tvec_bases
tmp 为 module中设定的定时器timer_list地址
分析到这我就不知道改如何分析了,也不知道上面的分析是否正确。请大侠帮忙 |
|