LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Segmentation fault (core dumped). SORTING LISTS.... DONE! not performed in NS2 (https://www.linuxquestions.org/questions/linux-newbie-8/segmentation-fault-core-dumped-sorting-lists-done-not-performed-in-ns2-4175626763/)

dajoshi.fet 04-01-2018 03:37 AM

Segmentation fault (core dumped). SORTING LISTS.... DONE! not performed in NS2
 
I cloned AODV protocol by taking a reference to this blog.
https://surajpatilworld.blogspot.in/...ol-in-ns2.html

after completing every step, I finally ran my tcl file. I got a SEGMENTATION FAULT (CORE DUMPED).
Code:

ns try1.tcl
num_nodes is set 50
INITIALIZE THE LIST xListHead
SORTING LISTS ...DONE!
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
Segmentation fault (core dumped)

My nam is working, its just that as I run ns try1.tcl nam does not open.

AwesomeMachine 04-01-2018 09:47 PM

Try running with strace to see what's happening just prior to the seg fault. It's probably and error in the code, but you never can tell until you look into it a bit.

dajoshi.fet 04-02-2018 11:58 PM

1 Attachment(s)
Thank you for replying.
if you could help, I have attached my aodv.cc

TB0ne 04-03-2018 06:46 AM

Quote:

Originally Posted by dajoshi.fet (Post 5838716)
Thank you for replying.if you could help, I have attached my aodv.cc

And what would you like us to do with this aodv.cc file??? We're not going to download it, compile it/run it, to debug your program. This is YOUR code...if you provide the errors/strace results, we can try to help. But we aren't going to perform your troubleshooting for you.

dajoshi.fet 04-03-2018 07:37 AM

Quote:

Originally Posted by TB0ne (Post 5838788)
And what would you like us to do with this aodv.cc file??? We're not going to download it, compile it/run it, to debug your program. This is YOUR code...if you provide the errors/strace results, we can try to help. But we aren't going to perform your troubleshooting for you.

NOT AT ALL.
Sorry, but I wanted if somebody could just take a look.
and I would have posted the strace but I dont know how to do that.

TB0ne 04-03-2018 07:52 AM

Quote:

Originally Posted by dajoshi.fet (Post 5838804)
NOT AT ALL. Sorry, but I wanted if somebody could just take a look.

Take a look at what? It's source code...without downloading/compiling/running/debugging, we have NO IDEA what it is going to do. That's why you need to post the results/messages
Quote:

and I would have posted the strace but I dont know how to do that.
Probably the EXACT SAME WAY you posted the source code??? Copy/paste the messages into a CODE block here???

dajoshi.fet 04-03-2018 07:56 AM

thank you for letting me know that but I was talking about the STRACE COMMAND.
if you could tell me that, I can post EXACTLY HOW I POSTED THE CODE!!

knudfl 04-03-2018 08:10 AM

Ref. post #1.

The purpose of "TAODV" was never mentioned
https://surajpatilworld.blogspot.in/...ol-in-ns2.html
? Do you know the benefits of the code ?

The code may be buggy.
May have worked with one OS the day it was created ... years ago.

? Have you tested the "TAODV protocol" with all default AODV examples→
https://drive.google.com/file/d/1uOv...ew?usp=sharing

Note : There are lots of well tested protocols to add (150?)
https://drive.google.com/drive/folde...00?usp=sharing
... often with multiple simulation examples →
https://drive.google.com/drive/folde...Ws?usp=sharing

-

dajoshi.fet 04-04-2018 12:16 AM

Quote:

Originally Posted by knudfl (Post 5838822)
Ref. post #1.

The purpose of "TAODV" was never mentioned
https://surajpatilworld.blogspot.in/...ol-in-ns2.html
? Do you know the benefits of the code ?

The code may be buggy.
May have worked with one OS the day it was created ... years ago.

? Have you tested the "TAODV protocol" with all default AODV examples

-

When I cloned aodv, without making any changes in taodv.cc I tested my tcl and it worked. But as I made some changes in taodv.cc, it started giving me Segmentation fault.

TB0ne 04-04-2018 06:14 AM

Quote:

Originally Posted by dajoshi.fet (Post 5838813)
thank you for letting me know that but I was talking about the STRACE COMMAND. if you could tell me that, I can post EXACTLY HOW I POSTED THE CODE!!

Seriously? Did you capture the strace output to a file?? And since you attached a file before, that says you know how to attach ANOTHER FILE doesn't it??? Or how about copy/pasting the strace info directly into the post box, and putting CODE tags around it?? You have no problem posting code you want us to download, or posting follow-up messages saying you don't know how to do this (??), but can't post anything else that provides details???? Seems odd.
Quote:

Originally Posted by dajoshi.fet
When I cloned aodv, without making any changes in taodv.cc I tested my tcl and it worked. But as I made some changes in taodv.cc, it started giving me Segmentation fault.

So the problem is obviously in what YOU CHANGED, isn't it? Again, you have posted none of the debugging output, told us any of the errors/messages, just "segmentation fault". What exactly do you think we're going to be able to tell you with no information at all?

dajoshi.fet 04-05-2018 08:02 AM

Quote:

Originally Posted by TB0ne (Post 5839212)
Seriously? Did you capture the strace output to a file??

Sir,
i am new to ubuntu and ns, therefore, I don't know how to proceed with capturing the strace.
please tell me how it is done and ill provide you the .txt

i am working on ubuntu 14.04 and ns-2.34.

i really need help in this, else i would fail my semester.

knudfl 04-05-2018 08:08 AM

Please answer to the questions in post #8.

? What is the purpose of TAODV ?
? Have you tested the "TAODV protocol" with all default AODV examples https://drive.google.com/file/d/1uOv...ew?usp=sharing


-

dajoshi.fet 04-05-2018 08:14 AM

Quote:

Originally Posted by knudfl (Post 5839645)
Please answer to the questions in post #8.

? What is the purpose of TAODV ?
? Have you tested the "TAODV protocol" with all default AODV examples https://drive.google.com/file/d/1uOv...ew?usp=sharing


-

yes, i have tested it. the tcls work with aodv but not with TAODV.
In my project i am trying to compare TAODV AODV on the bases of energy, throughput, delay and drop. the aim is to minimize on these redundant RREQ packets, or alternatively, drop as much as possible of these redundant RREQ packets by using randomization.

TB0ne 04-05-2018 08:36 AM

Quote:

Originally Posted by dajoshi.fet (Post 5839641)
Sir,
i am new to ubuntu and ns, therefore, I don't know how to proceed with capturing the strace. please tell me how it is done and ill provide you the .txt i am working on ubuntu 14.04 and ns-2.34.

Sorry, either you're purposely ignoring what was said, or just aren't going to do it. I specifically said "you can copy/paste that output into a post". Do you not understand how to do that??? CTRL-C/CTRL-V? Select with mouse, right-click and say "Copy"??? Put it in a CODE block here.

Run strace followed by the > and it will go into whatever filename you type AFTER the >. Attach it. Simple, although the copy/paste is VERY obvious, and ignored at least twice now.
Quote:

i really need help in this, else i would fail my semester.
Then if you can't follow simple instructions, do your own work or your own research, then perhaps you need to fail. Sorry, but if you don't know the subject and can't accomplish the work, you don't deserve to pass. Are you not capable of asking your teacher for help? Classmates? Doing a simple Google search for "how to capture strace output into a file"???

If you can't/won't do such things, there is little anyone can to do help you.

knudfl 04-05-2018 08:37 AM

Looks like you are working with LEACH too ?
→ #34 https://www.linuxquestions.org/quest...095/page3.html

Do not expect TAODV to be usable in an ns-2.34 with LEACH.



-


All times are GMT -5. The time now is 01:12 PM.