Grokbase
Topics Posts Groups | in
x
[ help ]

Re: Commands failing silently?

View PostFlat  Thread  Threaded | < Prev - Next >
Filipe Brandenburger Re: [CentOS] Commands failing silently?
| +1 vote
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Hi,

On Tue, Mar 25, 2008 at 2:21 PM, Dan Bongert <dbongert@wisc.edu> wrote:
>  thoth(3) /tmp> ls
>
>  thoth(4) /tmp> echo $?
>  141

141 is SIGPIPE. If the process is killed by a signal, the return code
will be 128+signal number. 141-128=13, and kill -l says: 13) SIGPIPE.

SIGPIPE means that something that ls is writing to is being closed.
That's really strange, and I couldn't find why.

I still think strace would be the best way to trace it. Please try:

# rm -f /tmp/ls-strace.txt; strace -o /tmp/ls-strace.txt -tt -s 1024
-f ls --color=tty

Repeat it until ls doesn't print anything. Then less your
/tmp/ls-strace.txt file, you'll probably have something like +++
killed by SIGPIPE +++ as the last line of it. Then try to figure out
what happened before it got the SIGPIPE. Probably a "write" to
something, try to figure out to which file descriptor. If you can't do
it, try to post the last few lines of the file here.

Also, can you post the output of this command?
# ls -la /proc/$$/fd/

Filipe
_______________________________________________
CentOS mailing list
[email protected: C...@centos.org]
http://lists.centos.org/mailman/listinfo/centos

Thread : Commands failing silently?
1)
Dan Bongert Hello all: I have a couple CentOS 4 servers (all up-to-date) that are having strange command...
2)
Bill Campbell There is a very good chance that the machine has been cracked, and the system's /bin/ls routine...
3)
Dan Bongert Everything seems OK there: thoth(96) /tmp> sudo rpm -V coreutils procps util-linux Funnily enough,...
4)
Peter l Jakobi That's funny. Or due to the output of strace changing timing & stress. Try redirecting the strace...
5)
mouss where is /tmp mounted? is this an external disk (usb, ...)? is it an nfs mount?
6)
Dan Bongert It's a local disk: thoth(97) /tmp> df -h . Filesystem Size Used Avail Use% Mounted on /dev/md4 16G...
7)
William L. Maltby Hmmm... Sure it's failing? Maybe just the output is going somewhere else? After the command runs,...
8)
Dan Bongert Ok, it's definitely getting an error from somewhere: thoth(3) /tmp> ls thoth(4) /tmp> echo $?...
9)
William L. Maltby "~>" ? Got me on that one. Ditto. Although I should mention that unless you "man bash" and find the...
10)
Filipe Brandenburger Hi, 141 is SIGPIPE. If the process is killed by a signal, the return code will be 128+signal...
11)
mouss maybe check your PATH. try $ /bin/ls ...
spacer
View PostFlat  Thread  Threaded | < Prev - Next >
Home > Groups > CentOS > Commands failing silently? (11 posts) > View Post