ls -l замораживает терминал локально и удаленно
Я читал другие темы SF относительно ls
не возвращая результаты или замораживая и останавливая терминальные сессии, и кажется, что они обычно виноваты в проблемах сети. Моя проблема, однако, возникает как через удаленные сеансы SSH, так и в том случае, если я физически на самом сервере...
Я только что установил CentOS 5.4 на один из наших серверов. Я настраиваю некоторые скрипты rdiff-backup, и когда я скачал librsync и удалил его, вот тогда я и увидел странное поведение с ls -l
,
wget http://sourceforge.net/projects/librsync/files/librsync/0.9.7/librsync-0.9.7.tar.gz/download /tmp
cd /tmp
tar -xzf librsync-0.9.7.tar.gz
Достаточно просто. Для просмотра файлов в этом каталоге я сделал это:
ls
Результаты:
librsync-0.9.7 librsync-0.9.7.tar.gz
Теперь, если я ls -l
Мой терминал зависает. Я должен повторить ssh, чтобы продолжать идти. После прочтения темы SF я подумал, что это связано с сетью.
Поэтому я был крайне удивлен, когда сел за сам сервер и увидел, что происходит то же самое... Так что, очевидно, это не проблема сети.
Даже если я ls /tmp/librsync-0.9.7
мой терминал зависает точно так же...
Затем я сделал стрейс и получил это (предупреждение: стена текста идет....):
strace ls -l /tmp
execve("/bin/ls", ["ls", "-l", "/tmp"], [/* 21 vars */]) = 0
brk(0) = 0x1c521000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8582cc0000
uname({sys="Linux", node="massive.ourdomain.com", ...}) = 0
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=71746, ...}) = 0
mmap(NULL, 71746, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b8582cc1000
close(3) = 0
open("/lib64/librt.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \"\200\2730\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=53448, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8582cd3000
mmap(0x30bb800000, 2132936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x30bb800000
mprotect(0x30bb807000, 2097152, PROT_NONE) = 0
mmap(0x30bba07000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x30bba07000
close(3) = 0
open("/lib64/libacl.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\31@\2740\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=28008, ...}) = 0
mmap(0x30bc400000, 2120992, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x30bc400000
mprotect(0x30bc406000, 2093056, PROT_NONE) = 0
mmap(0x30bc605000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0x30bc605000
close(3) = 0
open("/lib64/libselinux.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`E\300\2730\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=95464, ...}) = 0
mmap(0x30bbc00000, 2192784, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x30bbc00000
mprotect(0x30bbc15000, 2097152, PROT_NONE) = 0
mmap(0x30bbe15000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x30bbe15000
mmap(0x30bbe17000, 1424, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x30bbe17000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\332\201\2720\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1717800, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8582cd4000
mmap(0x30ba800000, 3498328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x30ba800000
mprotect(0x30ba94d000, 2097152, PROT_NONE) = 0
mmap(0x30bab4d000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14d000) = 0x30bab4d000
mmap(0x30bab52000, 16728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x30bab52000
close(3) = 0
open("/lib64/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220W\0\2730\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=145824, ...}) = 0
mmap(0x30bb000000, 2204528, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x30bb000000
mprotect(0x30bb016000, 2093056, PROT_NONE) = 0
mmap(0x30bb215000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x30bb215000
mmap(0x30bb217000, 13168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x30bb217000
close(3) = 0
open("/lib64/libattr.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\17\300\2750\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=17888, ...}) = 0
mmap(0x30bdc00000, 2110728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x30bdc00000
mprotect(0x30bdc04000, 2093056, PROT_NONE) = 0
mmap(0x30bde03000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x30bde03000
close(3) = 0
open("/lib64/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\16\300\2720\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=23360, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8582cd5000
mmap(0x30bac00000, 2109696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x30bac00000
mprotect(0x30bac02000, 2097152, PROT_NONE) = 0
mmap(0x30bae02000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x30bae02000
close(3) = 0
open("/lib64/libsepol.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0=\0\2740\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=247496, ...}) = 0
mmap(0x30bc000000, 2383136, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x30bc000000
mprotect(0x30bc03b000, 2097152, PROT_NONE) = 0
mmap(0x30bc23b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3b000) = 0x30bc23b000
mmap(0x30bc23c000, 40224, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x30bc23c000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8582cd6000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8582cd7000
arch_prctl(ARCH_SET_FS, 0x2b8582cd6c50) = 0
mprotect(0x30bba07000, 4096, PROT_READ) = 0
mprotect(0x30bab4d000, 16384, PROT_READ) = 0
mprotect(0x30bb215000, 4096, PROT_READ) = 0
mprotect(0x30ba61b000, 4096, PROT_READ) = 0
mprotect(0x30bae02000, 4096, PROT_READ) = 0
munmap(0x2b8582cc1000, 71746) = 0
set_tid_address(0x2b8582cd6ce0) = 24102
set_robust_list(0x2b8582cd6cf0, 0x18) = 0
futex(0x7fff72d02d6c, FUTEX_WAKE_PRIVATE, 1) = 0
rt_sigaction(SIGRTMIN, {0x30bb005370, [], SA_RESTORER|SA_SIGINFO, 0x30bb00e7c0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x30bb0052b0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x30bb00e7c0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0
access("/etc/selinux/", F_OK) = 0
brk(0) = 0x1c521000
brk(0x1c542000) = 0x1c542000
open("/etc/selinux/config", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=448, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8582cc1000
read(3, "# This file controls the state o"..., 4096) = 448
read(3, "", 4096) = 0
close(3) = 0
munmap(0x2b8582cc1000, 4096) = 0
open("/proc/mounts", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b8582cc1000
read(3, "rootfs / rootfs rw 0 0\n/dev/root"..., 4096) = 577
close(3) = 0
munmap(0x2b8582cc1000, 4096) = 0
open("/selinux/mls", O_RDONLY) = 3
read(3, "1", 19) = 1
close(3) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
connect(3, {sa_family=AF_FILE, path="/var/run/setrans/.setrans-unix"...}, 110) = 0
sendmsg(3, {msg_name(0)=NULL, msg_iov(5)=[{"\1\0\0\0", 4}, {"\1\0\0\0", 4}, {"\1\0\0\0", 4}, {"\0", 1}, {"\0", 1}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 14
readv(3, [{"\1\0\0\0", 4}, {"\1\0\0\0", 4}, {"\0\0\0\0", 4}], 3) = 12
readv(3, [{"\0", 1}], 1) = 1
close(3) = 0
open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=56413824, ...}) = 0
mmap(NULL, 56413824, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b8582cd8000
close(3) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=65, ws_col=137, ws_xpixel=0, ws_ypixel=0}) = 0
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2528, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b85862a5000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2528
read(3, "", 4096) = 0
close(3) = 0
munmap(0x2b85862a5000, 4096) = 0
open("/usr/share/locale/en_US.UTF-8/LC_TIME/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_TIME/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_TIME/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_TIME/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_TIME/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_TIME/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
getxattr("/tmp", "system.posix_acl_access", 0x0, 0) = -1 ENODATA (No data available)
getxattr("/tmp", "system.posix_acl_default", 0x0, 0) = -1 ENODATA (No data available)
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1711, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b85862a5000
read(3, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1711
read(3, "", 4096) = 0
close(3) = 0
munmap(0x2b85862a5000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=71746, ...}) = 0
mmap(NULL, 71746, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b85862a5000
close(3) = 0
open("/lib64/libnss_files.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\37\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=53880, ...}) = 0
mmap(NULL, 2139432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b85862b7000
mprotect(0x2b85862c1000, 2093056, PROT_NONE) = 0
mmap(0x2b85864c0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x2b85864c0000
close(3) = 0
mprotect(0x2b85864c0000, 4096, PROT_READ) = 0
munmap(0x2b85862a5000, 71746) = 0
open("/etc/passwd", O_RDONLY) = 3
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=1823, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b85862a5000
read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 1823
close(3) = 0
munmap(0x2b85862a5000, 4096) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
open("/etc/group", O_RDONLY) = 3
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=743, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b85862a5000
read(3, "root:x:0:root\nbin:x:1:root,bin,d"..., 4096) = 743
close(3) = 0
munmap(0x2b85862a5000, 4096) = 0
open("/tmp", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
getdents(3, /* 8 entries */, 32768) = 264
lstat("/tmp/librsync-0.9.7.tar.gz", {st_mode=S_IFREG|0644, st_size=453802, ...}) = 0
getxattr("/tmp/librsync-0.9.7.tar.gz", "system.posix_acl_access", 0x0, 0) = -1 ENODATA (No data available)
getxattr("/tmp/librsync-0.9.7.tar.gz", "system.posix_acl_default", 0x0, 0) = -1 ENODATA (No data available)
lstat("/tmp/librsync-0.9.7", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
getxattr("/tmp/librsync-0.9.7", "system.posix_acl_access", 0x0, 0) = -1 ENODATA (No data available)
getxattr("/tmp/librsync-0.9.7", "system.posix_acl_default", 0x0, 0) = -1 ENODATA (No data available)
open("/etc/passwd", O_RDONLY) = 4
fcntl(4, F_GETFD) = 0
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=1823, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b85862a5000
read(4, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 1823
read(4, "", 4096) = 0
close(4) = 0
munmap(0x2b85862a5000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=71746, ...}) = 0
mmap(NULL, 71746, PROT_READ, MAP_PRIVATE, 4, 0) = 0x2b85862a5000
close(4) = 0
open("/lib64/libnss_ldap.so.2", O_RDONLY) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300r\4\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0755, st_size=3169960, ...}) = 0
mmap(NULL, 5329912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x2b85864c2000
mprotect(0x2b858679e000, 2093056, PROT_NONE) = 0
mmap(0x2b858699d000, 176128, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2db000) = 0x2b858699d000
mmap(0x2b85869c8000, 62456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b85869c8000
close(4) = 0
open("/lib64/libcom_err.so.2", O_RDONLY) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\n\300\2770\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0755, st_size=10000, ...}) = 0
mmap(0x30bfc00000, 2103048, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x30bfc00000
mprotect(0x30bfc02000, 2093056, PROT_NONE) = 0
mmap(0x30bfe01000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1000) = 0x30bfe01000
close(4) = 0
open("/lib64/libkeyutils.so.1", O_RDONLY) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\n@\2760\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0755, st_size=9472, ...}) = 0
mmap(0x30be400000, 2102416, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x30be400000
mprotect(0x30be402000, 2093056, PROT_NONE) = 0
mmap(0x30be601000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1000) = 0x30be601000
close(4) = 0
open("/lib64/libresolv.so.2", O_RDONLY) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2402\0\2760\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0755, st_size=92736, ...}) = 0
mmap(0x30be000000, 2181864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x30be000000
mprotect(0x30be011000, 2097152, PROT_NONE) = 0
mmap(0x30be211000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x11000) = 0x30be211000
mmap(0x30be213000, 6888, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x30be213000
close(4) = 0
mprotect(0x30be211000, 4096, PROT_READ) = 0
munmap(0x2b85862a5000, 71746) = 0
rt_sigaction(SIGPIPE, {0x1, [], SA_RESTORER, 0x30ba8302d0}, {SIG_DFL, [], 0}, 8) = 0
geteuid() = 0
futex(0x2b85869c7708, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/etc/ldap.conf", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=9119, ...}) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=9119, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b85862a5000
read(4, "# @(#)$Id: ldap.conf,v 1.38 2006"..., 4096) = 4096
read(4, "Use the OpenLDAP password change"..., 4096) = 4096
read(4, " OpenLDAP 2.0 and earlier is \"no"..., 4096) = 927
read(4, "", 4096) = 0
close(4) = 0
munmap(0x2b85862a5000, 4096) = 0
uname({sys="Linux", node="massive.ourdomain.com", ...}) = 0
open("/etc/resolv.conf", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=107, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b85862a5000
read(4, "; generated by /sbin/dhclient-sc"..., 4096) = 107
read(4, "", 4096) = 0
close(4) = 0
munmap(0x2b85862a5000, 4096) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 4
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = -1 ENOENT (No such file or directory)
close(4) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 4
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = -1 ENOENT (No such file or directory)
close(4) = 0
open("/etc/host.conf", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=17, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b85862a5000
read(4, "order hosts,bind\n", 4096) = 17
read(4, "", 4096) = 0
close(4) = 0
munmap(0x2b85862a5000, 4096) = 0
futex(0x30bab54d44, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/etc/hosts", O_RDONLY) = 4
fcntl(4, F_GETFD) = 0
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=187, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b85862a5000
read(4, "# Do not remove the following li"..., 4096) = 187
read(4, "", 4096) = 0
close(4) = 0
munmap(0x2b85862a5000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=71746, ...}) = 0
mmap(NULL, 71746, PROT_READ, MAP_PRIVATE, 4, 0) = 0x2b85862a5000
close(4) = 0
open("/lib64/libnss_dns.so.2", O_RDONLY) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\17\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0755, st_size=23736, ...}) = 0
mmap(NULL, 2113792, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x2b85869d8000
mprotect(0x2b85869dc000, 2093056, PROT_NONE) = 0
mmap(0x2b8586bdb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x3000) = 0x2b8586bdb000
close(4) = 0
mprotect(0x2b8586bdb000, 4096, PROT_READ) = 0
munmap(0x2b85862a5000, 71746) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.10.20")}, 28) = 0
fcntl(4, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0
gettimeofday({1276265920, 823870}, NULL) = 0
poll([{fd=4, events=POLLOUT}], 1, 0) = 1 ([{fd=4, revents=POLLOUT}])
sendto(4, "C\v\1\0\0\1\0\0\0\0\0\0\7massive\10ourdomain\3co"..., 38, MSG_NOSIGNAL, NULL, 0) = 38
poll([{fd=4, events=POLLIN}], 1, 5000) = 1 ([{fd=4, revents=POLLIN}])
ioctl(4, FIONREAD, [122]) = 0
recvfrom(4, "C\v\205\200\0\1\0\1\0\2\0\2\7massive\10ourdomain\3co"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.10.20")}, [16]) = 122
close(4) = 0
open("/etc/openldap/ldap.conf", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=335, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b85862a5000
read(4, "#\n# LDAP Defaults\n#\n\n# See ldap."..., 4096) = 335
read(4, "", 4096) = 0
close(4) = 0
munmap(0x2b85862a5000, 4096) = 0
getuid() = 0
geteuid() = 0
getgid() = 0
getegid() = 0
open("/root/ldaprc", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/root/.ldaprc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/etc/ldap.conf", {st_mode=S_IFREG|0644, st_size=9119, ...}) = 0
geteuid() = 0
brk(0x1c566000) = 0x1c566000
open("/etc/hosts", O_RDONLY) = 4
fcntl(4, F_GETFD) = 0
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=187, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b85862a5000
read(4, "# Do not remove the following li"..., 4096) = 187
read(4, "", 4096) = 0
close(4) = 0
munmap(0x2b85862a5000, 4096) = 0
open("/etc/hosts", O_RDONLY) = 4
fcntl(4, F_GETFD) = 0
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=187, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b85862a5000
read(4, "# Do not remove the following li"..., 4096) = 187
read(4, "", 4096) = 0
close(4) = 0
munmap(0x2b85862a5000, 4096) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.10.20")}, 28) = 0
fcntl(4, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0
gettimeofday({1276265920, 855948}, NULL) = 0
poll([{fd=4, events=POLLOUT}], 1, 0) = 1 ([{fd=4, revents=POLLOUT}])
sendto(4, "\32 \1\0\0\1\0\0\0\0\0\0\4ldap\10ourdomain\3com\0\0"..., 35, MSG_NOSIGNAL, NULL, 0) = 35
poll([{fd=4, events=POLLIN}], 1, 5000) = 1 ([{fd=4, revents=POLLIN}])
ioctl(4, FIONREAD, [104]) = 0
recvfrom(4, "\32 \205\200\0\1\0\1\0\1\0\0\4ldap\10ourdomain\3com\0\0"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.10.20")}, [16]) = 104
close(4) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.10.20")}, 28) = 0
fcntl(4, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0
gettimeofday({1276265920, 858536}, NULL) = 0
poll([{fd=4, events=POLLOUT}], 1, 0) = 1 ([{fd=4, revents=POLLOUT}])
sendto(4, "I\375\1\0\0\1\0\0\0\0\0\0\4ldap\10ourdomain\3com\0\0"..., 35, MSG_NOSIGNAL, NULL, 0) = 35
poll([{fd=4, events=POLLIN}], 1, 5000) = 1 ([{fd=4, revents=POLLIN}])
ioctl(4, FIONREAD, [139]) = 0
recvfrom(4, "I\375\205\200\0\1\0\2\0\2\0\2\4ldap\10ourdomain\3com\0\0"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.10.20")}, [16]) = 139
close(4) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 4
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
setsockopt(4, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
fcntl(4, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(4, {sa_family=AF_INET, sin_port=htons(389), sin_addr=inet_addr("10.20.0.30")}, 16) = -1 EINPROGRESS (Operation now in progress)
poll([{fd=4, events=POLLOUT|POLLERR|POLLHUP}], 1, 120000
И вот где он останавливается, сразу после этого последнего 120000.... Используя strace, я, очевидно, могу CTRL+C продолжать. Но, как я уже сказал, обычно терминал полностью зависает.
У кого-нибудь есть какие-нибудь подсказки?
ОБНОВИТЬ
ls -l > out.txt 2> err.txt
в результате пустые файлы out.txt и err.txt.
ls -n
ДЕЙСТВИТЕЛЬНО вернул правильные результаты. Так что же такого в GID и UID, с которыми у него проблемы? Это проблема LDAP, как сказал Слобо? Почему мой сервер пытается связаться с нашим сервером LDAP, когда я перечисляю файлы?
ОБНОВИТЬ
На самом деле проблема была связана с LDAP, как вы, ребята, указали. Это была неверная конфигурация в настройках LDAP. Спасибо, парни
2 ответа
Похоже, он связывается с сервером ldap для получения учетной информации о извлеченных файлах - он не связан с UID, которые ваша система, возможно, не распознает. Не уверен, почему это привело бы к такой остановке - проверьте журналы вашего сервера LDAP?
Тот факт, что ls -n выполняется нормально, убедительно свидетельствует о том, что причина ls -l зависает в том, что он не может преобразовать номера UID и GID в пользователей и группы. Их разрешение настраивается с помощью " переключателя службы имен". Это (обычно) настраивается в файле /etc/nsswitch.conf. Что-то в строке 'passwd' или 'groups' не может вернуть информацию для UID или GID. Вы можете изолировать это, временно удалив методы из соответствующих строк.
Поскольку это tarball, который вы расширяете, вполне вероятно, что tarball имел некоторый UID/GID для файлов, которых у вас нет в вашей системе, поэтому для его выхода требуется много времени. Если они вам не нужны или вы просто хотите, чтобы ваш архив работал, вы можете попробовать добавить несколько опций в команду extract:
tar --owner=yourname --group=users -xvf archive.tar
Это приведет к тому, что владельцы извлеченных файлов получат общеизвестные значения, что, в свою очередь, должно позволить ls -l завершиться за разумное время.