- 论坛徽章:
- 0
|
最近碰到个奇怪的问题崩溃问题,内核版本是3.4.66,平台是mips
下面是崩溃信息
[ 630.210000] CPU 0 Unable to handle kernel paging request at virtual address 70264f7c, epc == 70264f7c, ra == 80004f1c
[ 630.220000] Oops[#1]:
[ 630.220000] Cpu 0
[ 630.220000] .$ 0 : 00000000 00000000 00000000 01400000
[ 630.220000] $ 4 : 80310000 00000000 00000000 ffff00fe
[ 630.220000] $ 8 : 802fffe0 0000ff00 00000000 83dea000
[ 630.220000] $12 : 10000000 11455c28 77ab5f70 00420000
[ 630.220000] $16 : 80340000 80340000 80330000 80338686
[ 630.220000] $20 : 80300000 00000000 83fec000 00000000
[ 630.220000] $24 : 00000000 80044e8c
[ 630.220000] $28 : 802fe000 802ffec8 83fec000 80004f1c
[ 630.220000] ................................................Hi : 00000092
[ 630.220000] .Lo : ba404780
[ 630.220000] .epc : 70264f7c 0x70264f7c
[ 630.220000] Tainted: P O
[ 630.220000] ra : 80004f1c cpu_idle+0x58/0x60
[ 630.220000] Status: 1100ff03 ....KERNEL EXL IE
[ 630.220000] Cause : 50800008
[ 630.220000] BadVA : 70264f7c
[ 630.220000] PrId : 00019650 (MIPS 24KEc)
[ 630.220000] Process swapper (pid: 0, threadinfo=802fe000, task=80302940, tls=00000000)
[ 630.220000] .Stack :. 0000012d. 8030c1f0. 8030c1f0. 80300000. 80300000. 803158ac. 00000000. 80334388.
[ 630.220000] . 80340000. 0000001f. ffffffff. ffffffff. 803152a8. 00000000. 80338638. 00000000.
[ 630.220000] . 83fec000. 83fec000. 83fc52d0. 1fffffff. 83fec000. 83fc5ba0. 00000000. 00000000.
[ 630.220000] . 00000000. 00000000. 00000000. 00000000. 00000000. 00000000. 00000000. 00000000.
[ 630.220000] . 00000000. 00000000. 00000000. 00000000. 00000000. 00000000. 00000000. 00000000.
[ 630.220000] . ...
[ 630.220000] .Call Trace:.
[ 630.220000] .[<803158ac>] start_kernel+0x328/0x348
[ 630.220000] .[<80334388>] _einittext+0x0/0x0
[ 630.220000] .[<803152a8>] unknown_bootoption+0x0/0x234
[ 630.220000] ..
[ 630.220000] .
[ 630.220000] Code:. (Bad address in epc)
[ 630.220000]
[ 630.220000] .
[ 630.580000] ---[ end trace b3359e796da23b95 ]---
[ 630.590000] Kernel panic - not syncing: Attempted to kill the idle task!
[ 630.590000] Rebooting in 3 seconds..Resetting PCI-E controller...
定位到的崩溃地点是80004f1c: cpu_idle+0x58/0x60
反汇编vmlinux,找到位置
80004ec4 <cpu_idle>:
80004ec4: 27bdffe8 addiu sp,sp,-24
80004ec8: afb00010 sw s0,16(sp)
80004ecc: afbf0014 sw ra,20(sp)
80004ed0: 3c108034 lui s0,0x8034
80004ed4: 0c016c3a jal 8005b0e8 <rcu_idle_enter>
80004ed8: 00000000 nop
80004edc: 080013be j 80004ef8 <cpu_idle+0x34>
80004ee0: 8e02b788 lw v0,-18552(s0)
80004ee4: 10400005 beqz v0,80004efc <cpu_idle+0x38>
80004ee8: 00000000 nop
80004eec: 0040f809 jalr v0
80004ef0: 00000000 nop
80004ef4: 8e02b788 lw v0,-18552(s0)
80004ef8: 03801821 move v1,gp
80004efc: 8c640008 lw a0,8(v1)
80004f00: 30840004 andi a0,a0,0x4
80004f04: 1080fff7 beqz a0,80004ee4 <cpu_idle+0x20>
80004f08: 00000000 nop
80004f0c: 0c016b46 jal 8005ad18 <rcu_idle_exit>
80004f10: 00000000 nop
80004f14: 0c098ac3 jal 80262b0c <schedule_preempt_disabled>
80004f18: 00000000 nop
80004f1c: 080013b5 j 80004ed4 <cpu_idle+0x10>
80004f20: 00000000 nop
崩溃的位置是
80004f1c: 080013b5 j 80004ed4 <cpu_idle+0x10>
这里应该是cpu_idle循环的结束的地方
下面是cpu_idle源码- void __noreturn cpu_idle(void)
- {
- int cpu;
- /* CPU is going idle. */
- cpu = smp_processor_id();
- /* endless idle loop with no priority at all */
- while (1) {
- tick_nohz_idle_enter();
- rcu_idle_enter();
- while (!need_resched() && cpu_online(cpu)) {
- #ifdef CONFIG_MIPS_MT_SMTC
- extern void smtc_idle_loop_hook(void);
- smtc_idle_loop_hook();
- #endif
- if (cpu_wait) {
- /* Don't trace irqs off for idle */
- stop_critical_timings();
- (*cpu_wait)();
- start_critical_timings();
- }
- }
-
- #ifdef CONFIG_HOTPLUG_CPU
- if (!cpu_online(cpu) && !cpu_isset(cpu, cpu_callin_map))
- play_dead();
- #endif
- rcu_idle_exit();
- tick_nohz_idle_exit();
- schedule_preempt_disabled();
- }
- }
复制代码 我不太理解为什么会在循环结束的时候产生这个地址访问的问题。不知道有没有人能解答一下。
|
|