[#5960] trunk head kgdb test fails to continue
Submitted By: Mingquan Pan
Open Date
2010-03-11 05:03:37 Close Date
2010-03-25 00:22:05
Priority:
Medium Assignee:
Sonic Zhang
Status:
Closed Fixed In Release:
N/A
Found In Release:
2010R1 Release:
Category:
N/A Board:
N/A
Processor:
BF533 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
4.3.4 (ADI-trunk/svn-3815
App binary format:
N/A
Summary: trunk head kgdb test fails to continue
Details:
trunk head kgdb test fails to continue even right after target remote. And it looks only happens to bf537 and bf533 stamp board. On bf548 and bf527 ezkit, it looks no this issue and case can finish.
## Booting kernel from Legacy Image at 02000000 ...
Image Name: bf537-2.6.33-ADI-2010R1-pre-svn8
Created: 2010-03-10 17:06:56 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 4461225 Bytes = 4.3 MB
Load Address: 00001000
Entry Point: 001ad944
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 001ad944
console [ttyBF0] enabled, bootconsole disabled
Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (15 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (35 KB free)
NET: Registered protocol family 16
Blackfin DMA Controller
stamp_init(): registering device resources
bio: create slab <bio-0> at 0
Switching to clocksource bfin_cs_cycles
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
msgmni has been set to 94
io scheduler noop registered
io scheduler cfq registered (default)
bfin-uart: Blackfin serial driver
bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART
brd: module loaded
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
bfin_mii_bus: probed
bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=24)@sclk=125MHz)
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1
kgdboe: local port 6443
kgdboe: local IP 10.100.4.50
kgdboe: interface eth0
kgdboe: remote port 6442
kgdboe: remote IP 10.100.4.174
kgdboe: remote ethernet address ff:ff:ff:ff:ff:ff
kgdboe: device eth0 not up yet, forcing it
kgdboe: carrier detect appears untrustworthy, waiting 4 seconds
PHY: 0:01 - Link is Up - 100/Full
kgdb: Registered I/O driver kgdboe.
kgdboe: debugging over ethernet enabled
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
TCP cubic registered
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 1970-04-23 02:12:31 UTC (9684751)
Freeing unused kernel memory: 6856k freed
dma_alloc_init: dma_page @ 0x028c4000 - 256 pages at 0x03f00000
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - http://blackfin.uclinux.org/
\ YP" `| 8P `. - http://docs.blackfin.uclinux.org/
/ \.___.d| .' - http://www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - http://www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.15.3 (2010-03-10 19:54:50 CST) hush - the humble shell
root:/> version
kernel: Linux release 2.6.33-ADI-2010R1-pre-svn8440, build #4 Thu Mar 11 01:06:37 CST 2010
toolchain: bfin-uclinux-gcc release gcc version 4.3.4 (ADI-trunk/svn-3815)
user-dist: release svn-9492, build #9 Thu Mar 11 01:05:21 CST 2010
root:/>
*******************************************************************
STEP 3: Start KGDB TEST (ethernet)
ifconfig eth0 10.100.4.50
root:/> ifconfig set success.
spawn bfin-uclinux-gdb /tftpboot/vmlinux
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=bfin-uclinux"...
(gdb)
Case 1 ...PASS
target remote udp:10.100.4.50:6443
warning: The remote protocol may be unreliable over UDP.
Some events may be lost, rendering further debugging impossible.
Remote debugging using udp:10.100.4.50:6443
Case 2 ...PASS
kgdb_breakpoint () at kernel/kgdb.c:1799
1799 atomic_set(&kgdb_setting_breakpoint, 0);
(gdb) break kgdb_test
Breakpoint 1 at 0x8fca: file arch/blackfin/kernel/kgdb_test.c, line 56.
Case 3 ...PASS
(gdb) c
Continuing.
Case 4 ...PASS
root:/> [New Thread 162]
[Switching to Thread 162]
Breakpoint 1, kgdb_test (name=0x11c2a4 "hello world!", len=12, count=85, z=16) at arch/blackfin/kernel/kgdb_test.c:56
Case 5 ...PASS
56 pr_alert("kgdb name(%d): %s, %d, %d\n", len, name, count, z);
(gdb) hbreak 58
Hardware assisted breakpoint 2 at 0x8ff0: file arch/blackfin/kernel/kgdb_test.c, line 58.
(gdb)
Case 6 ...PASS
info b
Num Type Disp Enb Address What
1 breakpoint keep y 0x00008fca in kgdb_test at arch/blackfin/kernel/kgdb_test.c:56
breakpoint already hit 1 time
2 hw breakpoint keep y 0x00008ff0 in kgdb_test at arch/blackfin/kernel/kgdb_test.c:58
Case 7 ...PASS
(gdb) list
51 #endif
52
53
54 int kgdb_test(char *name, int len, int count, int z)
55 {
56 pr_alert("kgdb name(%d): %s, %d, %d\n", len, name, count, z);
57 count = z;
58 return count;
59 }
60
(gdb)
Case 8 ...PASS
bt
#0 kgdb_test (name=0x11c2a4 "hello world!", len=12, count=85, z=16) at arch/blackfin/kernel/kgdb_test.c:56
Case 9 ...PASS
#1 0x00009020 in kgdb_test_proc_read (file=0x2030320, buf=0x2b68e6c "", count=4096, ppos=0x204feec) at arch/blackfin/kernel/kgdb_test.c:65
#2 0x000746b4 in proc_reg_read (file=0x2030320, buf=0xc <Address 0xc out of bounds>, count=85, ppos=0x204feec) at fs/proc/inode.c:162
#3 0x0004a2ba in vfs_read (file=0x2030320, buf=0x2b68e6c "", count=<value optimized out>, pos=0x204feec) at fs/read_write.c:292
#4 0x0004a3e0 in sys_read (fd=<value optimized out>, buf=0x2b68e6c "", count=4096) at fs/read_write.c:381
#5 0xffa009ae in system_call () at include/linux/thread_info.h:86
(gdb) c
Continuing.
Breakpoint 2, kgdb_test (name=0x11c2a4 "hello world!", len=12, count=16, z=16) at arch/blackfin/kernel/kgdb_test.c:58
Case 10 ...PASS
58 return count;
(gdb) cat /proc/kgdbtest
kgdb name(12): hello world!, 85, 16
Case 10 ...PASS
print z
$1 = 16
Case 12 ...PASS
(gdb) c
Continuing.
spawn /bin/sh
uclinux-local:~/work/cruise/checkouts/uclinux-dist/testsuites/kgdb> ps aux | grep bfin-uclinux-gdb
test 21212 0.7 2.8 34780 29652 pts/38 Ss+ 17:31 0:00 bfin-uclinux-gdb /tftpboot/vmlinux
test 21223 0.0 0.0 3064 716 pts/39 R+ 17:31 0:00 grep bfin-uclinux-gdb
uclinux-local:~/work/cruise/checkouts/uclinux-dist/testsuites/kgdb> ^Ctest@uclinux-local:~/work/cruise/checkouts/uclinux-dist/testsuites/kgdb>
test@uclinux-local:~/work/cruise/checkouts/uclinux-dist/testsuites/kgdb>
test@uclinux-local:~/work/cruise/checkouts/uclinux-dist/testsuites/kgdb>
test@uclinux-local:~/work/cruise/checkouts/uclinux-dist/testsuites/kgdb> bfin-uclinux-gdb /tftpboot/vmlinux
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=bfin-uclinux"...
(gdb) target remote udp:10.100.4.50:6443
warning: The remote protocol may be unreliable over UDP.
Some events may be lost, rendering further debugging impossible.
Remote debugging using udp:10.100.4.50:6443
kgdb_breakpoint () at kernel/kgdb.c:1799
1799 atomic_set(&kgdb_setting_breakpoint, 0);
(gdb) break kgdb_test
Breakpoint 1 at 0x8fca: file arch/blackfin/kernel/kgdb_test.c, line 56.
(gdb) c
Continuing.
Follow-ups
--- Mingquan Pan 2010-03-11 22:13:04
The last seen good version is :
Last passed time: 2010_Mar_04_11_30, ucdist ver: 9477, kernel ver: 8377
--- Sonic Zhang 2010-03-15 06:27:03
If any CLOCK SOURCE register is selected, update_wall_time() runs into dead loop
after kgdb exits. This bug is introduced by kernel update to 2.6.33.
--- Sonic Zhang 2010-03-18 05:13:12
Fixed. Avoid deal loop by keep shift positive.
This patch is from John Stultz <johnstul@us.ibm.com>
--- Mingquan Pan 2010-03-25 00:20:47
Yes,fixed. Close.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found