LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-30-2011, 04:20 PM   #1
Mcfestoe
LQ Newbie
 
Registered: May 2011
Location: Manchester UK
Posts: 6

Rep: Reputation: Disabled
Segmentation fault, what does it mean ?


Hi all

I am very new to linux and have had some success so far, many from reading post in here for the last year. I have now come up agaist something that i cant google and get a proper explaination for.

So hoping somebody might be able to explain it.

Iam currently messing about with a Raq4 server and getting the above response, i have post the log below.

Thanks

admin admin]$ su
Password:
[root admin]# cd /romtools
[root /romtools]# dir
backup.rom cobalt-2.10.3-ext3-1M.rom flashtool
[root /romtools]# chmod 777 flashtool
[root /romtools]# ./flashtool -v -r > backup.rom
Segmentation fault
[root /romtools]# ./flashtool -v -r >backup.rom
Segmentation fault
[root /romtools]#
 
Old 05-30-2011, 04:27 PM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Welcome to LQ!
segmentation fault usually means that a program is trying to access memory to which it has no rights.

So there is a problem with the way the flashtool program was written, installed or run.

It would help us help you if you told us a bit about which version of linux you are running, and what you are trying to achieve.
 
Old 05-30-2011, 04:33 PM   #3
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
@ Reply

Hi there,

A segfault error occurs when an application tries to access that part of memory which a CPU cannot address. In this scenario what happens is that the application sends request to CPU for memory, CPU in turn request the hardware to get that much memory. However, hardware in return send a message to CPU that the memory location it is looking for it either not there or not of the type it is requesting (suppose CPU is looking for r/w memory location and the pointer it is giving is for read only memory location). Once that is done CPU sends a sigsegv signal to application to notify that the memory location it requested if invalid.

In simple language segfault occurs when an application tries to access the memory location which is either not there or not of the type it is looking for.

Can you please paste the output of /var/log/messages
 
Old 05-30-2011, 04:54 PM   #4
Mcfestoe
LQ Newbie
 
Registered: May 2011
Location: Manchester UK
Posts: 6

Original Poster
Rep: Reputation: Disabled
tredegar,

Thanks for the reply you could have a point there, the file downloaded as flashtool.txt and i read up on making an executable file, this could be where i have gone wrong.

As for the OS i beleive its modified Red Hat (stripped to the bones) and was going to install CentOS but after some more reading unbuntu may also be looked at.

T3RM1NVT0R

That makes sense, i will have a look at the log files and post them.
 
Old 05-31-2011, 01:07 PM   #5
Mcfestoe
LQ Newbie
 
Registered: May 2011
Location: Manchester UK
Posts: 6

Original Poster
Rep: Reputation: Disabled
Must be doing something wrong as the log files seams empty.

[admin admin]$ su
Password:
[root admin]# tail -f /var/log/messages
May 30 20:26:41 localhost init: Switching to runlevel: 0
May 30 20:26:48 localhost exiting on signal 15
May 31 18:57:32 localhost syslogd 1.3-3: restart.
May 31 18:58:46 localhost init: Switching to runlevel: 6
May 31 18:58:52 localhost exiting on signal 15
May 31 19:00:57 localhost syslogd 1.3-3: restart.
May 31 19:15:00 localhost proftpd[1127]: localhost (localhost[127.0.0.1]) - FTP
session closed.
May 31 19:15:04 localhost telnetd[1135]: ttloop: read: Broken pipe
May 31 19:30:00 localhost proftpd[1840]: localhost (localhost[127.0.0.1]) - FTP
session closed.
May 31 19:30:03 localhost telnetd[1848]: ttloop: read: Broken pipe
 
Old 05-31-2011, 01:38 PM   #6
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by Mcfestoe View Post
[root /romtools]# chmod 777 flashtool
Quote:
Originally Posted by Mcfestoe View Post
Thanks for the reply you could have a point there, the file downloaded as flashtool.txt and i read up on making an executable file, this could be where i have gone wrong.
That sounds like either the file was not originally a Linux executable or the download operation modified it.

So I think the file on which you did that chmod operation was not the kind of file for which that operation was constructive (chmod just gives permission for the file to be executed. It doesn't change a file into something that should be executed).

The following command might provide info that would help us determine what kind of a file you really have (done in the directory where that file is located):
Code:
file flashtool
Did you start from some public download site? I expect you misunderstood what was available there and/or how to use it. Rather than guess the details, or have you try complicated tests, it would be much easier if you just post the URL where you got the file(s). Then someone else could just look and see what you got.

Quote:
Segmentation fault, what does it mean ?
It really just means you have a serious problem. To a programmer armed with the source code and a debugger and a fair amount of expertise and experience, "Segmentation fault" may also be important info about a possible starting point for diagnosis. But to an ordinary user, it give nothing beyond "serious problem".

There is a lot of roughly correct info in T3RM1NVT0R's description of what underlies "Segmentation fault". But the result of all that info is only misleading.

Last edited by johnsfine; 05-31-2011 at 01:57 PM.
 
Old 06-03-2011, 11:51 AM   #7
Mcfestoe
LQ Newbie
 
Registered: May 2011
Location: Manchester UK
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks all

You where all correct, i downloaded the file again from a different source this time it was a .tar file, followed you advice and it worked.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Segmentation Fault? Help!! jcdlvsrbld Linux - Software 4 06-11-2009 10:48 AM
yast segmentation fault, system freezing - nvidia driver at fault? BaltikaTroika SUSE / openSUSE 2 12-02-2005 10:34 AM
segmentation fault r_x Linux - Software 3 04-26-2005 06:22 AM
Segmentation fault sin-x Slackware 2 01-12-2005 04:01 PM
segmentation fault Linh Programming 6 11-03-2003 09:25 AM


All times are GMT -5. The time now is 06:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration