busybox segfault in __uClibc_main

Linh Dang linhd at nortel.com
Mon Dec 5 17:38:22 UTC 2005


captured while busybox was invoked by strace,gdb and shell.


/sys/module/oprofile # strace /opt/corp/projects/btsproject3/linhd/busybox-1.01/busybox ls
execve("/opt/corp/projects/btsproject3/linhd/busybox-1.01/busybox", ["/opt/corp/projects/btsproject3/linhd/busybox-1.01/busybox", "ls"], [/* 12 vars */]) = 0
ioctl(0, TCGETS or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS or TCGETS, {B38400 opost isig icanon echo ...}) = 0
getuid()                                = 0
getgid()                                = 0
getuid()                                = 0
getgid()                                = 0
setgid(0)                               = 0
setuid(0)                               = 0
ioctl(1, TIOCGWINSZ or TIOCGWINSZ, {ws_row=68, ws_col=196, ws_xpixel=4104, ws_ypixel=26284}) = 0
ioctl(1, TCGETS or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS or TCGETS, {B38400 opost isig icanon echo ...}) = 0
brk(0)                                  = 0x1013f000
brk(0x10140000)                         = 0x10140000
lstat(".", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
stat(".", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open(".", O_RDONLY)                     = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
brk(0x10141000)                         = 0x10141000
getdents(3, /* 3 entries */, 3933)      = 56
brk(0x10142000)                         = 0x10142000
ioctl(2147483647, TCGETS or TCGETS, 0x7fb6b870) = -1 EBADF (Bad file descriptor)
brk(0x10143000)                         = 0x10143000
lstat("./parameters", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents(3, /* 0 entries */, 3933)      = 0
close(3)                                = 0
open("/etc/TZ", O_RDONLY)               = -1 ENOENT (No such file or directory)
lstat("./parameters", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
write(1, "\33[1;34mparameters\33[0m\n", 22parameters
) = 22
exit(0)                                 = ?


/sys/module/oprofile # gdb /opt/corp/projects/btsproject3/linhd/busybox-1.01/busybox
GNU gdb 2004-07-05-cvs
Copyright 2004 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 "powerpc-linux"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run ls
Starting program: /opt/corp/projects/btsproject3/linhd/busybox-1.01/busybox ls
parameters

Program exited normally.
(gdb) /sys/module/oprofile # 


/sys/module/oprofile #  sh -c '/opt/corp/projects/btsproject3/linhd/busybox-1.01/busybox ls'
parameters
Segmentation fault
/sys/module/oprofile # 




Any idea?

--

Linh Dang



More information about the uClibc mailing list