Wind River Support Network

HomeDefectsLIN7-1037
Fixed

LIN7-1037 : kgdb next and step command fail on qemuarm64

Created: Oct 14, 2014    Updated: Sep 8, 2018
Resolved Date: Jan 18, 2015
Found In Version: 7.0
Fix Version: 7.0.0.2
Severity: Standard
Applicable for: Wind River Linux 7
Component/s: Kernel

Steps to Reproduce

configure --enable-board=qemuarm64 --enable-rootfs=glibc-small --enable-kernel=standard --enable-jobs=8 --enable-parallel-pkgbuilds=8 --enable-unsupported-toolchain=openembedded-core

ON HOST:
-bash-3.2$ /test/qemuarm64-2/bitbake_build/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-aarch64 -kernel /test/qemuarm64-2/bitbake_build/tmp/deploy/images/qemuarm64/Image-qemuarm64.bin -netdev user,id=net0 -device virtio-net-device,netdev=net0 -machine virt -cpu cortex-a57 -drive id=disk0,file=/test/qemuarm64-2/bitbake_build/tmp/deploy/images/qemuarm64/wrlinux-image-glibc-small-qemuarm64-20141011003524.rootfs.ext3 -device virtio-blk-device,drive=disk0 -nographic -no-reboot -nographic -m 128 --append "root=/dev/vda rw console=ttyAMA0,38400 mem=128M highres=off console=ttyS0" -serial tcp::4444,server
QEMU 2.1.0 monitor - type 'help' for more information
(qemu) QEMU waiting for connection on: tcp:[::]:4444,server



ON TARGET:
localhost login: root
root
Password: root

root@localhost:~#
root@localhost:~# uname -a
uname -a
Linux localhost 3.14.19-WR7.0.0.0_standard #2 PREEMPT Sat Oct 11 12:20:36 CST 2014 aarch64 GNU/Linux
root@localhost:~#
root@localhost:~# insmod /lib/modules/3.14.19-WR7.0.0.0_standard/kernel/drivers/tty/serial/kgdboc.ko kgdboc=ttyAMA0,115200
insmod /lib/modules/3.14.19-WR7.0.0.0_standard/kernel/drivers/
tty/serial/kgdboc.ko kgdboc=ttyAMA0,115200
kgdb: Registered I/O driver kgdboc.
root@localhost:~#
root@localhost:~# echo g > /proc/sysrq-trigger
echo g > /proc/sysrq-trigger
SysRq : DEBUG
Entering KGDB
^]
telnet> q
Connection closed.

Remote debugging using localhost:4444
kgdb_breakpoint () at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/kernel/debug/debug_core.c:1049
1049        wmb(); /* Sync point after breakpoint */
(gdb) bt
#0  kgdb_breakpoint () at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/kernel/debug/debug_core.c:1049
#1  0xffffffc0000f3a68 in sysrq_handle_dbg (key=<optimized out>) at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/kernel/debug/debug_core.c:802
#2  0xffffffc0003ec6f8 in __handle_sysrq (key=103, check_mask=false) at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/drivers/tty/sysrq.c:535
#3  0xffffffc0003ecbd0 in write_sysrq_trigger (file=<optimized out>, buf=<optimized out>, count=<optimized out>, ppos=<optimized out>)
    at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/drivers/tty/sysrq.c:1110
#4  0xffffffc0001cb974 in proc_reg_write (file=<optimized out>, buf=<optimized out>, count=<optimized out>, ppos=<optimized out>)
    at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/fs/proc/inode.c:224
#5  0xffffffc000175fe8 in vfs_write (file=0xffffffc006370000, buf=0x49afc0 "g\nI", count=<optimized out>, pos=0xffffffc005d7bec8)
    at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/fs/read_write.c:485
#6  0xffffffc0001765bc in SYSC_write (count=<optimized out>, buf=<optimized out>, fd=<optimized out>)
    at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/fs/read_write.c:534
#7  SyS_write (fd=<optimized out>, buf=<optimized out>, count=<optimized out>)
    at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/fs/read_write.c:526
#8  0xffffffc00008382c in cpu_switch_to () at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/arch/arm64/kernel/entry.S:553
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) b arch_cpu_idle_enter
Breakpoint 1 at 0xffffffc0000cb38c: file /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/kernel/cpu/idle.c, line 56.
(gdb) c
Continuing.
[New Thread 4294967294]

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 4294967294]
arch_cpu_idle_exit () at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/kernel/cpu/idle.c:57
57    void __weak arch_cpu_idle_exit(void) { }
(gdb) bt
#0  arch_cpu_idle_exit () at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/kernel/cpu/idle.c:57
#1  0xffffffc0000cb41c in cpu_idle_loop () at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/kernel/cpu/idle.c:81
#2  cpu_startup_entry (state=<optimized out>) at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/kernel/cpu/idle.c:143
#3  0xffffffc0005a353c in rest_init () at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/init/main.c:397
#4  0xffffffc0007797dc in start_kernel () at /test/qemuarm64-2/bitbake_build/tmp/work/qemuarm64-wrs-linux/linux-windriver/3.14-r0/linux/init/main.c:656
#5  0x0000000040080150 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) set debug remote 1
(gdb) set remotetimeout 10
(gdb) n
Sending packet: $Z0,ffffffc0000cb38c,4#30...Ack
Packet received: OK
Sending packet: $s#73...Ack
Packet received: T05thread:fffffffe;
Sending packet: $g#67...Ack
Packet received: 000000000000000000407b00c0ffffff01000000000000000200000000000000000080000000000000000000000000000050059a7f000000000000000000000080087c00c0ffffff607d7b00c0ffffff2fba385400000000c04e2f280000000017000000000000000000000000000000000000000000000000000060a717140084bd1b00c0ffffffd0c5f7997f000000ffffffff0000000000407b00c0ffffff00407b00c0ffffff00858100c0ffffff00408100c0ffffffe8eb8300c0ffffff94388100c0ffffffc0036f00c0ffffff010000000000000020030800c0ffffff5001084000000000307f7b00c0ffffff1cb40c00c0ffffff307f7b00c0ffffff90b30c00c0ffffffc50100800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Sending packet: $mffffffc0000cb390,4#b5...Ack
Packet received: c0035fd6
Sending packet: $mffffffc0000cb38c,4#e7...Ack
Packet received: c0035fd6
Sending packet: $mffffffc0000cb390,4#b5...Ack
Packet received: c0035fd6
Sending packet: $s#73...Ack
Packet received: T05thread:fffffffe;
Sending packet: $g#67...Ack
Packet received: 000000000000000000407b00c0ffffff00000100000000000000010000000000000080000000000000000000000000000050059a7f000000000000000000000080087c00c0ffffff607d7b00c0ffffff2fba385400000000c04e2f280000000017000000000000000000000000000000000000000000000000000060a717140084bd1b00c0ffffffd0c5f7997f000000ffffffff0000000000407b00c0ffffff00407b00c0ffffff00858100c0ffffff00408100c0ffffffe8eb8300c0ffffff94388100c0ffffffc0036f00c0ffffff010000000000000020030800c0ffffff5001084000000000307f7b00c0ffffff1cb40c00c0ffffff307f7b00c0ffffff90b30c00c0ffffffc50120400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Sending packet: $mffffffc0000cb390,4#b5...Ack
Packet received: c0035fd6
Sending packet: $mffffffc0000cb38c,4#e7...Ack
Packet received: c0035fd6
Sending packet: $mffffffc0000cb390,4#b5...Ack
Packet received: c0035fd6
Sending packet: $s#73...Ack
Packet received: T05thread:fffffffe;
Sending packet: $g#67...Ack
Packet received: 000000000000000000407b00c0ffffff0100000000000000020000000000000000008000000000000000000000000000d900000000000000020000000000000080087c00c0ffffff607d7b00c0ffffffc0c901000000000060eb8100c0ffffffc0c901000000000002000000000000000000000000000000040000000000000084bd1b00c0ffffffd0c5f7997f000000ffffffff0000000000407b00c0ffffff00407b00c0ffffff00858100c0ffffff00408100c0ffffffe8eb8300c0ffffff94388100c0ffffffc0036f00c0ffffff010000000000000020030800c0ffffff5001084000000000307f7b00c0ffffff1cb40c00c0ffffff307f7b00c0ffffff90b30c00c0ffffffc50120800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Sending packet: $mffffffc0000cb390,4#b5...Ack
Packet received: c0035fd6
Sending packet: $mffffffc0000cb38c,4#e7...Ack
Packet received: c0035fd6
Sending packet: $mffffffc0000cb390,4#b5...Ack
Packet received: c0035fd6
Sending packet: $s#73...Ack
Packet received: T05thread:fffffffe;
Sending packet: $g#67...Ack

ENDLESS...... 

Other Downloads


Live chat
Online