我正在尝试使用主机上的jtag和gdb调试在saber lite board上运行的linux内核。在调试期间,我在" do_fork()"处插入一个断点。并允许内核继续执行。 一进入" ls"在我的军刀精简版上命令断点被击中,然后内核发生恐慌。
这是在saber lite board的控制台终端上生成的日志:
root@mx6q:~# ls
[ 94.725966] Unhandled prefetch abort: breakpoint debug exception (0x002) at 0x00094d74
[ 94.733935] Internal error: : 2 [#1] PREEMPT SMP ARM
[ 94.738918] Modules linked in: ov5642_camera ov5640_camera_mipi mxc_v4l2_capture ipu_g
[ 94.754748] CPU: 1 PID: 406 Comm: sh Not tainted 3.10.45 #1
[ 94.760343] task: dcb78f00 ti: dc8ec000 task.ti: dc8ec000
[ 94.765781] PC is at do_fork+0x0/0x368
[ 94.769554] LR is at SyS_clone+0x24/0x2c
[ 94.773497] pc : [<c002ae3c>] lr : [<c002b264>] psr: 800f0013
[ 94.773497] sp : dc8edf90 ip : b6f3d068 fp : dc8edfa4
[ 94.784993] r10: 00000000 r9 : dc8ec000 r8 : c000e304
[ 94.790235] r7 : 00000078 r6 : b6ec0000 r5 : 00000000 r4 : b6f3d068
[ 94.796778] r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 01200011
[ 94.803325] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 94.810477] Control: 10c5387d Table: 2c89004a DAC: 00000015
[ 94.816240] Process sh (pid: 406, stack limit = 0xdc8ec238)
[ 94.821830] Stack: (0xdc8edf90 to 0xdc8ee000)
[ 94.826208] df80: b6f3d068 c011aa24 00000000 dc8e8
[ 94.834410] dfa0: c000e180 c002b24c b6f3d068 00000000 01200011 00000000 00000000 00000
[ 94.842612] dfc0: b6f3d068 00000000 b6ec0000 00000078 b6f3d4c0 00000196 000e5e08 bed5c
[ 94.850813] dfe0: 00000000 bed52940 b6f3d000 b6e25640 600f0010 01200011 fd3b4088 0000f
[ 94.859001] Backtrace:
[ 94.861512] [<c002b240>] (SyS_clone+0x0/0x2c) from [<c000e180>] (ret_fast_syscall+0x0)
[ 94.869887] Code: e92dd800 e24cb004 e5801188 e89da800 (e1200070)
[ 94.876596] ---[ end trace 3e3aa32a078125f3 ]---
Stopping Serial Getty on ttymxc1...
[ OK ] Stopped Serial Getty on ttymxc1.
Starting Serial Getty on ttymxc1...
[ 94.957982] Unhandled prefetch abort: breakpoint debug exception (0x002) at 0xb6e5e4a0
[ 94.966066] Internal error: : 2 [#2] PREEMPT SMP ARM
[ 94.971058] Modules linked in: ov5642_camera ov5640_camera_mipi mxc_v4l2_capture ipu_g
[ 94.986894] CPU: 3 PID: 1 Comm: systemd Tainted: G D 3.10.45 #1
[ 94.993705] task: dc078000 ti: dc05c000 task.ti: dc05c000
[ 94.999143] PC is at do_fork+0x0/0x368
[ 95.002916] LR is at SyS_clone+0x24/0x2c
[ 95.006859] pc : [<c002ae3c>] lr : [<c002b264>] psr: 80070013
[ 95.006859] sp : dc05df90 ip : b6d2c068 fp : dc05dfa4
[ 95.018355] r10: 00000000 r9 : dc05c000 r8 : c000e304
[ 95.023596] r7 : 00000078 r6 : b6eed000 r5 : bef7cfc8 r4 : b6d2c068
[ 95.030138] r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 01200011
[ 95.036685] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 95.043837] Control: 10c5387d Table: 2c57c04a DAC: 00000015
[ 95.049599] Process systemd (pid: 1, stack limit = 0xdc05c238)
[ 95.055448] Stack: (0xdc05df90 to 0xdc05e000)
[ 95.059827] df80: b6d2c068 000b9ec1 00000000 dc058
[ 95.068028] dfa0: c000e180 c002b24c b6d2c068 bef7cfc8 01200011 00000000 00000000 00000
[ 95.076228] dfc0: b6d2c068 bef7cfc8 b6eed000 00000078 b6d2c4c0 00000001 00000000 bef74
[ 95.084429] dfe0: 00000001 bef7cfc8 b6d2c000 b6e52640 60070010 01200011 fd7b4088 0000f
[ 95.092616] Backtrace:
[ 95.095125] [<c002b240>] (SyS_clone+0x0/0x2c) from [<c000e180>] (ret_fast_syscall+0x0)
[ 95.103502] Code: e92dd800 e24cb004 e5801188 e89da800 (e1200070)
[ 95.109750] ---[ end trace 3e3aa32a078125f4 ]---
[ 95.116889] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 95.116889]
[ 95.126041] CPU0: stopping
[ 95.128760] CPU: 0 PID: 163 Comm: systemd-journal Tainted: G D 3.10.45 #1
[ 95.136418] Backtrace:
[ 95.138902] [<c0011f24>] (dump_backtrace+0x0/0x10c) from [<c0012138>] (show_stack+0x1)
[ 95.147342] r6:c0a70e40 r5:00000000 r4:00000005 r3:00000000
[ 95.153072] [<c0012120>] (show_stack+0x0/0x1c) from [<c078d698>] (dump_stack+0x20/0x2)
[ 95.161083] [<c078d678>] (dump_stack+0x0/0x28) from [<c00145d4>] (handle_IPI+0x124/0x)
[ 95.169268] [<c00144b0>] (handle_IPI+0x0/0x14c) from [<c0008628>] (gic_handle_irq+0x5)
[ 95.177718] [<c00085cc>] (gic_handle_irq+0x0/0x64) from [<c0793140>] (__irq_svc+0x40/)
[ 95.185985] Exception stack(0xdc6e5df0 to 0xdc6e5e38)
[ 95.191041] 5de0: c0acb800 600f0013 00003d1d 00000
[ 95.199224] 5e00: c0c7fb00 00000001 dc64b000 00000001 00000000 dc00e400 c0acb4c0 dc6e4
[ 95.207405] 5e20: dc6e5e48 dc6e5e38 c00d8cd8 c0792858 a00f0013 ffffffff
[ 95.214021] r7:dc6e5e24 r6:ffffffff r5:a00f0013 r4:c0792858
[ 95.219749] [<c079282c>] (_raw_spin_unlock_irqrestore+0x0/0x54) from [<c00d8cd8>] (re)
[ 95.229676] [<c00d8b1c>] (release_pages+0x0/0x200) from [<c01006f8>] (free_pages_and_)
[ 95.239345] [<c0100684>] (free_pages_and_swap_cache+0x0/0xac) from [<c00f38b8>]
在我的主持人身上:
Breakpoint 4, do_fork (clone_flags=18874385, stack_start=0,
Sending packet: $mdc8edfa8,4#94...Packet received: 68d0f3b6
stack_size=stack_size@entry=0, parent_tidptr=0x0 <__vectors_start>,
child_tidptr=child_tidptr@entry=0xb6f3d068) at kernel/fork.c:1570
1570 kernel/fork.c: No such file or directory.
答案 0 :(得分:0)
内核恐慌是指内核模块出现异常错误的时候。有时,显示的错误消息可能是错误的影响而不是原因。