Find the answer to your Linux question:
Results 1 to 9 of 9
Could anyone help me with a problem I face with a linux server box? It seems that grep command causes a segmentation fault. As a result when it runs /etc/rc.d/rc.sysinit ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2004
    Posts
    26

    Help - segmentation fault!!


    Could anyone help me with a problem I face with a linux server box?
    It seems that grep command causes a segmentation fault. As a result when it runs /etc/rc.d/rc.sysinit it causes a segmentation fault in every line that grep exists and the machine cannot boot properly. I managed to login as root with rescue mode but I cannot even start some processes manually due to grep existance. What can I do?

    I would really appreciate any help

  2. #2
    Linux Engineer Nerderello's Avatar
    Join Date
    Apr 2003
    Location
    North East England
    Posts
    1,190
    Segmentation faults are often caused by hardware (RAM) faults. So get yourself a copy of a RAM tester (if you have a Fedora CD, then boot that CD and press (I think) F2 before the install process starts, and then enter (I think) memtest86).

    Like I say, it's often caused by RAM problems, but not always.

    Nerderello

    Use Suse 10.1 and occasionally play with Kubuntu
    Also have Windows 98SE and BeOS

  3. #3
    Just Joined!
    Join Date
    Nov 2004
    Posts
    2
    Hi Stavros,

    I just want to say that I have the exact same problem with the /etc/rc.d/rc.sysinit file.

    It happened after my computer (running RedHat 9) suffered massive attacks of power cuts . The booting process just gets hanged after reporting segmentation faults in some lines of the above program. And these lines are always calling the GREP program.

    I could enter into the system with the installation CDs using the Linux rescue mode, and just for checking I attempted to use the GREP program and just calling it gives a segmentation fault message.

    So very probable GREP got corrupted or the hardware managing the systemís memory got damaged by a spike coming from the electric line. I do not know by sure , but that is my experience.

    I could check that my work data is still there but I do not know what to do to access it or retrieve it from the computer.

    By the way have you managed to get the system up? Did you reinstall the GREP program? Some people are advising to me to do it.

    If anybody can give any word of advise it will be very greatly apreciated, since those massive power outages downed two computers in my lab in the same way described above.

    Thanks in advance.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer Nerderello's Avatar
    Join Date
    Apr 2003
    Location
    North East England
    Posts
    1,190
    I've not heard about the grep thing. But if you need to know how to re-install grep then -

    1) make sure that you have the original rpm file (it will be on one of your Redhat install CDs in the RPMS folder)
    2) then you can erase/remove grep by -
    Code:
    rpm -e grep-2.5.1-7
    which is the version of grep that comes with Redhat 9.
    3) Then re-install grep by
    Code:
    rpm -i FULL FILE NAME
    where "FULL FILE NAME" is replaced by the rpm file (it'll look something like /mnt/cdrom/RPMS/grep-2.5.1-7.rpm).

    All these commands have to be entered as the root (su -) user.

    Having said that, I'm sure that there is a RPM way of refreshing package without de-installing it first, but I just can't think of it at the moment (try entering "man rpm").

    have fun

    Nerderello

    Use Suse 10.1 and occasionally play with Kubuntu
    Also have Windows 98SE and BeOS

  6. #5
    Just Joined!
    Join Date
    Nov 2004
    Posts
    2
    Thank you very much Nerderello for your answer,

    When trying to follow your instructions I faced the fact that in the current rescue mode in which I am I have been unable to see or mount the cdrom directory. Apparently there is a bigger problem here than simply the GREP program being corrupted because when I issued the command $>mount /mnt/cdrom the reply was again segmentation fault . And I do not know if it means that the program mount resulted damaged as well. But there are many other system programs that I can run without getting this message, and maybe this is not a generalized problem.

    However since I cannot get access to the cdrom or floppy my major concern has became connectivity. I cannot get connected to the network in the rescue mode, and hence I cannot retrieve my data from the disc to try to reinstall the system anew. I am connected to a LAN network through an Ethernet card. I have run sshd but when I tried to connect from my computer to another host the result is that the system cannot identify the other hosts in the network. In the vice versa direction the other host computers are denied the access to mine. So my disc data is totally locked. Could you give me any hint in how to get access to my data in the hard disc under this situation? It has been something that really escapes from my working knowledge.
    Thanks again for your help.

  7. #6
    Linux Engineer Nerderello's Avatar
    Join Date
    Apr 2003
    Location
    North East England
    Posts
    1,190
    it sounds like you're going to have to boot your PC from either a diskette or CD (does it have this capability?) and then see if you can fix it from there. At least then you should be able to access your data.

    But can I ask if you are confident that the RAM on your PC is okay?

    Nerderello

    Use Suse 10.1 and occasionally play with Kubuntu
    Also have Windows 98SE and BeOS

  8. #7
    Just Joined!
    Join Date
    Sep 2006
    Posts
    2

    segmentation error

    I'm having a similar problem w/Fedora.
    My server went offline today. When I tried to shut it down, I got a failure ending the mySQL process. Now when it boots I get an error:

    bin/unicode_start line 34: 437 Segmentation fault

    After that, it may or may not finish coming up. The one consistent behavior is the mySQL always fails and there is no accessing the server from the outside world via SSH or anything else.
    I have booted w/the Fedora disk and checked the memory w/no errors.
    HELP, Any ideas?

  9. #8
    Just Joined!
    Join Date
    Dec 2003
    Location
    Greece
    Posts
    43
    mwmobley, Did you ever found a solution on this problem?

    Thanks

  10. #9
    Just Joined!
    Join Date
    Sep 2006
    Posts
    2

    segmentation fault

    turned out my machine had been hacked via port 22 (SSH) and was being used for spamming..in the process, they trashed a sector on the HD. I had to replace the HD and reinstall.
    In the process I learned, do NOT use a root password that can be found in a dictionary....including SciFi dictionaries...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •