[#5805] load library like libosipparser2.so.4 sometimes fails on trunk head built by gcc 4.3
Submitted By: Mingquan Pan
Open Date
2010-01-03 23:45:04 Close Date
2010-12-28 21:59:40
Priority:
Medium High Assignee:
Sonic Zhang
Status:
Closed Fixed In Release:
N/A
Found In Release:
2010R1 Release:
Category:
N/A Board:
N/A
Processor:
BF537 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
4.3.4 (ADI-trunk/svn-3771)
App binary format:
N/A
Summary: load library like libosipparser2.so.4 sometimes fails on trunk head built by gcc 4.3
Details:
load library like libosipparser2.so.4 sometimes fails on trunk head. This happens in linphone testing. For the first time loading, it can't find the library, while the second time to run linphone, it can find it then.
## Booting kernel from Legacy Image at 01000000 ...
Image Name: bf537-2.6.32.2-ADI-2010R1-pre-sv
Created: 2010-01-03 8:06:55 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 5048510 Bytes = 4.8 MB
Load Address: 00001000
Entry Point: 001bf760
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 001bf760
Linux version 2.6.32.2-ADI-2010R1-pre-svn8107 (test@uclinux56-ad73322-snormtd-df) (gcc version 4.3.4 (ADI-trunk/svn-3771) ) #24 Sun Jan 3 08:06:45 GMT 2010
register early platform devices
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Limiting kernel memory to 56MB due to anomaly 05000263
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x0012e5d0
rodata = 0x0012e5d0-0x0018fc70
bss = 0x00190000-0x001a178c
data = 0x001a178c-0x001b2000
stack = 0x001b2000-0x001b4000
init = 0x001b4000-0x009a9000
available = 0x009a9000-0x03800000
DMA Zone = 0x03e00000-0x04000000
Hardware Trace Active and Enabled
Boot Mode: 0
Reset caused by Software reset
Blackfin support (C) 2004-2009 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 125 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
External memory: cacheable in instruction cache
Data Cache Enabled for CPU0
External memory: cacheable (write-back) in data cache
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 14224
Kernel command line: root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart0,57600 console=ttyBF0,57600 ip=10.100.4.50:10.100.4.174:10.100.4.174f
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 46884k/65536k RAM, (8148k init code, 1205k kernel code, 535k data, 2048k dma, 6716k reserved)
Hierarchical RCU implementation.
NR_IRQS:98
Configuring Blackfin Priority Driven Interrupts
console [ttyBF0] enabled, bootconsole disabled
console [ttyBF0] enabled, bootconsole disabled
Calibrating delay loop... 997.37 BogoMIPS (lpj=1994752)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (36 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
NET: Registered protocol family 1
msgmni has been set to 91
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
bfin-uart: Blackfin serial driver
bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART
brd: module loaded
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
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.21.
dma_alloc_init: dma_page @ 0x02a0a000 - 512 pages at 0x03e00000
ALSA device list:
#0: Analog Devices AD73322 at PF10 SPORT0,rx/tx dma ch:3/4,err irq:45
TCP cubic registered
NET: Registered protocol family 17
6IP-Config: Complete:tting system clock to 2004-05-31 10:38:33 UTC (1085999913)
device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,
host=bf537-stamp, domain=, nis-domain=(none),
bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=
Freeing unused kernel memory: 8148k freed
_____________________________________
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 - https://www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.15.3 (2010-01-03 08:03:15 GMT) hush - the humble shell
root:/> PHY: 0:01 - Link is Up - 100/Full
root:/>
root:/> linphonec
linphonec:582: can't map '/usr/lib/libosipparser2.so.4'
linphonec:582: can't map '/usr/lib/libosipparser2.so.4'
linphonec: can't load library 'libosipparser2.so.4'
root:/> linphonec
NLS disabled.
ALSA lib /home/test/work/cruise/checkouts/uclinux-dist/lib/alsa-lib/alsa-lib-1.0.18/src/conf.c:3952:(snd_config_expand) Unknown parameters 0
ALSA lib /home/test/work/cruise/checkouts/uclinux-dist/lib/alsa-lib/alsa-lib-1.0.18/src/control/control.c:909:(snd_ctl_open_noupdate) Invalid CTL default:0
Ready
Warning: video is disabled in linphonec, use -V or -C or -D to enable.
linphonec>
test@uclinux56-ad73322-snormtd-df:..logs/2010_Jan_02_22_52>
This also sometimes happens to libgcc_s.so.1:
root:/> reboot
reboot:582: can't map '/lib/libgcc_s.so.1'
reboot:582: can't map '/lib/libgcc_s.so.1'
reboot:582: can't map '/lib/libgcc_s.so.1'
reboot: can't load library 'libgcc_s.so.1'
root:/>
root:/>
Follow-ups
--- Barry Song 2010-01-13 02:36:18
For those cases mapping/loading library fail, tracing log:
[kernel]
do_filp_open file:02beb4c0 filename:/usr/lib/libosipparser2.so.4
do_mmap2 file:02beb4c0 addr:00000000 pgoff:0 len:22b24 mmaped addr:01000000
prot:5 flags:2
[user]
linphonec:582: can't map '/usr/lib/libosipparser2.so.4'
[kernel]
do_filp_open file:02beb340 filename:/usr/lib/libosipparser2.so.4
do_mmap2 file:02beb340 addr:00000000 pgoff:0 len:22b24 mmaped addr:00980000
prot:5 flags:2
[user]
linphonec:582: can't map '/usr/lib/libosipparser2.so.4'
linphonec: can't load library 'libosipparser2.so.4'
For failure library, user will call sys_mmap2 to same offset twice, everytime
kernel will return success, but user print failure. For successful library, I
only saw one sys_mmap2 to a same offset.
Then need to trace ld to find the reason. Keep Jie in the loop too.
--- Barry Song 2010-01-13 03:15:31
A check-in in toolchain close to svn 3771 has caused this problem.
--- Vivi Li 2010-01-15 02:24:58
Refer to bug [#5823], gcc4.3 svn 3679 is OK.
--- Mingquan Pan 2010-02-20 05:21:33
When testing feature reserve memory in fdpic kernel, it would fail to start at
init sometimes.
The kernel is quite normal and the only difference is the newly set bootargs in
u-boot.
U-Boot 2009.11.1-svn2233 (ADI-2010R1-pre) (Feb 08 2010 - 18:06:24)
CPU: ADSP bf537-0.2 (Detected Rev: 0.2) (bypass boot)
Board: ADI BF537 stamp board
Support: http://blackfin.uclinux.org/
Clock: VCO: 500 MHz, Core: 500 MHz, System: 125 MHz
RAM: 64 MB
RAM size is 64 MB.
Flash: 4 MB
In: serial
Out: serial
Err: serial
KGDB: [on serial] ready
Net: Blackfin EMAC
Hit any key to stop autoboot: 0
bfin> set bootargs root=/dev/mtdblock0 rw mem=32M max_mem=64M
console=ttyBF0,57600
bfin> set serverip 10.100.4.174
bfin> set ipaddr 10.100.4.50
bfin> save
Saving Environment to Flash...
. done
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... done
. done
Protected 1 sectors
bfin>
bfin> tftpboot 0x2000000 uImage
Using Blackfin EMAC device
TFTP from server 10.100.4.174; our IP address is 10.100.4.50
Filename 'uImage'.
Load address: 0x2000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
done
Bytes transferred = 3806495 (3a151f hex)
Image size is 3a151f
bfin> run addip
bfin> bootm
## Booting kernel from Legacy Image at 02000000 ...
Image Name: bf537-2.6.32.8-ADI-2010R1-pre-sv
Created: 2010-02-20 3:23:53 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 3806431 Bytes = 3.6 MB
Load Address: 00001000
Entry Point: 001997a4
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 001997a4
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 (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (36 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: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
msgmni has been set to 46
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
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
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
TCP cubic registered
NET: Registered protocol family 17
IP-Config: Complete:etting system clock to 1970-04-18 12:07:59 UTC (9288479)
device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,
host=bf537-stamp, domain=, nis-domain=(none),
bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=
Freeing unused kernel memory: 6020k freed
dma_alloc_init: dma_page @ 0x017cb000 - 256 pages at 0x01f00000
/init:582: can't map '/lib/libgcc_s.so.1'
/init:582: can't map '/lib/libgcc_s.so.1'
/init:582: can't map '/lib/libgcc_s.so.1'
/init: can't load library 'libgcc_s.so.1'
Kernel panic - not syncikernel panic detected... trying to recover from
ittest@uclinux72-
And in oprofile fdpic testing, it is also frequently see this issue:
## Booting kernel from Legacy Image at 02000000 ...
Image Name: bf537-2.6.32.8-ADI-2010R1-pre-sv
Created: 2010-02-19 15:56:19 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 6579933 Bytes = 6.3 MB
Load Address: 00001000
Entry Point: 001f5974
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 001f5974
Linux version 2.6.32.8-ADI-2010R1-pre-svn8323
(test@uclinux72-kernel-elf-ad1938) (gcc version 4.3.4 (ADI-trunk/svn-3815) )
#178 Fri Feb 19 23:56:14 CST 2010
register early platform devices
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Limiting kernel memory to 56MB due to anomaly 05000263
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x00131b80
rodata = 0x00131b80-0x0019d8b0
bss = 0x0019e000-0x001d2044
data = 0x001d2060-0x001ea000
stack = 0x001e8000-0x001ea000
init = 0x001ea000-0x00cfd000
available = 0x00cfd000-0x03800000
DMA Zone = 0x03f00000-0x04000000
Hardware Trace Active and Enabled
Boot Mode: 0
Reset caused by Software reset
Blackfin support (C) 2004-2009 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 125 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
External memory: cacheable in instruction cache
Data Cache Enabled for CPU0
External memory: cacheable (write-back) in data cache
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 14224
Kernel command line: root=/dev/mtdblock0 rw ip=10.100.4.50
earlyprintk=serial,uart0,57600 console=ttyBF0,57600
ip=10.100.4.50:10.100.4.174:10.100.4.174:255.255.255.0:bf537-stamp:eth0:off
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 43476k/65536k RAM, (11340k init code, 1218k kernel code, 738k
data, 1024k dma, 7740k reserved)
Hierarchical RCU implementation.
NR_IRQS:130
Configuring Blackfin Priority Driven Interrupts
bfin-rtc: invalid date; resetting
console [ttyBF0] enabled, bootconsole disabled
console [ttyBF0] enabled, bootconsole disabled
Calibrating delay loop... 997.37 BogoMIPS (lpj=1994752)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (36 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
NET: Registered protocol family 1
msgmni has been set to 84
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
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
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 17
IP-Config: Complete:etting system clock to 1970-01-01 08:54:50 UTC (32090)
device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,
host=bf537-stamp, domain=, nis-domain=(none),
bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=
Freeing unused kernel memory: 11340k freed
dma_alloc_init: dma_page @ 0x029ea000 - 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 - https://www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.15.3 (2010-02-19 23:53:32 CST) hush - the humble shell
root:/> version
kernel: Linux release 2.6.32.8-ADI-2010R1-pre-svn8323, build #178 Fri Feb 19
23:56:14 CST 2010PHY: 0:01 - Link is Up - 100/Full
toolchain: bfin-linux-uclibc-gcc release gcc version 4.3.4
(ADI-trunk/svn-3815)
user-dist: release svn-9458, build #3721 Fri Feb 19 23:55:19 CST 2010
root:/> successful boot attempt
************** STEP 3: Start oprofile kernel test
/usr/bin/bfin_opcontrol --init
mkdir: cannot create directory '/var/lib/': File exists
root:/>
Case 1 ...PASS
Case 1 ...PASS
/usr/bin/bfin_opcontrol --start-daemon &
[1] 165 /usr/bin/bfin_opcontrol --start-daemon
root:/> ./oprofiled:582: can't map '/lib/libgcc_s.so.1'
./oprofiled:582: can't map '/lib/libgcc_s.so.1'
./oprofiled:582: can't map '/lib/libgcc_s.so.1'
./oprofiled: can't load library 'libgcc_s.so.1'
--- Mingquan Pan 2010-02-20 22:04:44
In reserve memory testing, after set bootargs to reserve the 32M memory, it also
need to run addip, which makes this bug reproduce almost everytime.
version:
kernel: Linux release 2.6.32.8-ADI-2010R1-pre-svn8325, build #182 Sat Feb 20
11:23:46 CST 2010
toolchain: bfin-linux-uclibc-gcc release gcc version 4.3.4
(ADI-trunk/svn-3815)
user-dist: release svn-9458, build #3774 Sat Feb 20 11:23:16 CST 2010
--- Sonic Zhang 2010-09-16 04:40:28
Fixed. Should check address range across the border of init section and generic
allocable memory properly.
refer to bug 6254.
--- Vivi Li 2010-12-28 21:59:40
OK now. Close it.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
config.linux.reserve_mem application/octet-stream 35482 Mingquan Pan