[#4911] kgdb would have Segmentation fault on bf561.

Document created by Aaronwu Employee on Aug 30, 2013
Version 1Show Document
  • View in full screen mode

[#4911] kgdb would have Segmentation fault on bf561.

Submitted By: Mingquan Pan

Open Date

2009-02-16 22:16:47     Close Date

2009-02-19 02:34:12

Priority:

Medium     Assignee:

Sonic Zhang

Status:

Closed     Fixed In Release:

N/A

Found In Release:

N/A     Release:

Category:

N/A     Board:

N/A

Processor:

ALL     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Rejected

Uboot version or rev.:

    Toolchain version or rev.:

4.1 of Jan 16

App binary format:

N/A     

Summary: kgdb would have Segmentation fault on bf561.

Details:

 

kgdb would have Segmentation fault on bf561 on trunk head now. And "bt" says it has corrupt stack?

This kernel doesn't include smp function.

There is no this issue in the log of Feb 10.

 

root:/> dmesg

Linux version 2.6.28.5-ADI-2009R1-pre-svn6104 (test@my-local-machine) (gcc version 4.1.2 (ADI svn)) #6 Tue Feb 17 10:52:50 CST 2009

Warning: limiting memory to 56MB due to hardware anomaly 05000263

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x00102a50

  rodata    = 0x00102a50-0x001503a4

  bss       = 0x001503b0-0x001666a4

  data      = 0x001666a4-0x00176000

    stack   = 0x00174000-0x00176000

  init      = 0x00176000-0x006c5000

  available = 0x006c5000-0x037ff000

  DMA Zone  = 0x03f00000-0x04000000

Hardware Trace Active and Enabled

Boot Mode: 0

Blackfin support (C) 2004-2009 Analog Devices, Inc.

Compiled for ADSP-BF561 Rev 0.3

Blackfin Linux support by   blackfin.uclinux.org/

Processor Speed: 600 MHz core clock and 100 MHz System Clock

boot memmap: 00000000006c5000 - 00000000037ff000 (usable)

On node 0 totalpages: 14335

free_area_init_node: node 0, pgdat 001732cc, node_mem_map 006ca000

  DMA zone: 112 pages used for memmap

  DMA zone: 0 pages reserved

  DMA zone: 14223 pages, LIFO batch:3

  Normal zone: 0 pages used for memmap

  Movable zone: 0 pages used for memmap

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

Data Cache Enabled for CPU0 (write-back)

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 14223

Kernel command line: console=ttyBF0,57600 kgdboe=@10.100.4.50/,@10.100.4.174/

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

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

console [ttyBF0] enabled

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Kernel managed physical pages: 14335

Memory available: 49828k/65536k RAM, (5436k init code, 1030k kernel code, 462k data, 1024k dma, 7756k reserved)

Calibrating delay loop... 1196.03 BogoMIPS (lpj=2392064)

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: 16 KB (9 KB free)

Blackfin L2 SRAM: 128 KB (127 KB free)

PDA for CPU0 reserved at 00151718

net_namespace: 288 bytes

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

ezkit_init(): registering device resources

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

NET: Registered protocol family 1

Setting up Blackfin MMR debugfs

BF561 Core B driver v0.1 initialized.

msgmni has been set to 97

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 35) is a BFIN-UART

brd: module loaded

smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@cam.org>

eth0: SMC91C11xFD (rev 1) at 2c010300 IRQ 82 [nowait]

eth0: Ethernet addr: 00:e0:22:fe:b2:01

eth0: PHY LAN83C183 (LAN91C111 Internal)

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

eth0: link down

eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

kgdb: Registered I/O driver kgdboe.

kgdboe: debugging over ethernet enabled

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@16

TCP cubic registered

NET: Registered protocol family 17

Freeing unused kernel memory: 5436k freed

dma_alloc_init: dma_page @ 0x006c2000 - 256 pages at 0x03f00000

root:/> ifconfig eth0 10.100.4.init: /bin/watchdogd respawning too fast

50

root:/> ifconfig

eth0      Link encap:Ethernet  HWaddr 00:E0:22:FE:B2:01

          inet addr:10.100.4.50  Bcast:10.255.255.255  Mask:255.0.0.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:2 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:120 (120.0 B)  TX bytes:0 (0.0 B)

          Interrupt:82 Base address:0x300 DMA chan:ff

 

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

 

root:/> init: /bin/watchdogd respawning too fast

 

root:/> ifconfig

eth0      Link encap:Ethernet  HWaddr 00:E0:22:FE:B2:01

          inet addr:10.100.4.50  Bcast:10.255.255.255  Mask:255.0.0.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:2 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:120 (120.0 B)  TX bytes:0 (0.0 B)

          Interrupt:82 Base address:0x300 DMA chan:ff

 

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

 

root:/> init: /bin/watchdogd respawning too fast

init: /bin/watchdogd respawning too fast

init: /bin/watchdogd respawning too fast

 

root:/>

root:/>

root:/>

root:/> cat /proc/kgdbtest

L1(before change) : data variable addr = 0xff800000, data value is 0

L1 : code function addr = 0xffa003d0

L1(after change) : data variable addr = 0xff800000, data value is 10

L2(before change) : data variable addr = 0xfeb00084, data value is 0

L2 : code function addr = 0xfeb00000

L2(after change) : data variable addr = 0xfeb00084, data value is 20

Jump to NULL address

 

 

While the same time on host:

 

test@my-local-machine:~/checkouts/testsuites.1007/adp5588_qwerty> bfin-uclinux-gdb /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/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:1722

1722            atomic_set(&kgdb_setting_breakpoint, 0);

(gdb) break kgdb_test

Breakpoint 1 at 0x861e: file arch/blackfin/kernel/kgdb_test.c, line 54.

(gdb) c

Continuing.

[New Thread 149]

[Switching to Thread 149]

 

Breakpoint 1, kgdb_test (name=0x8670 "J釥�\n嵝\003b", len=1062368, count=12, z=85) at arch/blackfin/kernel/kgdb_test.c:54

54              printk(KERN_DEBUG "kgdb name(%d): %s, %d, %d\n", len, name, count, z);

(gdb) hbreak 56

Hardware assisted breakpoint 2 at 0x8644: file arch/blackfin/kernel/kgdb_test.c, line 56.

(gdb) bt

#0  kgdb_test (name=0x8670 "J釥�\n嵝\003b", len=1062368, count=12, z=85) at arch/blackfin/kernel/kgdb_test.c:54

#1  0x00001000 in ?? ()

Backtrace stopped: previous frame inner to this frame (corrupt stack?)

(gdb) list

49      #endif

50

51

52      int kgdb_test(char *name, int len, int count, int z)

53      {

54              printk(KERN_DEBUG "kgdb name(%d): %s, %d, %d\n", len, name, count, z);

55              count = z;

56              return count;

57      }

58

(gdb) bt

#0  kgdb_test (name=0x8670 "J釥�\n嵝\003b", len=1062368, count=12, z=85) at arch/blackfin/kernel/kgdb_test.c:54

#1  0x00001000 in ?? ()

Backtrace stopped: previous frame inner to this frame (corrupt stack?)

(gdb) c

Continuing.

 

Program received signal SIGSEGV, Segmentation fault.

0x00000000 in ?? ()

(gdb)                                                                     

 

 

 

 

 

 

Follow-ups

 

--- Sonic Zhang                                              2009-02-19 00:31:15

Not a bug. You need to select CONFIG_FRAME_POINTER in kernel menuconfig.

 

--- Mingquan Pan                                             2009-02-19 02:34:12

Ok, this issue has disappeared now by enable this CONFIG_FRAME_POINTER. And

actually it is not needed previously to pass this kgdb set of cases.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes