Routerboard RB435G: dynamically linked binaries crash, static OK.
Remy Nonnenmacher
remy.nonnenmacher at activnetworks.com
Tue Feb 5 17:16:24 UTC 2013
Hi,
I'm trying to boot a mikrotik routerboard RB435G (mainly a 433UAH with
256MB). I've setup a cross builded nfs root using 9-stable (head does
not works: interfaces does not come up).
I got the whole thing up until it nfs mount root filesystem. After that,
whatever dynamic binaries I invoke, it dumps core somewhere in libc.so.7
(always at same point). I guess it's libc since this is the last
accessed lib via NFS before crash.
I'm left with /rescue statically linked binaries that works well.
Any hint ?
(Cross compiled using: TARGET=mips, TARGET_ARCH=mipseb,
TARGET_CPUTYPE=mips32).
+++++ Log of boot with dumps samples....
RouterBOOT booter 2.41
RouterBoard 435G
CPU frequency: 680 MHz
Memory size: 256 MB
Press any key within 2 seconds to enter setup..
trying bootp protocol... OK
Got IP address: 192.168.1.115
resolved mac address E4:1F:13:B9:8E:84
Gateway: 192.168.1.1
transfer started ...................................................
transfer ok, time=1.73s
setting up elf image... OK
jumping to kernel code
CPU platform: Atheros AR7161 rev 2
CPU Frequency=680 MHz
CPU DDR Frequency=340 MHz
CPU AHB Frequency=170 MHz
platform frequency: 680000000
arguments:
a0 = 00000009
a1 = a0871c00
a2 = 00000000
a3 = 00000000
Cmd line: console=ttyS0,115200 boot_part_size=4194304 gpio=4031
HZ=340000000 mem=256M kmac=D4:CA:6D:6C:24:1C board=435G boot=1 mlc=3
Environment:
envp is invalid
Cache info:
picache_stride = 4096
picache_loopcount = 16
pdcache_stride = 4096
pdcache_loopcount = 8
cpu0: MIPS Technologies processor v116.147
MMU: Standard TLB, 16 entries
L1 i-cache: 4 ways of 512 sets, 32 bytes per line
L1 d-cache: 4 ways of 256 sets, 32 bytes per line
Config1=0x9ee3519e<PerfCount,WatchRegs,MIPS16,EJTAG>
Config3=0x20
Copyright (c) 1992-2013 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.1-STABLE #0: Tue Feb 5 16:40:31 CET 2013
root at dvl5.activnetworks.com:/usr/rb435/obj/mips.mipseb/usr/rb435/src/sys/RB435
mips
real memory = 268435456 (262144K bytes)
avail memory = 255176704 (243MB)
nexus0: <MIPS32 root nexus>
clock0: <Generic MIPS32 ticker> on nexus0
Timecounter "MIPS32" frequency 340000000 Hz quality 800
Event timer "MIPS32" frequency 340000000 Hz quality 800
apb0 at irq 4 on nexus0
uart0: <16550 or compatible> on apb0
uart0: console (115200,n,8,1)
gpio0: <Atheros AR71XX GPIO driver> on apb0
gpio0: [GIANT-LOCKED]
gpioc0: <GPIO controller> on gpio0
gpiobus0: <GPIO bus> on gpio0
gpioled0: <GPIO led> at pin(s) 4 on gpiobus0
arge0: <Atheros AR71xx built-in ethernet interface> at mem
0x19000000-0x19000fff irq 2 on nexus0
arge0: Ethernet address: d4:ca:6d:6c:24:1c
arge1: <Atheros AR71xx built-in ethernet interface> at mem
0x1a000000-0x1a000fff irq 3 on nexus0
miibus0: <MII bus> on arge1DUMMYNET 0 with IPv6 initialized (100409)
ukphy0: <Generic IEEE 802.3u media interface> PHY 4 on miibus0
ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,
1000baseT-FDX, 1000baseT-FDX-master, auto
arge1: Ethernet address: d4:ca:6d:6c:24:1d
spi0: <AR71XX SPI> at mem 0x1f000000-0x1f00000f on nexus0
spibus0: <spibus bus> on spi0
spibus0: <unknown card> at cs 2
ar71xx_wdog0: <Atheros AR71XX watchdog timer> on nexus0
Timecounters tick every 1.000 msec
ipfw2 initialized, divert enabled, nat enabled, default to accept,
logging disabled
DUMMYNET 0 with IPv6 initialized (100409)
load_dn_sched dn_sched QFQ loaded
load_dn_sched dn_sched RR loaded
load_dn_sched dn_sched WF2Q+ loaded
load_dn_sched dn_sched FIFO loaded
load_dn_sched dn_sched PRIO loaded
bootpc_init: wired to interface 'arge1'
Sending DHCP Discover packet from interface arge1 (d4:ca:6d:6c:24:1d)
arge1: link state changed to DOWN
arge1: link state changed to UP
Received DHCP Offer packet on arge1 from 192.168.1.254 (accepted) (no
root path)
Received DHCP Offer packet on arge1 from 192.168.1.254 (ignored) (no
root path)
Received DHCP Offer packet on arge1 from 192.168.1.254 (ignored) (no
root path)
Received DHCP Offer packet on arge1 from 192.168.1.254 (ignored) (no
root path)
Sending DHCP Request packet from interface arge1 (d4:ca:6d:6c:24:1d)
Received DHCP Ack packet on arge1 from 192.168.1.254 (accepted) (got
root path)
arge1 at 192.168.1.115 server 192.168.1.254 boot file kernel.435
subnet mask 255.255.255.0 router 192.168.1.1 rootfs
192.168.1.254:/usr/rb435/root
Adjusted interface arge1
Trying to mount root from nfs: []...
NFS ROOT: 192.168.1.254:/usr/rb435/root
warning: no time-of-day clock registered, system time will not be set
accurately
warning: no time-of-day clock registered, system time will not be set
accurately
BAD_PAGE_FAULT: pid 16 (sh), uid 0: pc 0x40445418 got a fault at 0x40445450
Trapframe Register Dump:
zero: 0 at: 0x40465b70 v0: 0x40458000 v1: 0x7ffedec0
a0: 0x3 a1: 0x40465b60 a2: 0 a3: 0
t0: 0x7fffefd8 t1: 0x7fffefb8 t2: 0 t3: 0x56ce3179
t4: 0x1 t5: 0 t6: 0x738 t7: 0x4043a284
t8: 0 t9: 0x40445450 s0: 0 s1: 0x7ffed8e8
s2: 0x404422d0 s3: 0x7fffdfa0 s4: 0x7fffdee0 s5: 0x7fffdecc
s6: 0x2 s7: 0x7fffdedc k0: 0 k1: 0
gp: 0x4046cf60 sp: 0x7ffed860 s8: 0x6474e551 ra: 0x404453f4
sr: 0xf013 mullo: 0x80be mulhi: 0x8c badvaddr:
0x40445450
cause: 0x4 pc: 0x40445418
Page table info for pc address 0x40445418: pde = 0x80a5b000, pte =
0x4002c5da
Dumping 4 words starting at pc address 0x40445418:
af220000 8c420034 8fbf0654 8fbe0650
Page table info for bad address 0x40445450: pde = 0x80a5b000, pte =
0x4002c5da
pid 16 (sh), uid 0: exited on signal 10
Jan 1 00:00:15 init: /bin/sh on /etc/rc terminated abnormally, going to
single user mode
Enter full pathname of shell or RETURN for /bin/sh: /rescue/sh
# /rescue/ls -l /
total 145
-rw-r--r-- 2 root wheel 963 Feb 5 2013 .cshrc
-rw-r--r-- 2 root wheel 251 Feb 5 2013 .profile
-r--r--r-- 1 root wheel 6194 Feb 5 2013 COPYRIGHT
drwxr-xr-x 2 root wheel 1024 Feb 5 2013 bin
drwxr-xr-x 7 root wheel 512 Feb 5 2013 boot
dr-xr-xr-x 4 root wheel 512 Jan 1 00:00 dev
drwxr-xr-x 20 root wheel 2048 Feb 5 2013 etc
drwxr-xr-x 3 root wheel 1536 Feb 5 2013 lib
drwxr-xr-x 3 root wheel 512 Feb 5 2013 libexec
drwxr-xr-x 2 root wheel 512 Feb 5 2013 media
drwxr-xr-x 2 root wheel 512 Feb 5 2013 mnt
dr-xr-xr-x 2 root wheel 512 Feb 5 2013 proc
drwxr-xr-x 2 root wheel 2560 Feb 5 2013 rescue
drwxr-xr-x 2 root wheel 512 Feb 5 2013 root
drwxr-xr-x 2 root wheel 2560 Feb 5 2013 sbin
lrwxr-xr-x 1 root wheel 11 Feb 5 2013 sys -> usr/src/sys
drwxrwxrwt 2 root wheel 512 Feb 5 2013 tmp
drwxr-xr-x 14 root wheel 512 Feb 5 2013 usr
drwxr-xr-x 23 root wheel 512 Feb 5 2013 var
# /bin/ls -l /
BAD_PAGE_FAULT: pid 20 (ls), uid 0: pc 0x40423418 got a fault at 0x40423450
Trapframe Register Dump:
zero: 0 at: 0x40443b70 v0: 0x40436000 v1: 0x7ffede38
a0: 0x3 a1: 0x40443b60 a2: 0 a3: 0
t0: 0x7fffefd8 t1: 0x7fffefb8 t2: 0 t3: 0x55235001
t4: 0x1 t5: 0 t6: 0x738 t7: 0x40418284
t8: 0 t9: 0x40423450 s0: 0 s1: 0x7ffed860
s2: 0x404202d0 s3: 0x7fffdf2c s4: 0x7fffde6c s5: 0x7fffde44
s6: 0x2 s7: 0x7fffde54 k0: 0 k1: 0
gp: 0x4044af60 sp: 0x7ffed7d8 s8: 0x6474e551 ra: 0x404233f4
sr: 0xf013 mullo: 0x80be mulhi: 0x8c badvaddr:
0x40423450
cause: 0x4 pc: 0x40423418
Page table info for pc address 0x40423418: pde = 0x80a7f000, pte =
0x4002c5da
Dumping 4 words starting at pc address 0x40423418:
af220000 8c420034 8fbf0654 8fbe0650
Page table info for bad address 0x40423450: pde = 0x80a7f000, pte =
0x4002c5da
pid 20 (ls), uid 0: exited on signal 10
Bus error
#
# /rescue/df
Filesystem 512-blocks Used Avail Capacity
Mounted on
192.168.1.254:/usr/rb435/root 247682104 42390264 185477272 19% /
devfs 2 2 0 100% /dev
# df
BAD_PAGE_FAULT: pid 22 (df), uid 0: pc 0x4041f418 got a fault at 0x4041f450
Trapframe Register Dump:
zero: 0 at: 0x4043fb70 v0: 0x40432000 v1: 0x7ffede48
a0: 0x3 a1: 0x4043fb60 a2: 0 a3: 0
t0: 0x7fffefd8 t1: 0x7fffefb8 t2: 0 t3: 0x55460025
t4: 0x1 t5: 0 t6: 0x738 t7: 0x40414284
t8: 0 t9: 0x4041f450 s0: 0 s1: 0x7ffed870
s2: 0x4041c2d0 s3: 0x7fffdf34 s4: 0x7fffde74 s5: 0x7fffde54
s6: 0x2 s7: 0x7fffde5c k0: 0 k1: 0
gp: 0x40446f60 sp: 0x7ffed7e8 s8: 0x6474e551 ra: 0x4041f3f4
sr: 0xf013 mullo: 0x80be mulhi: 0x8c badvaddr:
0x4041f450
cause: 0x4 pc: 0x4041f418
Page table info for pc address 0x4041f418: pde = 0x80a80000, pte =
0x4002c5da
Dumping 4 words starting at pc address 0x4041f418:
af220000 8c420034 8fbf0654 8fbe0650
Page table info for bad address 0x4041f450: pde = 0x80a80000, pte =
0x4002c5da
pid 22 (df), uid 0: exited on signal 10
Bus error
More information about the freebsd-mips
mailing list