---------- Forwarded message ----------
From: Sid Kapoor <[EMAIL PROTECTED]>
Date: Fri, Jun 6, 2008 at 10:53 PM
Subject: busybox binaries hangs when trying to do "lstat"
To: [email protected]
Hi all,
The busybox 'ls' applet uses the kernel(system) calls such as lstat to
locate mounted file system information. When a file system has been
mounted from an NFS server and that server is temporarily unavailable,
the calls 'lstat' uses may block in the kernel, resulting in the whole
terminal in a hung-up status.
I NFS mounted a folder at the mount point '/root/tmp/'. When the
server was unavailable, and 'ls' was executed at /root, it tried to
locate mounted file system's information. Eventually the system did
not respond to the 'lstat' call and the system hanged. The final lines
of the log of the strace command while executing 'ls' is as follows
(full log file is attached with this mail) :
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20Z\1\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0777, st_size=1248904, ...}) = 0
mmap2(NULL, 1258876, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0xb7e65000
mmap2(0xb7f92000, 16384, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12c) = 0xb7f92000
mmap2(0xb7f96000, 9596, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f96000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7e64000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e646b0,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7f92000, 8192, PROT_READ) = 0
mprotect(0x36aa000, 4096, PROT_READ) = 0
getuid32() = 0
getpid() = 15915
time(NULL) = 1212803764
ioctl(0, TIOCGWINSZ, {ws_row=24, ws_col=80, ws_xpixel=724, ws_ypixel=508}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
stat64(".", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
brk(0) = 0x80df000
brk(0x8100000) = 0x8100000
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
getdents64(3, /* 32 entries */, 1024) = 1008
lstat64("./abc", {st_mode=S_IFREG|0755, st_size=48, ...}) = 0
lstat64("./img.jpg", {st_mode=S_IFREG|S_ISGID|S_ISVTX|0745,
st_size=27291, ...}) = 0
lstat64("./Desktop", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
lstat64("./ControlCenter", {st_mode=S_IFREG|0755, st_size=955503, ...}) = 0
lstat64("./tmp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
--- SIGHUP (Hangup) @ 0 (0) ---
+++ killed by SIGHUP +++
Can anyone tell the reason why is this happening? Is it a bug in
busybox? Waiting for reply.
Thanks in advance,
Siddharth
--
Siddharth Kapoor
Sr. Software Engg., Monitor Group
Samsung India Software Center(SISC), Noida
Mobile - 9999169466
execve("/bin/ls", ["ls"], [/* 20 vars */]) = 0
brk(0) = 0x80df000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7fbf000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("tls/i586/cmov/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("tls/i586/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/cmov/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("i586/cmov/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("i586/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("cmov/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/ICAClient/tls/i586/cmov/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/opt/ICAClient/tls/i586/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/opt/ICAClient/tls/cmov/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/opt/ICAClient/tls/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/opt/ICAClient/i586/cmov/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/opt/ICAClient/i586/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/opt/ICAClient/cmov/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/opt/ICAClient/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/i586/cmov/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/tls/i586/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/tls/cmov/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/tls/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i586/cmov/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/i586/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/cmov/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/libcrypt.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300Wj\003"..., 512) =
512
fstat64(3, {st_mode=S_IFREG|0755, st_size=27628, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7fbe000
mmap2(0x36a5000, 184636, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
= 0x36a5000
mmap2(0x36aa000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4) = 0x36aa000
mmap2(0x36ac000, 155964, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x36ac000
close(3) = 0
open("tls/i586/cmov/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("tls/i586/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/cmov/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("i586/cmov/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("i586/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("cmov/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/ICAClient/tls/i586/cmov/libm.so.6", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/opt/ICAClient/tls/i586/libm.so.6", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/opt/ICAClient/tls/cmov/libm.so.6", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/opt/ICAClient/tls/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/opt/ICAClient/i586/cmov/libm.so.6", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/opt/ICAClient/i586/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/opt/ICAClient/cmov/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/opt/ICAClient/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/tls/i586/cmov/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/tls/i586/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/tls/cmov/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/tls/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i586/cmov/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/i586/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/cmov/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libm.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\3203\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0777, st_size=145188, ...}) = 0
mmap2(NULL, 147584, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7f99000
mmap2(0xb7fbc000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22) = 0xb7fbc000
close(3) = 0
open("tls/i586/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("tls/i586/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("i586/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("i586/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/ICAClient/tls/i586/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/opt/ICAClient/tls/i586/libc.so.6", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/opt/ICAClient/tls/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/opt/ICAClient/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/opt/ICAClient/i586/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/opt/ICAClient/i586/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/opt/ICAClient/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/opt/ICAClient/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/tls/i586/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/tls/i586/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/tls/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i586/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/lib/i586/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/cmov/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20Z\1\000"..., 512) =
512
fstat64(3, {st_mode=S_IFREG|0777, st_size=1248904, ...}) = 0
mmap2(NULL, 1258876, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7e65000
mmap2(0xb7f92000, 16384, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12c) = 0xb7f92000
mmap2(0xb7f96000, 9596, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f96000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7e64000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e646b0, limit:1048575,
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0,
useable:1}) = 0
mprotect(0xb7f92000, 8192, PROT_READ) = 0
mprotect(0x36aa000, 4096, PROT_READ) = 0
getuid32() = 0
getpid() = 15915
time(NULL) = 1212803764
ioctl(0, TIOCGWINSZ, {ws_row=24, ws_col=80, ws_xpixel=724, ws_ypixel=508}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
stat64(".", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
brk(0) = 0x80df000
brk(0x8100000) = 0x8100000
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
getdents64(3, /* 32 entries */, 1024) = 1008
lstat64("./abc", {st_mode=S_IFREG|0755, st_size=48, ...}) = 0
lstat64("./img.jpg", {st_mode=S_IFREG|S_ISGID|S_ISVTX|0745, st_size=27291,
...}) = 0
lstat64("./Desktop", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
lstat64("./ControlCenter", {st_mode=S_IFREG|0755, st_size=955503, ...}) = 0
lstat64("./tmp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
--- SIGHUP (Hangup) @ 0 (0) ---
+++ killed by SIGHUP +++
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox