当前位置: 技术问答>linux和unix
Internal error: Oops: 17报错怎么查
来源: 互联网 发布时间:2016-07-06
本文导语: 本帖最后由 freehotel 于 2009-07-19 16:16:26 编辑 一个关于硬盘测试的拷机程序,在跑了3天后出现以下问题。 虽然也google了一下,但还是不太明白该如何下手。看提示好像是内核的问题。但到底是内核里的插入的驱动模块...
虽然也google了一下,但还是不太明白该如何下手。看提示好像是内核的问题。但到底是内核里的插入的驱动模块的问题,还是上层应用程序的问题呢?应该怎样查找呢?
特别的是,它不是在我插入某个具体的.KO驱动后出现的,而是在程序连续跑了3天后出现的,何解?
请大家帮忙拉,谢谢。
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 17 [#5]
Modules linked in: fcap100_tw2835_m2 ffgpio ds1307 ftmac100 usbhid usb_storage f
otg2xx_drv usbcore fmjpeg_drv fmpeg4_drv fmcp422_drv favc_drv favc_common fcap10
0_tw2835 fcap1 fcap0 fcap_common snd_fi2s_tw2835_c0 snd_ftssp010 tw2835 ftsdc010
cpe_wdt tve_tw2835 ct656 fi2c apb_dma
CPU: 0
PC is at dequeue_task+0xc/0x78
LR is at deactivate_task+0x24/0x30
pc : [] lr : [] Tainted: P
sp : c369973c ip : c369974c fp : c3699748
r10: 000090e6 r9 : 719d1dc0 r8 : c369991c
r7 : c39255a0 r6 : c39255a0 r5 : c0b182d8 r4 : c39255a0
r3 : ffffffff r2 : 00000000 r1 : 00000000 r0 : c39255a0
Flags: nzCv IRQs off FIQs on Mode SVC_32 Segment user
Control: 397F Table: 02850000 DAC: 00000015
Process sh (pid: 1769, stack limit = 0xc3698194)
Stack: (0xc369973c to 0xc369a000)
9720: c369975c
9740: c369974c c0b118e4 c0b115e0 000090e6 c3699798 c3699760 c0d10b8c c0b118d0
9760: c39255d4 c3698000 0086c935 c39256c8 c3698000 00000000 c39255a0 ffffffff
9780: c369991c c36998d4 0000000b c36997b8 c369979c c0b182d8 c0d109b0 c39255a0
。。。发帖长度限制,此处省略。
Backtrace:
[] (dequeue_task+0x0/0x78) from [] (deactivate_task+0x24/0x3
0)
[] (deactivate_task+0x0/0x30) from [] (schedule+0x1ec/0x694)
r4 = 000090E6
[] (schedule+0x0/0x694) from [] (do_exit+0xd0/0xc28)
[] (do_exit+0x0/0xc28) from [] (die+0x264/0x2a0)
[] (die+0x0/0x2a0) from [] (__do_kernel_fault+0x6c/0x7c)
[] (__do_kernel_fault+0x0/0x7c) from [] (do_page_fault+0x230
/0x250)
r7 = C36998D4 r6 = C36998D4 r5 = C39255A0 r4 = FFFFFFFF
[] (do_page_fault+0x0/0x250) from [] (do_DataAbort+0x3c/0xa0
)
[] (do_DataAbort+0x0/0xa0) from [] (__dabt_svc+0x40/0x60)
r8 = C3699AFC r7 = C39255A0 r6 = C39255A0 r5 = C3699908
r4 = FFFFFFFF
[] (dequeue_task+0x0/0x78) from [] (deactivate_task+0x24/0x3
0)
[] (deactivate_task+0x0/0x30) from [] (schedule+0x1ec/0x694)
r4 = 000090E6
[] (schedule+0x0/0x694) from [] (do_exit+0xd0/0xc28)
[] (do_exit+0x0/0xc28) from [] (die+0x264/0x2a0)
[] (die+0x0/0x2a0) from [] (__do_kernel_fault+0x6c/0x7c)
[] (__do_kernel_fault+0x0/0x7c) from [] (do_page_fault+0x230
/0x250)
r7 = C3699AB4 r6 = C3699AB4 r5 = C39255A0 r4 = FFFFFFFF
[] (do_page_fault+0x0/0x250) from [] (do_DataAbort+0x3c/0xa0
)
[] (do_DataAbort+0x0/0xa0) from [] (__dabt_svc+0x40/0x60)
r8 = C3699CDC r7 = C39255A0 r6 = C39255A0 r5 = C3699AE8
r4 = FFFFFFFF
[] (dequeue_task+0x0/0x78) from [] (deactivate_task+0x24/0x3
0)
[] (deactivate_task+0x0/0x30) from [] (schedule+0x1ec/0x694)
r4 = 000090E6
[] (schedule+0x0/0x694) from [] (do_exit+0xd0/0xc28)
[] (do_exit+0x0/0xc28) from [] (die+0x264/0x2a0)
[] (die+0x0/0x2a0) from [] (__do_kernel_fault+0x6c/0x7c)
[] (__do_kernel_fault+0x0/0x7c) from [] (do_page_fault+0x230
/0x250)
r7 = C3699C94 r6 = C3699C94 r5 = C39255A0 r4 = FFFFFFFF
[] (do_page_fault+0x0/0x250) from [] (do_DataAbort+0x3c/0xa0
)
[] (do_DataAbort+0x0/0xa0) from [] (__dabt_svc+0x40/0x60)
r8 = C0EF4CC0 r7 = C39255A0 r6 = C39255A0 r5 = C3699CC8
r4 = FFFFFFFF
[] (dequeue_task+0x0/0x78) from [] (deactivate_task+0x24/0x3
0)
[] (deactivate_task+0x0/0x30) from [] (schedule+0x1ec/0x694)
r4 = 000090E6
[] (schedule+0x0/0x694) from [] (do_exit+0xbe8/0xc28)
[] (do_exit+0x0/0xc28) from [] (die+0x264/0x2a0)
[] (die+0x0/0x2a0) from [] (__do_kernel_fault+0x6c/0x7c)
[] (__do_kernel_fault+0x0/0x7c) from [] (do_page_fault+0x230
/0x250)
r7 = C093B59C r6 = C3699E74 r5 = C39255A0 r4 = FFFFFFEC
[] (do_page_fault+0x0/0x250) from [] (do_DataAbort+0x3c/0xa0
)
[] (do_DataAbort+0x0/0xa0) from [] (__dabt_svc+0x40/0x60)
r8 = 00000000 r7 = C39255A0 r6 = 001458C1 r5 = C3699EA8
r4 = FFFFFFFF
[] (dequeue_task+0x0/0x78) from [] (deactivate_task+0x24/0x3
0)
[] (deactivate_task+0x0/0x30) from [] (schedule+0x1ec/0x694)
r4 = 000090E6
[] (schedule+0x0/0x694) from [] (do_wait+0xbfc/0xcd0)
[] (do_wait+0x0/0xcd0) from [] (sys_wait4+0x38/0x44)
[] (sys_wait4+0x0/0x44) from [] (ret_fast_syscall+0x0/0x2c)
r4 = 0028D3D0
Code: e89da800 e1a0c00d e92dd800 e24cb004 (e5913000)
|
当程序访问超出实际物理内存的时候,就会产生页故障,也就是调用do_page_fault()。
也就是说,你的 驱动有问题,访问了非法地址。
也就是说,你的 驱动有问题,访问了非法地址。
|
LDD中有描述如何查找这类错误,但是各个平台的kernel不一样。
我也是菜鸟尽量把自己知道的列出来供大家讨论,如果有错误的地方,请大家指出。
------------------首先这些打印是kernel的panic函数列出的,具体意义可以直接找到kernel代码去看,很有帮助。
Unable to handle kernel NULL pointer dereference at virtual address 00000000
-------------------------^^^^^^^空指针错误,这个一般就是非法地址访问,至于为什么导致非法,请关注PC周围的代码逻辑。有必要的话就printk出来。
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 17 [#5] ------17代表什么?要在你的手册或kernel代码中查,null pointer??
Modules linked in: fcap100_tw2835_m2 ffgpio ds1307 ftmac100 usbhid usb_storage f
otg2xx_drv usbcore fmjpeg_drv fmpeg4_drv fmcp422_drv favc_drv favc_common fcap10
0_tw2835 fcap1 fcap0 fcap_common snd_fi2s_tw2835_c0 snd_ftssp010 tw2835 ftsdc010
cpe_wdt tve_tw2835 ct656 fi2c apb_dma
CPU: 0
PC is at dequeue_task+0xc/0x78 --------当前pc指针,这个十分有用!可以将kernel反汇编,然后找dequeue_task的相对位置0xc处
LR is at deactivate_task+0x24/0x30
-----------------以下为当前寄存器值,也有帮助。
pc : [ ] lr : [ ] Tainted: P
sp : c369973c ip : c369974c fp : c3699748
r10: 000090e6 r9 : 719d1dc0 r8 : c369991c
r7 : c39255a0 r6 : c39255a0 r5 : c0b182d8 r4 : c39255a0
r3 : ffffffff r2 : 00000000 r1 : 00000000 r0 : c39255a0
Flags: nzCv IRQs off FIQs on Mode SVC_32 Segment user
Control: 397F Table: 02850000 DAC: 00000015
Process sh (pid: 1769, stack limit = 0xc3698194)
Stack: (0xc369973c to 0xc369a000)
9720: c369975c
9740: c369974c c0b118e4 c0b115e0 000090e6 c3699798 c3699760 c0d10b8c c0b118d0
9760: c39255d4 c3698000 0086c935 c39256c8 c3698000 00000000 c39255a0 ffffffff
9780: c369991c c36998d4 0000000b c36997b8 c369979c c0b182d8 c0d109b0 c39255a0
。。。发帖长度限制,此处省略。
-----------------以下是调用堆栈,可以看到程序的流程,便于跟踪。
Backtrace:
[ ] (dequeue_task+0x0/0x78) from [ ] (deactivate_task+0x24/0x3
0)
[ ] (deactivate_task+0x0/0x30) from [ ] (schedule+0x1ec/0x694)
r4 = 000090E6
[ ] (schedule+0x0/0x694) from [ ] (do_exit+0xd0/0xc28)
[ ] (do_exit+0x0/0xc28) from [ ] (die+0x264/0x2a0)
[ ] (die+0x0/0x2a0) from [ ] (__do_kernel_fault+0x6c/0x7c)
[ ] (__do_kernel_fault+0x0/0x7c) from [ ] (do_page_fault+0x230
/0x250)
r7 = C36998D4 r6 = C36998D4 r5 = C39255A0 r4 = FFFFFFFF
[ ] (do_page_fault+0x0/0x250) from [ ] (do_DataAbort+0x3c/0xa0
)
[ ] (do_DataAbort+0x0/0xa0) from [ ] (__dabt_svc+0x40/0x60)
r8 = C3699AFC r7 = C39255A0 r6 = C39255A0 r5 = C3699908
r4 = FFFFFFFF
[ ] (dequeue_task+0x0/0x78) from [ ] (deactivate_task+0x24/0x3
0)
。。。。。。。。。。。。。。。。。。。。。。。。。
我也是菜鸟尽量把自己知道的列出来供大家讨论,如果有错误的地方,请大家指出。
------------------首先这些打印是kernel的panic函数列出的,具体意义可以直接找到kernel代码去看,很有帮助。
Unable to handle kernel NULL pointer dereference at virtual address 00000000
-------------------------^^^^^^^空指针错误,这个一般就是非法地址访问,至于为什么导致非法,请关注PC周围的代码逻辑。有必要的话就printk出来。
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 17 [#5] ------17代表什么?要在你的手册或kernel代码中查,null pointer??
Modules linked in: fcap100_tw2835_m2 ffgpio ds1307 ftmac100 usbhid usb_storage f
otg2xx_drv usbcore fmjpeg_drv fmpeg4_drv fmcp422_drv favc_drv favc_common fcap10
0_tw2835 fcap1 fcap0 fcap_common snd_fi2s_tw2835_c0 snd_ftssp010 tw2835 ftsdc010
cpe_wdt tve_tw2835 ct656 fi2c apb_dma
CPU: 0
PC is at dequeue_task+0xc/0x78 --------当前pc指针,这个十分有用!可以将kernel反汇编,然后找dequeue_task的相对位置0xc处
LR is at deactivate_task+0x24/0x30
-----------------以下为当前寄存器值,也有帮助。
pc : [ ] lr : [ ] Tainted: P
sp : c369973c ip : c369974c fp : c3699748
r10: 000090e6 r9 : 719d1dc0 r8 : c369991c
r7 : c39255a0 r6 : c39255a0 r5 : c0b182d8 r4 : c39255a0
r3 : ffffffff r2 : 00000000 r1 : 00000000 r0 : c39255a0
Flags: nzCv IRQs off FIQs on Mode SVC_32 Segment user
Control: 397F Table: 02850000 DAC: 00000015
Process sh (pid: 1769, stack limit = 0xc3698194)
Stack: (0xc369973c to 0xc369a000)
9720: c369975c
9740: c369974c c0b118e4 c0b115e0 000090e6 c3699798 c3699760 c0d10b8c c0b118d0
9760: c39255d4 c3698000 0086c935 c39256c8 c3698000 00000000 c39255a0 ffffffff
9780: c369991c c36998d4 0000000b c36997b8 c369979c c0b182d8 c0d109b0 c39255a0
。。。发帖长度限制,此处省略。
-----------------以下是调用堆栈,可以看到程序的流程,便于跟踪。
Backtrace:
[ ] (dequeue_task+0x0/0x78) from [ ] (deactivate_task+0x24/0x3
0)
[ ] (deactivate_task+0x0/0x30) from [ ] (schedule+0x1ec/0x694)
r4 = 000090E6
[ ] (schedule+0x0/0x694) from [ ] (do_exit+0xd0/0xc28)
[ ] (do_exit+0x0/0xc28) from [ ] (die+0x264/0x2a0)
[ ] (die+0x0/0x2a0) from [ ] (__do_kernel_fault+0x6c/0x7c)
[ ] (__do_kernel_fault+0x0/0x7c) from [ ] (do_page_fault+0x230
/0x250)
r7 = C36998D4 r6 = C36998D4 r5 = C39255A0 r4 = FFFFFFFF
[ ] (do_page_fault+0x0/0x250) from [ ] (do_DataAbort+0x3c/0xa0
)
[ ] (do_DataAbort+0x0/0xa0) from [ ] (__dabt_svc+0x40/0x60)
r8 = C3699AFC r7 = C39255A0 r6 = C39255A0 r5 = C3699908
r4 = FFFFFFFF
[ ] (dequeue_task+0x0/0x78) from [ ] (deactivate_task+0x24/0x3
0)
。。。。。。。。。。。。。。。。。。。。。。。。。