LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 12-12-2006, 06:29 AM   #1
dayalan_cse
Member
 
Registered: Oct 2006
Posts: 132

Rep: Reputation: 15
Program received signal SIGSEGV, Segmentation fault


hai everyone,

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 182898743328 (LWP 22952)]
0x0000002a95da0340 in ?? ()
from /remote/data1/read.c

please help me to resolve this problem.


Thanks & Regards
dayalan
 
Old 12-12-2006, 08:38 AM   #2
i_grok
Member
 
Registered: Jun 2006
Location: Massachusetts
Distribution: Gentoo
Posts: 79

Rep: Reputation: 16
It means that the read.c code tried to access memory incorrectly. Did you write read.c yourself?
 
Old 12-13-2006, 09:29 AM   #3
dayalan_cse
Member
 
Registered: Oct 2006
Posts: 132

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by i_grok
It means that the read.c code tried to access memory incorrectly. Did you write read.c yourself?
yes its my code only. can you please give me some more information about the SIGSEGV 11 signal and how to use the gdb to know the cause where it is happening in the code.


Thanks & Regards
dayalan
 
Old 12-13-2006, 06:08 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Usually it means it read off the end of a 'string' ie char array; usually means last element of array was not '\0' ie the string terminator.
 
Old 12-13-2006, 11:35 PM   #5
i_grok
Member
 
Registered: Jun 2006
Location: Massachusetts
Distribution: Gentoo
Posts: 79

Rep: Reputation: 16
Unfortunately, there are a lot of ways that this can happen. If your code isn't too complicated, please post it here and we might find the problem.

To learn gdb better, I would suggest searching for "gdb tutorial" on google. You'll find plenty of good examples. It, too, can be complicated, though.
 
Old 12-13-2006, 11:59 PM   #6
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Here's a description of SEGV which I wrote a week or two ago: http://www.linuxquestions.org/questi...29#post2533129
 
Old 12-14-2006, 04:20 AM   #7
cyber-worx
Member
 
Registered: May 2004
Location: England / Switzerland
Distribution: Gentoo, Ubuntu, Debian, Slackware
Posts: 138

Rep: Reputation: 15
Your attempting to access memory outside of your stack space.

Please paste your code :-)
 
Old 12-14-2006, 11:37 PM   #8
dayalan_cse
Member
 
Registered: Oct 2006
Posts: 132

Original Poster
Rep: Reputation: 15
do you mean that stack space is not enough to execte the code

Quote:
Originally Posted by cyber-worx
Your attempting to access memory outside of your stack space.

Please paste your code :-)
hai everyone,

thanks for the inputs from all.

do you mean that to execute my code stack is not enough and my code tries to access out of allocated memory because of this reason am i getting this Segmentation fault (SIGSEGV 11 signal).

can you please give me some information about the tools in linux for how to trace on this segmentation issues or some other run time problems ( Dynamic execution ) problems.

i know only GDB tool. other than this tool do you know some other tools ( means to view the memory opcode and datas where and why segementation happens like that ).


Thanks & Regards
dayalan
 
Old 12-15-2006, 12:05 AM   #9
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
gdb should be all you need, although if you are uncomfortable with the text interface, you could try one of the many GUIs which run on top of it. For data structures, ddd is quite nice (although the GUI is a little quirky).
 
  


Reply



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
exit signal Segmentation fault Swakoo Linux - Newbie 3 12-22-2005 09:52 PM
Program received signal SIGPIPE, Broken pipe. grupoapunte Programming 1 06-03-2005 05:49 AM
Fatal signal: Segmentation Fault (SDL Parachute Deployed) avis Linux - Software 1 05-10-2005 11:40 AM
Program received signal SIGSEGV, Segmentation fault ims_mca Linux - Distributions 0 03-09-2005 04:16 AM
SIGSEGV- segmentation fault during execution ashwinipahuja Programming 5 05-02-2004 10:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:17 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
Open Source Consulting | Domain Registration