Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-18-2008, 04:15 AM   #1
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.nam
num_nodes is set 10
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
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
Here Agent/AODV/MYAODV 1
Loading node movement...
Loading connection pattern...
Starting Simulation...
Here - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
Segmentation fault

How to get to this error?
Old 12-20-2008, 01:14 PM   #2
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,698

Rep: Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291
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

But please read about "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, 01:38 PM   #3
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,278

Rep: Reputation: 829Reputation: 829Reputation: 829Reputation: 829Reputation: 829Reputation: 829Reputation: 829

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:

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


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 09:34 AM
Segmentation fault alnreddy Linux - Software 1 11-05-2005 08:54 PM
Segmentation fault with ls -l Sledge Fedora 8 03-29-2005 08:02 PM
ls segmentation fault sucho Linux - General 1 06-23-2004 06:44 PM
What is segmentation fault? koyi Programming 3 08-30-2003 12:03 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:51 AM.

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