LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-11-2014, 03:37 PM   #1
faysal
LQ Newbie
 
Registered: Oct 2014
Posts: 2

Rep: Reputation: Disabled
Segmentation fault (core dump) in Ubuntu 14.04 ( x86_64)


Hi
i have installed ns2.35 in ubuntu14.04,
i hav successfully run tcl script,and it generates out.nam .
#Create a simulator object
set ns [new Simulator]

#Open the nam trace file
set nf [open out.nam w]
$ns namtrace-all $nf

#Define a 'finish' procedure
proc finish {} {
global ns nf
$ns flush-trace
#Close the trace file
close $nf
#Execute nam on the trace file
exec nam out.nam &
exit 0
}


# Insert your own code for topology creation
# and agent definitions, etc. here


#Call the finish procedure after 5 seconds simulation time
$ns at 5.0 "finish"

#Run the simulation
$ns run

bt when i've tried to execute out.nam command, it gave me " Segmentation fault (core dump)" .

this are some few lines that i have added in the .bashrc file:

export PATH=$PATH:/home/faysal/Desktop/ns-allinone-2.35/bin:/home/faysal/Desktop/ns-allinone-2.35/tcl8.5.10/unix:/home/faysal/Desktop/ns-allinone-2.35/tk8.5.10/unix
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/faysal/Desktop/ns-allinone-2.35/otcl-1.14:/home/faysal/Desktop/ns-allinone-2.35/lib
TCL_LIBRARY=$TCL_LIBRARY:/home/faysal/Desktop/ns-allinone-2.35/tcl8.5.10/library

export TCL_LIBRARY

When i run command ulimit -a . This is the output :


core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 14703
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 14703
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
 
Old 10-11-2014, 04:12 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

Delete the nam-1.15/ folder in ns-allinone-2.35/.
* I.e. the nam you can build from ns-allinone-2.xx/nam*/ often fails.
And the Ubuntu nam packages have been poor for some time.


Quote:
this are some few lines that i have added in the .bashrc file
No entries are required to .bashrc, when it is your computer.
The old 1999 text is about using the University Computer.
This will do : $ cd ns-allinone-2.35/ns-2.35/ && sudo make install

Ubuntu 14.04 ( x86_64) : ns2 prefers a 32bits OS.
However, the most protocols will also work with a 64bits OS.


A nam that works on your 64bits OS : nam_1.15-10-ubuntu14_amd64.deb
Download from https://drive.google.com/file/d/0B7S...ew?usp=sharing
→ → Click the package, when downloaded,
and your 'Package Installer' will install it.


-

Last edited by knudfl; 10-11-2014 at 04:17 PM.
 
1 members found this post helpful.
Old 10-11-2014, 04:19 PM   #3
faysal
LQ Newbie
 
Registered: Oct 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thnx For your help
 
Old 01-14-2016, 11:13 PM   #4
geethuthulasidas
LQ Newbie
 
Registered: Oct 2013
Posts: 6
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Welcome to LQ.

Delete the nam-1.15/ folder in ns-allinone-2.35/.
* I.e. the nam you can build from ns-allinone-2.xx/nam*/ often fails.
And the Ubuntu nam packages have been poor for some time.



No entries are required to .bashrc, when it is your computer.
The old 1999 text is about using the University Computer.
This will do : $ cd ns-allinone-2.35/ns-2.35/ && sudo make install

Ubuntu 14.04 ( x86_64) : ns2 prefers a 32bits OS.
However, the most protocols will also work with a 64bits OS.


A nam that works on your 64bits OS : nam_1.15-10-ubuntu14_amd64.deb
Download from https://drive.google.com/file/d/0B7S...ew?usp=sharing
→ → Click the package, when downloaded,
and your 'Package Installer' will install it.


-
I had the same problem of segmentation fault while running nam. mine is 64 bit.ubuntu is 14.04. i downloaded the nam_1.15-10-ubuntu14_amd64.deb as said in the post. but now it is showing "bash: /usr/bin/nam: No such file or directory
"...can anyone help
 
Old 01-15-2016, 11:44 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #4.
Quote:
i downloaded the nam_1.15-10-ubuntu14_amd64.deb
See #2 : Click the package, when downloaded,
and your 'Package Installer' will install it.

Then please try :
1) $ which nam
2) $ file /usr/local/bin/nam ( There should be no /usr/bin/nam ).
3) $ uname -m


-
 
1 members found this post helpful.
  


Reply

Tags
ns2



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
[SOLVED] Segmentation fault (core dump) vikrant2k14 Linux - Newbie 17 02-04-2015 05:25 AM
segmentation fault (core dump) bhatia.ankur8 Linux - General 1 07-06-2010 04:58 AM
segmentation fault core dump shaiva Linux - Newbie 1 09-23-2009 11:04 AM
how to force a core-dump...segmentation fault johnpaulodonnell Programming 2 10-23-2008 06:05 AM
php core dump with segmentation fault ohcarol *BSD 9 10-14-2008 09:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:57 AM.

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