这几天解决内核crash问题,自己摸索发现根据crash信息确定在那个函数后,然后比较快的方式确定在哪行出问题,就是在怀疑的代码行前面或者后面写这样一句*((int*)0) = 1;,通过反汇编看这句与导致crash的指令的位置,快速确定crash的问题行。例如下面的crash信息表面在Clnk_ETH_SendPacket+0x60/0x194的位置出现了问题。
PHY: mdio@ffe24000:02 - Link is Up - 1000/Full
ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready
br0: port 3(eth2) entering forwarding state
br0: port 3(eth2) entering forwarding state
****NULL (pList)->pHead=0***
Unable to handle kernel paging request for data at address 0x00000004
Faulting instruction address: 0xf315d3a4
Oops: Kernel access of bad area, sig: 11 [#1]
P1010 RDB
last sysfs file: /sys/devices/virtual/net/br0/bridge/multicast_snooping
Modules linked in: necb_misc gianfar_driver CandDdvr Tags
NIP: f315d3a4 LR: f315d498 CTR: c01a17b8
REGS: efd7dc30 TRAP: 0300 Not tainted (2.6.35)
MSR: 00021000 CR: 22002022 XER: 20000000
DEAR: 00000004, ESR: 00800000
TASK = efacc920[1122] 'acch' THREAD: ef8d4000
GPR00: 00000000 efd7dce0 efacc920 00000020 0000426c ffffffff c01a1724 00000034
GPR08: c04988a8 00000000 0000426c 00004000 48002082 10039af8 efb69300 00000001
GPR16: e7dd2000 efb69000 00000001 efb3bcc0 e779f2d8 e77be000 00000000 00000000
GPR24: 00000000 f3186f30 e7d1a0c0 e7d1a0c0 ea600000 ea720000 ea7221f0 e77c0078
NIP [f315d3a4] Clnk_ETH_SendPacket+0x60/0x194 [CandDdvr]
LR [f315d498] Clnk_ETH_SendPacket+0x154/0x194 [CandDdvr]
Call Trace:
[efd7dce0] [f315d498] Clnk_ETH_SendPacket+0x154/0x194 [CandDdvr] (unreliable)
[efd7dd00] [f3187a08] gfar_fast_xmit+0x1678/0x1b2c [gianfar_driver]
[efd7ddc0] [c0253a5c] dev_hard_start_xmit+0x2ec/0x430
[efd7ddf0] [c0269ffc] sch_direct_xmit+0xc4/0x1b8
[efd7de10] [c0253f28] dev_queue_xmit+0x2d8/0x564
[efd7de40] [c0329980] br_dev_queue_push_xmit+0x6c/0xa0
[efd7de50] [c03298d8] br_flood+0xd0/0xf0
[efd7de70] [c032abf8] br_handle_frame_finish+0x238/0x25c
[efd7de90] [c032a930] br_handle_frame+0x1dc/0x26c
[efd7deb0] [c0256460] __netif_receive_skb+0x214/0x3a0
[efd7def0] [f3189374] gfar_clean_rx_ring+0x5dc/0x1ff0 [gianfar_driver]
[efd7df50] [f3189540] gfar_clean_rx_ring+0x7a8/0x1ff0 [gianfar_driver]
[efd7df90] [c02569f4] net_rx_action+0xb8/0x144
[efd7dfb0] [c0043b0c] __do_softirq+0xa0/0x120
[efd7dff0] [c000f2a4] call_do_softirq+0x14/0x24
[ef8d5ee0] [c0004764] do_softirq+0x74/0x80
[ef8d5f00] [c004387c] irq_exit+0x98/0x9c
[ef8d5f10] [c0004f34] do_IRQ+0xd4/0x140
[ef8d5f40] [c000ff84] ret_from_except+0x0/0x18
--- Exception: 501 at 0x48113c1c
LR = 0x48113d40
Instruction dump:
419e0128 801e0004 7f9f0000 419e0140 809f0000 2f840000 909d21f0 419e00f8
2f840004 419e00f0 813e0000 38000000 <90090004> 4bffe491 7c7e1b79 418200c0
Kernel panic - not syncing: Fatal exception in interrupt
Call Trace:
[efd7db30] [c00076b8] show_stack+0x54/0x174 (unreliable)
[efd7db60] [c003db94] panic+0xa4/0x120
[efd7dbf0] [c000cf28] die+0x1a8/0x1b4
[efd7dc10] [c0012ff4] bad_page_fault+0x98/0xe8
[efd7dc20] [c000fde0] handle_page_fault+0x7c/0x80
--- Exception: 300 at Clnk_ETH_SendPacket+0x60/0x194 [CandDdvr]
LR = Clnk_ETH_SendPacket+0x154/0x194 [CandDdvr]
[efd7dd00] [f3187a08] gfar_fast_xmit+0x1678/0x1b2c [gianfar_driver]
[efd7ddc0] [c0253a5c] dev_hard_start_xmit+0x2ec/0x430
[efd7ddf0] [c0269ffc] sch_direct_xmit+0xc4/0x1b8
[efd7de10] [c0253f28] dev_queue_xmit+0x2d8/0x564
[efd7de40] [c0329980] br_dev_queue_push_xmit+0x6c/0xa0
[efd7de50] [c03298d8] br_flood+0xd0/0xf0
[efd7de70] [c032abf8] br_handle_frame_finish+0x238/0x25c
[efd7de90] [c032a930] br_handle_frame+0x1dc/0x26c
[efd7deb0] [c0256460] __netif_receive_skb+0x214/0x3a0
[efd7def0] [f3189374] gfar_clean_rx_ring+0x5dc/0x1ff0 [gianfar_driver]
[efd7df50] [f3189540] gfar_clean_rx_ring+0x7a8/0x1ff0 [gianfar_driver]
[efd7df90] [c02569f4] net_rx_action+0xb8/0x144
[efd7dfb0] [c0043b0c] __do_softirq+0xa0/0x120
[efd7dff0] [c000f2a4] call_do_softirq+0x14/0x24
[ef8d5ee0] [c0004764] do_softirq+0x74/0x80
[ef8d5f00] [c004387c] irq_exit+0x98/0x9c
[ef8d5f10] [c0004f34] do_IRQ+0xd4/0x140
[ef8d5f40] [c000ff84] ret_from_except+0x0/0x18
--- Exception: 501 at 0x48113c1c
LR = 0x48113d40
Rebooting in 180 seconds..
阅读(3778) | 评论(1) | 转发(1) |