[#5439] netaudio test case crashed in bf533-stamp

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

[#5439] netaudio test case crashed in bf533-stamp

Submitted By: Vivi Li

Open Date

2009-08-13 21:39:58     Close Date

2009-08-19 18:32:30

Priority:

Medium High     Assignee:

Barry Song

Status:

Closed     Fixed In Release:

N/A

Found In Release:

N/A     Release:

Category:

uClinux-dist applications     Board:

N/A

Processor:

BF533     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

gcc4.1-09r1_rc9

App binary format:

N/A     

Summary: netaudio test case crashed in bf533-stamp

Details:

 

netaudio test case crashed in bf533-stamp.

 

--

U-Boot 2008.10-svn1974 (ADI-2009R1-rc3) (Jul 17 2009 - 21:17:51)

 

CPU:   ADSP bf533-0.3 (Detected Rev: 0.3) (bypass boot)

Board: ADI BF533 Stamp board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 497.664 MHz, Core: 497.664 MHz, System: 99.532 MHz

RAM:   128 MB

Flash:  4 MB

In:    serial

Out:   serial

Err:   serial

Net:   MAC:   00:E0:22:FE:45:76

Hit any key to stop autoboot:  0

bfin> run ramboot

 

Warning: MAC addresses don't match:

        HW MAC address:  FF:FF:FF:FF:FF:FF

        "ethaddr" value: 00:E0:22:FE:45:76

Using MAC Address 00:E0:22:FE:45:76

TFTP from server 10.100.4.174; our IP address is 10.100.4.50

Filename 'uImage'.

Load address: 0x1000000

Loading: #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #######################################################

done

Bytes transferred = 5564778 (54e96a hex)

## Booting kernel from Legacy Image at 01000000 ...

   Image Name:   Linux-2.6.28.10-ADI-2009R1-svn71

   Created:      2009-08-14  14:06:06 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    5564714 Bytes =  5.3 MB

   Load Address: 00001000

   Entry Point:  001ab6d4

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 001ab6d4

Linux version 2.6.28.10-ADI-2009R1-svn7190 (test@uboot33-533stamp) (gcc version 4.1.2 (ADI svn)) #48 Fri Aug 14 14:05:53 GMT 2009

bootconsole [early_shadow0] enabled

bootconsole [early_BFuart0] enabled

early printk enabled on early_BFuart0

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

Board Memory: 128MB

Kernel Managed Memory: 128MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x00126490

  rodata    = 0x00126490-0x0017d758

  bss       = 0x0017e000-0x0018fc64

  data      = 0x0018fc64-0x001a0000

    stack   = 0x0019e000-0x001a0000

  init      = 0x001a0000-0x009f5000

  available = 0x009f5000-0x037ff000

  DMA Zone  = 0x07e00000-0x08000000

Hardware Trace Active and Enabled

Boot Mode: 0

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

Compiled for ADSP-BF533 Rev 0.3

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 497 MHz core clock and 99 MHz System Clock

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: root=/dev/mtdblock0 rw clkin_hz=11059200 earlyprintk=serial,uart0,57600 ip=10.100.4.50:10.100.4.174:10.100.f

Configuring Blackfin Priority Driven Interrupts

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

console [ttyBF0] enabled, bootconsole disabled

console [ttyBF0] enabled, bootconsole disabled

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

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

Memory available: 46576k/131072k RAM, (8532k init code, 1173k kernel code, 487k data, 2048k dma, 72256k reserved)

Calibrating delay loop... 991.23 BogoMIPS (lpj=1982464)

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: 64 KB (53 KB free)

net_namespace: 288 bytes

NET: Registered protocol family 16

Blackfin DMA Controller

stamp_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

msgmni has been set to 90

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 = 21) 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 20300300 IRQ 40 [nowait]

eth0: Ethernet addr: 00:e0:22:fe:45:76

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

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

Advanced Linux Sound Architecture Driver Version 1.0.18rc3.

dma_alloc_init: dma_page @ 0x00cc3000 - 512 pages at 0x07e00000

ALSA device list:

  #0: ADI ad1836 at PF4 SPORT0,rx/tx dma ch:1/2,err irq:10

TCP cubic registered

NET: Registered protocol family 17

rtc-bfin rtc-bfin: setting system clock to 1970-01-01 00:00:11 UTC (11)

eth0: link down

IP-Config: Complete:

     device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,

     host=bf533-stamp, domain=, nis-domain=(none),

     bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=

Freeing unused kernel memory: 8532k freed

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

                           _____________________________________

        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.13.4 (2009-08-14 13:59:38 GMT) built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:/> eth0: link down

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

 

root:/> ifconfig eth0 10.99.29.79

root:/> ifconfig

eth0      Link encap:Ethernet  HWaddr 00:E0:22:FE:45:76

          inet addr:10.99.29.79  Bcast:10.255.255.255  Mask:255.0.0.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:1389 (1.3 KiB)  TX bytes:464 (464.0 B)

          Interrupt:40 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:/>

root:/> cat /etc/config/smb.conf

[global]

workgroup = WORKGROUP

encrypt passwords = yes

root:/>

root:/> boa -c /etc &

[01/Jan/1970:00:20:56 +0000] boa: server version Boa/0.94.14rc21

[01/Jan/1970:00:20:56 +0000] boa: server built Aug 14 2009 at 13:59:59.

[01/Jan/1970:00:20:56 +0000] boa: starting server pid=176, port 80

175

root:/> Mounting the Remote shared directory : //10.99.29.123/MyMusic

smbfs is deprecated and will be removed from the 2.6.27 kernel. Please migrate to cifs

10.99.29.123 - - [01/Jan/1970:00:21:31 +0000] request "GET /cgi-bin/status.cgi HTTP/1.1" ("./status.cgi"): pipe write: Broken pie

Jump to NULL address

Kernel OOPS in progress

Deferred Exception context

CURRENT PROCESS:

COMM=mpc PID=432

CPU = 0

invalid mm

return address: [0x00000000]; contents of:

 

ADSP-BF533-0.3 497(MHz CCLK) 99(MHz SCLK) (mpu off)

 

Double Fault

Kernel OOPS in progress

Deferred Exception context

CURRENT PROCESS:

COMM=mpc PID=432

CPU = 0

invalid mm

return address: [0x00003eb2]; contents of:

0x00003e90:  5cec  e300  6351  3046  4d68  4f68  3208  e140

0x00003ea0:  0015  e100  5d34  e122  0086  61ff  914a  e512

0x00003eb0:  008b [a051] b0f0  e140  0015  5091  e100  5d10

0x00003ec0:  6421  e300  6339  e300  60c9  3008  e140  0015

 

ADSP-BF533-0.3 497(MHz CCLK) 99(MHz SCLK) (mpu off)

--

 

--

root:/> version

kernel:    Linux release 2.6.28.10-ADI-2009R1-svn7190, build #48 Fri Aug 14 14:05:53 GMT 2009

toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)

user-dist: release svn-8722, build #22 Fri Aug 14 14:00:46 GMT 2009

--

 

Follow-ups

 

--- Barry Song                                               2009-08-14 05:24:32

Yes. I have repeated it. The crash comes from a null pointer access in mpd:

(gdb) bt

#0  *___GI_fileno (stream=0x0) at libc/stdio/fileno.c:41

#1  0x0070e6e6 in myfprintf (fp=0x0, format=0x77eab4 "unrecoverable frame

level error (%s).\n") at myfprintf.c:73

#2  0x0070124a in decodeFirstFrame (data=0x7a6410, dc=0x0, tag=<value

optimized out>) at inputPlugins/mp3_plugin.c:336

#3  0x007014ca in getMp3TotalTime (file=<value optimized out>) at

inputPlugins/mp3_plugin.c:483

#4  0x0070152c in mp3_tagDup (file=0x7a9a91 "/mnt/mp3/1.mp3") at

inputPlugins/mp3_plugin.c:752

#5  0x00714626 in newSong (url=<value optimized out>, type=1,

parentDir=0x4c00e0) at song.c:68

#6  0x007146c6 in addSongToList (list=0x4c0118, url=0x4c0188 "1.mp3",

utf8path=<value optimized out>, songType=1,

    parentDirectory=0x4c00e0) at song.c:108

#7  0x0070861c in addToDirectory (directory=0x4c00e0, shortname=0x4c0188

"1.mp3", name=0x4c0194 "1.mp3") at directory.c:748

#8  0x0070874c in exploreDirectory (directory=0x4c00e0) at directory.c:680

#9  0x007087bc in initMp3Directory () at directory.c:1174

#10 0x0070daf0 in openDB (options=0x7b6ed4, argv0=0x7b6f92 "mpd") at

main.c:316

#11 0x0070e19e in main (argc=3, argv=0x7b6f6c) at main.c:430

 

The code line is:

void myfprintf(FILE * fp, char * format, ... ) {

        char buffer[BUFFER_LENGTH+1];

        va_list arglist;

        int fd = fileno(fp);  //fp is null!

 

Let me check why a null is give to fp.

 

--- Robin Getz                                               2009-08-14 10:13:50

Vivi:

 

Can you post the _entire_ crash dump? The kernel should never Double Fault due

to a userspace crash.

 

-Robin

 

--- Barry Song                                               2009-08-16 23:55:04

int getMp3TotalTime(char * file) {

        InputStream inStream;

        mp3DecodeData data;

        int ret;

 

        if(openInputStream(&inStream, file) < 0) return -1;

        initMp3DecodeData(&data,&inStream);

        if(decodeFirstFrame(&data, NULL, NULL)<0) ret = -1;

        else ret = data.totalTime+0.5;

        mp3DecodeDataFinalize(&data);

        closeInputStream(&inStream);

}

 

mp3DecodeData is very big. After initMp3DecodeData run, global var stderr,

stdin, stdout(which are near with data) are changed by it.  

#define ERROR(...) myfprintf(stderr, __VA_ARGS__)                       

#define LOG(...) myfprintf(stdout,  __VA_ARGS__)

Since stdin/out/error are wrong, myfprintf which access these global var will

make the mpd crash.

 

But it is not understandable, no matter how big I increase the stack size, the

mp3DecodeData data is always placed near those global var and will write them

while running initMp3DecodeData. That means increasing stack size by

bfin-uclinux-flthdr doesn't affect the address of the temp "mp3DecodeData

data" var.

 

But netaudio(mpd/mpc) can run successfully on bf537.

 

 

--- Barry Song                                               2009-08-17 03:33:31

I made a mistake, there are two mpd in /usr/bin/mpd and /bin/mpd. I rewrite the

/usr/bin/mpd by tftp. Then I use "mpd" to run, so I haven't changed

the run-time mpd(/bin/mpd) in fact.

 

I will delete $(ROMFSINST) $(VER)/src/mpd /usr/bin/mpd in mpd Makefile

              $(ROMFSINST) $(VER)/src/mpc /usr/bin/mpc in mpc Makefile

and add the stack size of mpd since those datastructs are very big(for example,

mp3DecodeData is bigger than 0x10000).

 

 

 

--- Vivi Li                                                  2009-08-19 23:33:04

OK now.

Close it.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

config.netaudio    application/octet-stream    31361    Vivi Li

Attachments

Outcomes