LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Segmentation fault with ls -l (https://www.linuxquestions.org/questions/fedora-35/segmentation-fault-with-ls-l-217345/)

Sledge 08-13-2004 09:04 PM

Segmentation fault with ls -l
 
Starting about a day ago I' get a segmentation fault 99% of the time when I run an ls -l or ls -g command. ls by itself or ls -a work just fine. i thought maybe it was related to running the 2.6.7-1.494.2.2 kernel, but it also happens with 2.6.6-1.435.2.3. This is very strange. Can anyone enlighten me?

win32sux 08-13-2004 09:22 PM

before you do anything else, check your system for rootkits...

http://www.rootkit.nl

http://www.chkrootkit.org

Sledge 08-13-2004 11:02 PM

Thanks. I will check for a rootkit.
I also ran an strace ls -l and I found a number of 'file not found' problems related to local time. And just about a day ago I got "system-config-date 1.7.3.1-0.fc2.1.noarch" when I ran yum update. Seems like that could be related...

Sledge 08-14-2004 10:19 AM

Well, chkrootkit says things are ok. This, of course, doesn't guarantee anything, but at least for now I'm going to proceed on the assumption that my problems are caused by something I did as opposed to something nefarious.

I have found that I'm also getting seg faults with vi. The only changes I've made recently were the update I mentioned in the first post and installing kde to play with under a different user name. Can anyone offer a suggestion on how to trace down this problem? I'm doing a bunch of googling, but so far I haven't found a solution.

tkhater 08-22-2004 09:06 AM

I just recently started having the same problem. I have 2 linux servers, and one is manifesting the problem, and the other is not. I also fear I have been hacked, but as of yet have been unable to find too much out of the ordinary:

This is strace on the good system...

*****beginsnip
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)
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
getdents64(3, /* 58 entries */, 4096) = 2048
lstat64("squid.conf", {st_mode=S_IFREG|0644, st_size=113674, ...}) = 0
getxattr("squid.conf", "system.posix_acl_access", (nil), 0) = -1 EOPNOTSUPP (Operation not supported)
socket(PF_FILE, SOCK_STREAM, 0) = 4
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(4) = 0
****snip ****
lstat64("..", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getxattr("..", "system.posix_acl_access", (nil), 0) = -1 EOPNOTSUPP (Operation not supported)
****endsnip





and on the bad system
****beginsnip
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)
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
getdents64(3, /* 64 entries */, 4096) = 2152
lstat64("..", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
****endsnip


I don't know where to go from here though...

tkhater 08-22-2004 09:46 AM

SOLVED

The prelinking database got screwed up.

Just run:
/etc/cron.daily/prelink
and watch your troubles go away.

(I figured this out by using rootkithunter.
Installed: ftp://ftp.webtrek.com/pub/rpms/rkhun...6-1.noarch.rpm
Ran: rkhunter -c
Got: dependency changed for ls error - THIS WAS THE ONLY ERROR I GOT
Ran: /etc/cron.daily/prelink
Problem went away.)

Sledge 08-22-2004 09:54 AM

Glad to hear yours cleaned up so easily. I also tried that soultion after I got rootkithunter because it was reporting several "dependency" change errors. Unfortunately it didnt seem to work. I thought about it some more and rembered that my toddler had walked up and powered down my system in the middle of me dong stuff. At the time I thought I had come through ok, but given my sudden rash of problems decided maybe I hadn't. At any rate I broke down and did a reinstall just to make extra sure things were cool with my system (after backing up my user data). After that I immediately installed rootkithunter to keep tabs on things. So far so good.

One question, how long did it take for your /etc/cron.daily/prelink to run?

tkhater 08-22-2004 10:32 AM

I ran it twice. It took about 2 minutes the first time, and a minute the second time.

tandre 03-29-2005 08:02 PM

I had a very stupid problem....
every time i try to run a application that only root can open i keep getting the same error
"Segmentation Fault"
After i run
/etc/cron.daily/prelink
it disappears... can u explain me this issue???
Thanks always trying to learn a bit more ;)


All times are GMT -5. The time now is 05:24 PM.