I am using Linux Kernel Version 2.6.34.6 SMP for powerPC 64 bit. I tried to
debug kernel using KGDB and ended up in Kernel panic reboot issue. Here is
the list of steps I did.

1) I enabled the following in the config file

CONFIG_DEBUG_PAGEALLOC=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_INFO=y
CONFIG_KGDB=y
CONFIG_FRAME_POINTER=y
CONFIG_KGDB_SERIAL_CONSOLE=y

Built and loaded the Kernel.

2) My Linux PC is connected terminal server using ttyS0 and I enabled KGDB
over serial port by doing

"echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc"

3) Trigger KGDB by issuing sysrq-g. echo g > /proc/sysrq-trigger

4) Kernel Panic reboot is seen with the following reboot log

sw0:root> echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc
kgdb: Registered I/O driver kgdboc.
sw0:root> echo g > /proc/sysrq-trigger
SysRq : DEBUG
Entering KGDB
Unable to handle kernel paging request for instruction fetch
Faulting instruction address: 0x00000000
KGDB: re-enter exception: ALL breakpoints killed
Call Trace:
STACK MAGIC 0x57ac6e9d
[813679c0] [40007fcc] show_stack+0x84/0x24c (unreliable)
[81367a20] [4057d9f4] dump_stack+0x2c/0x44
[81367a30] [40098008] kgdb_handle_exception+0x184/0x1b8
[81367a80] [40013320] kgdb_debugger+0x88/0xa0
[81367a90] [4000f5a4] die+0x48/0x28c
[81367ac0] [40019460] bad_page_fault+0x90/0xe0
[81367ae0] [400123fc] handle_page_fault+0x7c/0x80
[81367ba0] [407a0000] kmalloc_caches+0xdc0/0x1340
[81367bb0] [402d11ac] uart_poll_get_char+0x58/0x70
[81367bc0] [402daae8] kgdboc_get_char+0x40/0x58
[81367bd0] [40096eac] kgdb_cpu_enter+0x420/0x1320
[81367c60] [40097f08] kgdb_handle_exception+0x84/0x1b8
[81367cb0] [40013250] kgdb_handle_breakpoint+0x4c/0x94
[81367cc0] [40578dbc] program_check_exception+0x5c/0x860
[81367da0] [40012544] ret_from_except_full+0x0/0x4c
[81367e60] [40096018] sysrq_handle_gdb+0x94/0xb0
[81367e70] [402c9f28] __handle_sysrq+0xe0/0x1c8
[81367ea0] [402ca06c] write_sysrq_trigger+0x5c/0x80
[81367eb0] [401614a4] proc_reg_write+0x90/0xcc
[81367ee0] [4011201c] vfs_write+0xb4/0x1a8
[81367f00] [401122b0] sys_write+0x60/0x144
[81367f40] [40011f4c] ret_from_syscall+0x0/0x3c
Kernel panic - not syncing: Recursive entry to debugger
Call Trace:
STACK MAGIC 0x57ac6e9d


Can you help me to understand the root cause of the issue? Let me know
how to solve this issue.


Thanks

Jegan
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to