[BusyBox] Busybox' "sh" shell on PowerPC

Matthias Fuchs matthias.fuchs at esd-electronics.com
Tue Apr 3 08:55:06 UTC 2001


Hi,

here is a 'strace sh' on my PPC405 system. (kernel 2.4.2, Monta Vista,
glibc 2.1.3, gcc for 405 version 2.95.2). It does not really help I
think !

At the read I pressed return (see comment).

Matthias

Please press Enter to activate this console. 
Couldn't open file '/etc/profile'


BusyBox v0.50 (2001.04.02-17:35+0000) Built-in shell (lash)
Enter 'help' for a list of built-in commands.

/ # strace sh
execve("/bin/sh", ["sh"], [/* 5 vars */]) = 0
brk(0)                                  = 0x1003bd70
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=0200000, st_size=2890943286, ...}) = 0
mmap(ptrace: umoven: Input/output error
)                                  = 0x30014000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
fstat(3, {st_mode=0200000, st_size=2890943286, ...}) = 0
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\2\'"...,
4096) = 4096
mmap(ptrace: umoven: Input/output error
)                                  = 0xfee3000
mprotect(0xffca000, 154328, PROT_NONE)  = 0
mmap(0x484f4d45, 0, PROT_READ|PROT_WRITE|PROT_EXEC|0x65727268, 0xd /*
MAP_???
*/|MAP_FIXED|MAP_ANONYMOUS|MAP_GROWSDOWN|MAP_DENYWRITE|MAP_EXECUTABLE|0x72202400,
540082176, 0x646f5f70) = 0xffd3000
mmap(0xfd984, 0, PROT_EXEC|0x10, MAP_FILE|MAP_GROWSDOWN|0x200, 1038736,
0) = 0xffeb000
close(3)                                = 0
munmap(0x30014000, 790)                 = 0
getpid()                                = 29
ioctl(0, TCGETS, 0x7ffffc08)            = 0
ioctl(1, TCGETS, 0x7ffffc08)            = 0
SYS_197(0x1, 0x7ffff598, 0x7ffff598, 0x7ffffb70, 0) = 0
mmap(ptrace: umoven: Input/output error
)                                  = 0x30014000
ioctl(1, TCGETS, 0x7ffff378)            = 0
write(1, "\n", 1
)                       = 1
write(1, "\n", 1
)                       = 1
write(1, "BusyBox v0.50 (2001.04.02-17:35+"..., 60BusyBox v0.50
(2001.04.02-17:35+0000) Built-in shell (lash)
) = 60
write(1, "Enter \'help\' for a list of built"..., 47Enter 'help' for a
list of built-in commands.

) = 47
brk(0)                                  = 0x1003bd70
brk(0x1003be88)                         = 0x1003be88
brk(0)                                  = 0x1003be88
brk(0x1003c000)                         = 0x1003c000
getcwd(0x1003bd78, 0x100, 0xffef728, 0x1003c000, 0x7f7f7f7f) = 2
ioctl(0, TIOCGPGRP, 0x7ffffd88)         = 0
brk(0)                                  = 0x1003c000
brk(0x1003f000)                         = 0x1003f000
rt_sigaction(0x16, 0x7ffffb38, 0x7ffffbc8, 0x8) = 0
wait4(-1, 0x7ffffd84, WNOHANG|WUNTRACED, NULL) = -1 ECHILD (No child
processes)
geteuid()                               = 0
ioctl(0, TCGETS, 0x7ffffb68)            = 0
ioctl(0, TCSETS, 0x7ffffce8)            = 0
ioctl(0, TCGETS, 0x7ffffce8)            = 0
ioctl(0, TIOCGWINSZ, 0x7ffffcf8)        = 0
rt_sigaction(0x1c, 0x7ffffa78, 0x7ffffb08, 0x8) = 0
geteuid()                               = 0
getuid()                                = 0
getgid()                                = 0
rt_sigaction(0x9, 0x7ffffaa8, 0x7ffffb38, 0x8) = -1 EINVAL (Invalid
argument)
rt_sigaction(0x2, 0x7ffffaa8, 0x7ffffb38, 0x8) = 0
rt_sigaction(0x3, 0x7ffffaa8, 0x7ffffb38, 0x8) = 0
rt_sigaction(0xf, 0x7ffffaa8, 0x7ffffb38, 0x8) = 0
write(1, "/ # ", 4/ # )                     = 4
read(0, "\n", 1)                        = 1		<== I pressed RETURN at
this point !!!!!!!
write(1, "\n", 1
)                       = 1
ioctl(0, TCSETS, 0x7ffffce8)            = 0
ioctl(0, TCGETS, 0x7ffffce8)            = 0
rt_sigaction(0x1c, 0x7ffffac8, 0x7ffffb58, 0x8) = 0
rt_sigaction(0x9, 0x7ffffb08, 0x7ffffb98, 0x8) = -1 EINVAL (Invalid
argument)
rt_sigaction(0x2, 0x7ffffb08, 0x7ffffb98, 0x8) = 0
rt_sigaction(0x3, 0x7ffffb08, 0x7ffffb98, 0x8) = 0
rt_sigaction(0xf, 0x7ffffb08, 0x7ffffb98, 0x8) = 0
rt_sigaction(0x1c, 0x7ffffb08, 0x7ffffb98, 0x8) = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
/ # 

Larry Doolittle wrote:
> 
> Michael -
> 
> My StrongARM embedded machine running 0.50 passes all
> the tests you suggest; blank lines, pipes, control-C.
> 
> Something very strange is happening, I have a hard time
> telling what.  Do you have strace? ltrace? dmalloc?
> gdb? Electric Fence?  We need a more fundamental view
> of the problem than just a collection of oddball symptoms.
> At this point we could equally well suspect a libc,
> compiler, or kernel problem.
> 
>       - Larry
> 
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/mailman/listinfo/busybox

-- 
-------------------------------------------------
\ Matthias Fuchs                                 \
 \ esd electronic system design Gmbh              \
  \ Vahrenwalder Straße 205                        \
   \ D-30165 Hannover                               \
    \ email: matthias.fuchs at esd-electronics.com      \
     \ phone: +49-511-37298-0                         \
      \ fax:   +49-511-37298-68                        \
       --------------------------------------------------





More information about the busybox mailing list