LinuxQuestions.org
Review your favorite Linux distribution.
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-18-2008, 05:15 AM   #1
shyan
LQ Newbie
 
Registered: Dec 2008
Posts: 14

Rep: Reputation: 0
Red face What causes the segmentation fault during the course of simulation in ns-2.33?


This is the running procedure while I simulated using the a changed aodv protocol. I burrowed some portion of the code but I got the error of SEGMENTATION FAULT is there any way to track where is the error being generated from?

[Shyan@localhost bin]$ ./ns exp.tcl 10 1 traf scen 1 exp1.tr exp1.nam
num_nodes is set 10
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
Here Agent/AODV/MYAODV 1
INITIALIZE THE LIST xListHead
Here Agent/AODV/MYAODV 1
Here Agent/AODV/MYAODV 1
Here Agent/AODV/MYAODV 1
Here Agent/AODV/MYAODV 1
Here Agent/AODV/MYAODV 1
Here Agent/AODV/MYAODV 1
Here Agent/AODV/MYAODV 1
Here Agent/AODV/MYAODV 1
Here Agent/AODV/MYAODV 1
Loading node movement...
Loading connection pattern...
Starting Simulation...
Here
Here
Here
Here
Here
Here
Here
Here
Here
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
Segmentation fault

How to get to this error?
 
Old 12-20-2008, 02:14 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
I'm no coder, so I can't help with straighten out errors
in that code. The text shown in # 1, won't give you any
answers.

But please read about "segmentation fault"
http://www.google.dk/search?hl=da&q=...meta=&aq=f&oq=

http://en.wikipedia.org/wiki/Segmentation_fault

If you do not find the failure in your code, please
show the code, and if you put it in "Code Tags" ,
you may even get an answer.
....
 
Old 12-20-2008, 02:38 PM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,586

Rep: Reputation: 698Reputation: 698Reputation: 698Reputation: 698Reputation: 698Reputation: 698
Post

A segmentation fault is a memory error.

/begin history lesson
Back around the time of the 80286 design (when if you wanted windows you would have been referred to a carpenter) in the commercial "Our cpu has more <whatever> than yours" littleness that goes on, intel went to 20 address lines. But they only had 16 bit registers. This was sad and stupid. So they invented 4 bit paging or segmentation registers. Your ram addresses then had the paging register as the top 4 bits and the 16 other bits were the data register. Ram appeared on certain pages, not others (hence memory mapping, etc.)
/end history lesson

So when you address the ram on a page that doesn't exist, you got a segmentation fault. In fact, now it means a memory error. The program crashed, or your ram is buggy. Eliminate the letter with memtest86, and then email the maintainer.

I would grep exp.tcl for that word highestAntennaZ_ . From there it sorts things and crashes. Google has plenty on this:

http://www.google.ie/search?q=highes...ient=firefox-a

Seems like a known problem. You may have to go at it under instruction with gdb to sort yourself
 
  


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
yast segmentation fault, system freezing - nvidia driver at fault? BaltikaTroika SUSE / openSUSE 2 12-02-2005 10:34 AM
Segmentation fault alnreddy Linux - Software 1 11-05-2005 09:54 PM
Segmentation fault with ls -l Sledge Fedora 8 03-29-2005 09:02 PM
ls segmentation fault sucho Linux - General 1 06-23-2004 07:44 PM
What is segmentation fault? koyi Programming 3 08-30-2003 01:03 AM


All times are GMT -5. The time now is 06:48 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