[ns] segmentation fault (core dumped)
I did some changes in the LAR protocol and suppose the new protocol is named as ABC . When i am doing make clean and then make. object file "ABC.o" was successfully created. Then i tried to run tcl file , nothing has been written in the trace file and it gave me the following error 21052015$ ns234 new.tcl scen1 setting other default settings... removing unecessary packet headers... num_nodes is set 100 INITIALIZE THE LIST xListHead loading mobility file loading traffic file Starting Simulation... Segmentation fault (core dumped) I tried a lot but unable to find out where is the error. I am unable to find out where is the error . in .cc file or in .tcl file. could someone please help me. My work has been stucked and i searched a lot but didn't get anything. please please .. help me . Any hints -- how to proceed further ... thanks a lot
Re: [ns] Segmentation fault (core dumped) error with NAM command in GPSR Keliu wireless-gpsr.tcl example
Hi . I guess the "GPSR-KeLiu" protocol isn't really supporting nam ? There is a text file "TextFile-modify-wireless-gpsr" about nam in the examples. But I don't remember that anybody ever succeeded with a GPSR-KeLiu nam file. Latest examples : GPSR-KeLiu-examples_01.2015.tar.gz https://drive.google.com/file/d/0B7S255p3kFXNR3J6b3hxX19TTnM/view?usp=sharing - On Sunday, May 17, 2015 at 1:14:17 AM UTC+2, mima Amira wrote: > > Hi > > > please, i get an error Segmentation fault (core dumped) error with NAM > command in GPSR Keliu wireless-gpsr.tcl example > > > my OS is ubuntu 32bit, NS2.35 and I succfully patched GPSR keliu > > my problem in when I put nam nam-out.nam the nam window is open but when > I run it I get this error and the nam window is closed > > > thanks in advance > > > > >
[ns] Segmentation fault (core dumped) error with NAM command in GPSR Keliu wireless-gpsr.tcl example
Hi please, i get an error Segmentation fault (core dumped) error with NAM command in GPSR Keliu wireless-gpsr.tcl example my OS is ubuntu 32bit, NS2.35 and I succfully patched GPSR keliu my problem in when I put nam nam-out.nam the nam window is open but when I run it I get this error and the nam window is closed thanks in advance
[ns] " segmentation fault " when run a .tcl script in NS2
hi. i have one important problem: when i run any .tcl script by ns2, i got "segmentation fault (core dumped)" error, even simple program! i reinstalled NS2, ./configure it, make clean and make it... but this error has not fixed. how can i fix it? help pls thanks
[ns] Segmentation fault when trying to access some information from the AODV routing agent in UDP
Hello ns users, I would like to access some information from the routing agent AODV in UDP protocol so what I did is that I create a pointer from AODV called “myaodv” in aodv.h but I need to allocate the AODV class before using it so what I did as the following in the command function : else if(argc == 3) { if (strcmp(argv[1], "add-aodv") == 0) { myaodv = (AODV*) TclObject::lookup(argv[2]); if(myaodv == 0) return TCL_ERROR; return TCL_OK; }//end of if }//end of else if argc == 3 So in order to access the value from aodv, I write : myaodv-> totaldrop; // This is as an example to simplify Now I need to do some calculation, however, when I try to assign the above value to another variable I got segmentation fault! What I have realized after searching that I need to add some code in the tcl script for aodv initialization in order to call the above AODV allocation but I don’t know what I should add. I mean when I want to exchange information between the mac layer and routing layer I should add the following in the tcl script: set rt ($i) [$ node_ ($ i) agent 255] $rt ($i) add-mac [$ node_ ($ i) set mac_ (0)] So what is the aodv objects that I should use instead of the above two lines to establish the access path between the udp and the aodv, Can anyone help me to solve this issue please? Any other ideas or suggestions will be appreciated. Note: I am trying to have a cross layer between the udp and AODV routing agent. Thanks for ur help in advance.
[ns] Segmentation fault error
Dear ns- users Please help me, I get a segmentation fault error when I calculate end to end delay for DSR protocol. This does not happen if I simulate for a short time like 100 seconds, but If I increase simulation time to say 500 seconds, I get the error. Regards, -- Lineo Mejaele
[ns] segmentation fault error
Hi All I am using NS2.34. And am working with MANET security. can any body tell me the reason for getting segmentation fault while running our program. but am getting my output screens. is there any missing outputs due to this?? plz let me know the people who knows the reason. thank yu... -- *--- prabha*
[ns] Segmentation Fault Core Dump
Hi, I'm just getting to learn ns-2 and running a basic test. My TCL file works if $num_row is e.g. 10 (10*10 grid and 100 nodes) but if I set it to 2 or 5 I get segmentation fault after around one or two minutes of the code running. Attached is the TCL and the TR file. I do appreciate it. Any thoughts? Thanks, Mor
Re: [ns] Segmentation fault problem
I think you should install gdb debugger. It can show you complete trace of the possible effective place. Wherever I have any segmentation fault I like to use debugger ($gdb ns; run test.tcl )that give you an option of $bt, so that you can see at which point in execution this error occurs. It makes easier for the programmer to rectify the problem. From: HiepTran To: ns-users@isi.edu Cc: itishi saxena ; mairagae...@hotmail.com Sent: Saturday, 2 March 2013 4:09 PM Subject: Re: [ns] Segmentation fault problem Hi Itishi, I also got this error when running "ns simple-mipv6.tcl" after I run the patch ns-233-mobiwan-1.patch successfully. I also modified the some default paths to explicit paths. I'm using Ubuntu 10.04LTS, and ns-2.33 Pls share with me your experience on this ? Hiep Tran Mobile : +84983 959 104 Skype: tran_phuoc_hiep E-mail : hiepd...@gmail.com On 03/02/2013 05:17 AM, itishi saxena wrote: Hello Mai, Segmentation fault occurs due to missing memory block. You try to trace from all those changes you made. Possibility is you are pointing to something which is not existing at the time of execution. From: mai ragaei mailto:mairagae...@hotmail.com To: ns-users@ISI.EDU Sent: Friday, 1 March 2013 11:08 AM Subject: [ns] Segmentation fault problem Hi, I used ns2.34 with nsmiracle , I modified code in nsmiracle and when I run an example, it produce an error : segmentation fault Please can any one tell me the reason to produce segmentation fault ? And how can I solve it ? Best regards Mai Ragaei
Re: [ns] Segmentation fault problem
Hello Mai, Segmentation fault occurs due to missing memory block. You try to trace from all those changes you made. Possibility is you are pointing to something which is not existing at the time of execution. From: mai ragaei To: ns-users@ISI.EDU Sent: Friday, 1 March 2013 11:08 AM Subject: [ns] Segmentation fault problem Hi, I used ns2.34 with nsmiracle , I modified code in nsmiracle and when I run an example, it produce an error : segmentation fault Please can any one tell me the reason to produce segmentation fault ? And how can I solve it ? Best regards Mai Ragaei
[ns] Segmentation fault problem
Hi, I used ns2.34 with nsmiracle , I modified code in nsmiracle and when I run an example, it produce an error : segmentation fault Please can any one tell me the reason to produce segmentation fault ? And how can I solve it ? Best regards Mai Ragaei
[ns] Segmentation fault (core dumped) ns2 crcn under differenet protocols
While compiling crcn tcl script the following error exisits Segmentation fault (core dumped) Consequences: Trace file is not completed which leads to incomplete nam file. Simulation time 50 sec and traffic connections end at 45 sec while trace file stopped at 0.003 sec. Changing routing and or mac protocols the stopping time and segmentation error still exists But using DSR with Macng protocols it worked good error free. Please provide me with solution to this problem. Sincerely,Khaled Elmishad Senior Student, Communication Engineering ASU-CHEP
[ns] Segmentation fault (core dumped) problem in ns2 crcn tcl script
While compiling crcn tcl script the following error exisits Segmentation fault (core dumped) Consequences: Trace file is not completed which leads to incomplete nam file. Simulation time 50 sec and traffic connections end at 45 sec while trace file stopped at 0.003 sec. I tried to change AODV to DSR where it stopped at 7 sec. Please provide me with solution to this. Sincerely,Khaled Elmishad Senior Student, Communication Engineering ASU-CHEP
[ns] segmentation fault when increase number of nodes
Hello, I've change code in c++,everything is run normal but when i increase number of nodes,it state "segmentation fault".Can anyone tell me what is the cause of this error? Kindly Regards, chalida
[ns] Segmentation Fault
Hi Dear friends I've run this code in Ns-2 and I changed its routing protocol such as "AODV", "DSDV" "AOMDV" and "DSR" . But in DSR protocol the code didn't run and made an error "Segmentation Fault" Would you please help me? Best,
Re: [ns] Segmentation Fault : A simple DSR program was running with one source & destination, but with two sources & same destination node it gives out the error.
Hi Chandrabhan, Usually Segmentation fault in DSR routing protocol occur due to using wrong interface queue. In your code just check the "ifq" section. Make sure your ifq is set to "*CMUPriQueue*" for DSR routing protocol and not "*Queue/DropTail/PriQueue*" On Mon, Nov 14, 2011 at 11:42 AM, Chandrabhan Pradhan < chandrabhanprad...@gmail.com> wrote: > > > Hi NS Buddies, > > I have a simple DSR analysis program with One source and one > destination node. It was working fine, producing graphs for Packet Loss, > Throughput and delay. > Now I am increasing the source node (2 now), so I just generated new Agent > (UDP), new CBR traffic source and attached it to new source node. > > But it gives out me the error segmentation fault. please help. > Sorry I forgot to attach my source code so again sending the same mail with > the same. > > -- > -- > Thanx & Regards > > Chandrabhan Pradhan > MTech > OPJIT, Raigarh > 9993559009 > <#@NDR@B#@N > > -- Thanks, Ankur +91-8975125485
[ns] Segmentation Fault : A simple DSR program was running with one source & destination, but with two sources & same destination node it gives out the error.
Hi NS Buddies, I have a simple DSR analysis program with One source and one destination node. It was working fine, producing graphs for Packet Loss, Throughput and delay. Now I am increasing the source node (2 now), so I just generated new Agent (UDP), new CBR traffic source and attached it to new source node. But it gives out me the error segmentation fault. please help. Sorry I forgot to attach my source code so again sending the same mail with the same. -- -- Thanx & Regards Chandrabhan Pradhan MTech OPJIT, Raigarh 9993559009 <#@NDR@B#@N
[ns] Segmentation Fault : A simple DSR program was running with one source & destination, but with two sources & same destination node it gives out the error.
Hi NS Buddiez, I have a simple DSR analysis program with One source and one destination node. It was working fine, producing graphs for Packet Loss, Throughput and delay. Now I am increasing the source node (2 now), so I just generated new Agent (UDP), new CBR traffic source and attached it to new source node. But it gives out me the error segmentation fault. please help -- -- Thanx & Regards Chandrabhan Pradhan Asst. Prof. OPJIT, Raigarh 9993559009 <#@NDR@B#@N
[ns] segmentation fault
hi to all there was error during compilation like *segmentation fault* what to do please help me out. thanks with regard manish
[ns] Segmentation Fault !
Hi friends. I was going to change "aodv.h" and "aodv.cc" for getting node position & energy. +++ aodv.h changes : #include . . . double xpos; double ypos; double zpos; double iEnergy; MobileNode *iNode; . . +++ aodv.cc changes : . . xpos=0.0; ypos=0.0; zpos=0.0; MobileNode *iNode; iEnergy=0.0; . . . iNode = (MobileNode *) (Node::get_node_by_address(index)); xpos = iNode->X(); ypos = iNode->Y(); iEnergy = iNode->energy_model()->energy(); printf("at time (%.6f), Position of %d is X: %.4f and Y : %.4f \n",CURRENT_TIME,index,xpos,ypos); printf("at time (%.6f), Updated Enery for Node %d is Energy %.4f \n",CURRENT_TIME,index,iEnergy); . . ++ tcl file changes : . . set val(rp) AODV set val(energymodel) EnergyModel set val(initialenergy) 100 . . $nets node-config -adhocRouting $val(rp) ... -energyModel $val(energymodel) \ -initialEnergy $val(initialenergy) \ -rxPower 35.28e-3 \ -txPower 31.32e-3 \ -idlePower 712e-6 \ -sleepower 144e-9 \ ... After these changes, I run "make clean" and "make". Then I executed tcl file, But I saw this message : Segmentation Fault. What is that ??? I was so confuse. is any idea about that ?
Re: [ns] Segmentation fault
Hi Zeinab, Segmentation faults are usually due errors in the Code you've implemented in the C++ domain. They are mainly caused by wrong pointers, when you try to access some memory location which has been freed. That's just one scenario. There you have to debug the C++ code it on your own, step by step. Sometimes they are also due to wrongly implemented connections (taking into perspective the agents attached to the nodes) in your tcl code. For example, if you attach an forwarding agent to a sink and expect it, without any modifications, to send packets downstream, you'll most probably get a segmentation fault. Check out this link: http://www.ns2ultimate.com/post/567918455/segmentation-fault-a-common-error-in-ns2 Kind regards, Nicholas Mbonimpa On Wed, Aug 10, 2011 at 11:42 AM, Zeinab Rezaiefar wrote: > > hi friend > when i run tcl file i get this error Segmentation fault > any one know why this error happen? i change aodv protocol and after run > tcl that its routing is aodv i get this error. > any help will be appreciate. > best regard >
[ns] Segmentation fault
hi friend when i run tcl file i get this error Segmentation fault any one know why this error happen? i change aodv protocol and after run tcl that its routing is aodv i get this error. any help will be appreciate. best regard
[ns] segmentation fault core dumped in ns2-2.27 when I revise the variable of next hop
hi,everyone today I revise a little in one routing protocol, before I revised ,the source code linkes follow: ch->next_hop_ = -1; //Broadcast address which means next hop is broadcast address,I want to indicate the next hop,for example,the topology likes this node 0 -> node 1 —> node 2 ,so node 0's next hop is node 1 so I revise the code linkes this if(index_==0) ch->next_hop_ = 1 else (index_==1) ch->nedxt_hop_=2 I do this in order to fix the next hop,however,I recompile the ns2,everything goes ok, but I use the same script to do the experimental, the screen display : segementation fault (core dumped) I check related website,and get the information that I may visit the memory I did not declared, I think may be I use the node address as the ip address! could any body tell me why ? so Urgent! Varrick
[ns] Segmentation fault error..
Hi I am doing some project in Ns2.. I have attached ma project files below.. When i run the program it gives segmentation fault.. It is supposed to be run for 100s.. If any changes are to be done please inform me.. Thanx in advance. Urgent...
[ns] Segmentation fault in Aodv
Hi All I add something extra in my aodv.cc file like this void AODV::rt_update(aodv_rt_entry *rt, u_int32_t seqnum, u_int16_t metric, nsaddr_t nexthop, double expire_time) { AODV_Neighbor *nb = nb_lookup(nexthop); rt->rt_seqno = seqnum; rt->rt_hops = metric; rt->rt_flags = RTF_UP; rt->rt_nexthop = nexthop; rt->rt_expire = expire_time; // Add Extra rt->rt_CITwo = nb->ci_two; } when I command make and then run the tcl file like this "ns 20node.tcl" I got warning that is "segmentation fault". How can I fix this error? Thank you
Re: [ns] Segmentation fault (core dumped)
debug it with eclipse. http://wcms1.rz.tu-ilmenau.de/fakia/NS2-for-Eclipse.6025.0.html or http://hi.baidu.com/karashun/blog/item/cc4038d0f47db2359a50276d.html On Mon, May 2, 2011 at 12:02 AM, fauzan prasetyo eka putra wrote: > > Hi, my friend > my Tcl code for a NS-2 simulation link error model when i run TCL file i get > > > $ns script-olsr.tcl > Segmentation fault (core dumped) > > > > Please advice.what i must to do.. > > > Regards > > n0mad > >
[ns] Segmentation fault (core dumped)
Hi, my friend my Tcl code for a NS-2 simulation link error model when i run TCL file i get $ns script-olsr.tcl Segmentation fault (core dumped) Please advice.what i must to do.. Regards n0mad
[ns] Segmentation fault
Hi all: When I debug ns2 ,I receive follow result: Program received signal SIGSEGV, Segmentation fault. 0x081c6446 in DestHashClassifier::hashkey (this=0xa2f7330, dst=4)at classifier/classifier-hash.h:180 180 long key = mshift(dst); (gdb) i locals key = Cannot access memory at address 0xbf43affc (gdb) l 175 virtual int command(int argc, const char*const* argv); 176 int classify(Packet *p); 177 virtual void do_install(char *dst, NsObject *target); 178 protected: 179 const char* hashkey(nsaddr_t, nsaddr_t dst, int) { 180 long key = mshift(dst); 181 return (const char*) key; 182 } 183 }; 184 (gdb) p key Cannot access memory at address 0xbf43affc (gdb) p dst $1 = 4 (gdb) p shift_ $2 = 0 (gdb) p mask_ $3 = 2147483647 (gdb) p key Cannot access memory at address 0xbf43affc (gdb) p &key $4 = (long int *) 0xbf43affc (gdb) Ps: inline int mshift(int val) { return ((val >> shift_) & mask_); } I want to ask why can't I access the local variable key? How can I locate the plalce where error happened? Thanks! Balbo.
[ns] Segmentation Fault
I have installed Video Traffic generator (TES) on my ubuntu operating system with NS2-2.31 ,I have downloaded it from Contributed codes in NS2 web site . When I compile a simple tcl file which use video traffic generator ,I receive Segmentation fault (core dumped) error please help me
[ns] Segmentation Fault
I have installed Video Traffic generator (TES) on my ubuntu operating system with NS2-2.31 ,I have downloaded it from Contributed codes in NS2 web site . When I compile a simple tcl file which use video traffic generator ,I receive Segmentation fault (core dumped) error please help me
[ns] Segmentation fault AODV setting CSThreshold in ns2-34
Hi to all In my ns2-34 if i reduce CSThrehs_ and RXThres_ to reduce my mobile node range i obtain a Seg fault using AODV protocol. Anyone have this problem? Can Anyone tell me the exact line of code where this seg fault occur? i have difficult to attach source code to debug process with eclipse Thanks
Re: [ns] segmentation fault with dsr
hi, Solution: In yr tcl script, include the following: if { $val(rp) == “DSR” } { set val(ifq)CMUPriQueue } else { set val(ifq)Queue/DropTail/PriQueue } http://cromagnonlife.wordpress.com/2010/08/08/solution-ns2-segmentation-fault-core-dumped-when-using-dsr/ sriram balakrishnan wrote: > > > i tried to simulate the wireless1.tcl file given in marcs tutorial and ran > it for 50 nodes and 20 connections but when the protocol is set to dsr it > gives segmentation fault any idea why > > -- > B Sriram > Wing Commander > mob : 09733706981 > > -- View this message in context: http://old.nabble.com/segmentation-fault-with-dsr-tp19852112p29375655.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Segmentation fault
Hi all, i m trying to add a new header in the common header of packets in order to use it in QOS. i want to set the value of the new field by the command eval \$udp($src) set priority_ 1 the name of the field that i want to add is Priority First, i added a field in packet.h i added intpriority_;// priority packet inline int& priority() { return (priority_); } - then i added in udp.cc UdpAgent::UdpAgent() : Agent(PT_UDP), seqno_(-1) { bind("packetSize_", &size_); bind("priority_", &priority_); } UdpAgent::UdpAgent(packet_t type) : Agent(type) { bind("packetSize_", &size_); bind("priority_", &priority_); } - and //modification du champ priorite hdr_cmn::access(p)->priority() = priority_; fin in order to access to the field and modify it. this doesn t work and i got segmentation error can anyone help me please
Re: [ns] segmentation fault with wrls-drs.tcl example
Hi pedro chaparro, DSR gives "segfault" error if interface queue type used is other than CMUPriQueue. Make sure that you are using this in your tcl script. set val(ifq)CMUPriQueue;# interface queue type Good luck.
[ns] segmentation fault with wrls-drs.tcl example
hi everyone , i getting this error, but i dont understant why . Coul be realted to have few space (150MBytes) on Disk? r...@hobbes:/home/pdro7/Desktop/ns-allinone-2.34/ns-2.34# ./ns wrls-dsr.tcl num_nodes is set 3 warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl INITIALIZE THE LIST xListHead channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 SORTING LISTS ...DONE! *Segmentation fault * -- Pedro Alonso Chaparro Valero R&D Engineer Ciudad Politecnica de la Innovación iTEAM - Mobile Communications Group Polytechnic University of Valencia C\ Camino de Vera S/N, Edificio 8G 46022 Valencia, Spain
Re: [ns] [Segmentation fault] Where are "prim_alt_path_len_diff_ and max_paths_"
Dear Mubashir Rehmani and all, Thanks a lot, it seems that I should modify ~/ns-allinone-2.34/ns-2.34/tcl/lib/ns-agent.tcl line 202 by adding Agent/WFRP instproc init args { $self next $args } Agent/WFRP set sport_ 0 Agent/WFRP set dport_ 0 Kindly check these links http://elmurod.net/wps/?p=157 http://www-rp.lip6.fr/ns-doc/ns226-doc/html/annotated.htm Thanks all and May Allah be with us Mariam:-) Mariam Elansary wrote: > > > Al Salamo Alikom, > Dears, > > My Environment: Ubuntu 9.10 and NS-2.34 > > While I am building my new routing protocol for WSN, I decide to start > with > AOMDV protocol. > > I copy the folder and rename it and all its files. > and follow all steps in "Implementing a New Manet Unicast Routing Protocol > in NS2, Francisco J. Ros & Pedro M. Ruiz" > make clean and make run with any error. > > when I start to run a tcl file using my protocol, I get this error: > > *mar...@ubuntu:~/NS2_Work/Example$ ns mrr.tcl* > *num_nodes is set 16* > *warning: no class variable Agent/MRR::mrr_max_paths_* > * > * > * **see tcl-object.tcl in tclcl for info about this warning.* > * > * > *warning: no class variable Agent/MRR::mrr_prim_alt_path_len_diff_* > * > * > *INITIALIZE THE LIST xListHead* > *.* > *.* > *.* > *warning: no class variable Agent/MRR::mrr_prim_alt_path_len_diff_* > * > * > *10 simulation seconds* > *20 simulation seconds* > *30 simulation seconds* > *40 simulation seconds* > *50 simulation seconds* > *60 simulation seconds* > *70 simulation seconds* > *80 simulation seconds* > *90 simulation seconds* > *.* > *.* > *.* > *990 simulation seconds* > *1000 simulation seconds* > *channel.cc:sendUp - Calc highestAntennaZ_ and distCST_* > *highestAntennaZ_ = 1.5, distCST_ = > 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0 > * > *SORTING LISTS ...DONE!* > *Segmentation fault* > > > Thanks in advance > Mariam > > -- > Best regards, > > Mariam Ahmed Moustafa > > Software Engineer, R&D Department > > Integrated Solutions For Ports > > Tel: +(203) 4293846/4294632 Extn: 207 > > Email: mka...@isfpegypt.com > > Web Site: www.isfpegypt.com > > -- View this message in context: http://old.nabble.com/-Segmentation-fault--Where-are-%22prim_alt_path_len_diff_-and-max_paths_%22-tp29004982p29005078.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] [Segmentation fault] Where are "prim_alt_path_len_diff_ and max_paths_"
Al Salamo Alikom, Dears, My Environment: Ubuntu 9.10 and NS-2.34 While I am building my new routing protocol for WSN, I decide to start with AOMDV protocol. I copy the folder and rename it and all its files. and follow all steps in "Implementing a New Manet Unicast Routing Protocol in NS2, Francisco J. Ros & Pedro M. Ruiz" make clean and make run with any error. when I start to run a tcl file using my protocol, I get this error: *mar...@ubuntu:~/NS2_Work/Example$ ns mrr.tcl* *num_nodes is set 16* *warning: no class variable Agent/MRR::mrr_max_paths_* * * * **see tcl-object.tcl in tclcl for info about this warning.* * * *warning: no class variable Agent/MRR::mrr_prim_alt_path_len_diff_* * * *INITIALIZE THE LIST xListHead* *.* *.* *.* *warning: no class variable Agent/MRR::mrr_prim_alt_path_len_diff_* * * *10 simulation seconds* *20 simulation seconds* *30 simulation seconds* *40 simulation seconds* *50 simulation seconds* *60 simulation seconds* *70 simulation seconds* *80 simulation seconds* *90 simulation seconds* *.* *.* *.* *990 simulation seconds* *1000 simulation seconds* *channel.cc:sendUp - Calc highestAntennaZ_ and distCST_* *highestAntennaZ_ = 1.5, distCST_ = 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0 * *SORTING LISTS ...DONE!* *Segmentation fault* Thanks in advance Mariam -- Best regards, Mariam Ahmed Moustafa Software Engineer, R&D Department Integrated Solutions For Ports Tel: +(203) 4293846/4294632 Extn: 207 Email: mka...@isfpegypt.com Web Site: www.isfpegypt.com
[ns] "Segmentation Fault" Error
Hi all, I have made some changes in a protocol's code and it has compiled successfully also. When I run the simulation I get the error "segmentation fault". I have been stuck on this error for last two days almost and tried many ways to remove it. Please help me out Best Regards Aamir Khan _ Hotmail: Powerful Free email with security by Microsoft. https://signup.live.com/signup.aspx?id=60969
[ns] Segmentation fault while running zrp
facing Segmentation fault when i run tcl script for zrp(2.19b) in ns2.34 anyone have a solution? thanks =) -- View this message in context: http://old.nabble.com/Segmentation-fault-while-running-zrp-tp28636923p28636923.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] segmentation fault
hi all, i am getting segmentation fault when i add these following lines of code... its code for configuring the wimax ctrl agent... $wimaxctrl add-neighbor [$bstation2 set mac_(0)] $bstation2 $wimaxctrl2 add-neighbor [$bstation set mac_(0)] $bstation can anyone explain why i am getting the segmentation fault?... plz its urgent for my project... thanks guys, manoj
Re: [ns] Segmentation Fault in LEACH
Hello everyone, I am trying to implement Leach on NS-2.29 using mannasim (on a Fedora machine ) and for quite a long time i am stuck with this problem. The following error occures while running leach on Mannasim. <-> [r...@localhost bin]# ./ns leach.tcl Initializing MannaSim Script... Setting up mica 2 mote with Antenna/OmniAntenna and range = 100 Nodes count: - 1 access points - 10 common nodes - 0 cluster heads - 11 nodes - DumbAgent routing protocol - LL link layer - Phy/WirelessPhy network interface Scenario size: 100.0 x 100.0 Using trace.tr as trace file num_nodes is set 11 Creating an access point... Setting up mica 2 mote with Antenna/OmniAntenna and range = 100 Using mica 2 mote settings Setting up mica 2 mote with Antenna/OmniAntenna and range = 100 warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl INITIALIZE THE LIST xListHead * Access point 0 = 0 created in (43.509210899243698, 34.247529848593999, 0.0) Creating common node... Setting up mica 2 mote with Antenna/OmniAntenna and range = 100 Using mica 2 mote settings Setting up mica 2 mote with Antenna/OmniAntenna and range = 100 Setting disseminating type to programmed Setting disseminating interval: 20.0 * Node 1 = 1 created in (91.818819237788588, 58.541928026146216, 0.0) NO CLUSTER HEADS HAS BEEN DEFINED! Assuming 20% of common nodes. * Node 2 = 2 created in (49.756124825103264, 65.884154646603463, 0.0) * Node 3 = 3 created in (70.132374749580578, 15.679780308008093, 0.0) * Node 4 = 4 created in (85.40044733574635, 38.361567695793497, 0.0) * Node 5 = 5 created in (80.309079112628979, 58.697910308231563, 0.0) * Node 6 = 6 created in (97.07222320003072, 66.915544060485217, 0.0) * Node 7 = 7 created in (20.387572013022179, 87.62193810549654, 0.0) * Node 8 = 8 created in (93.201789163612659, 22.833003859423567, 0.0) * Node 9 = 9 created in (49.502869578778217, 51.503630704946644, 0.0) * Node 10 = 10 created in (4.5511585215810495, 9.5448948021721538, 0.0) Starting Simulation... Segmentation fault <-> Kindly,let me know what the solution might be. Regards Aakash
Re: [ns] Segmentation Fault while Modifying AODV
Hi Rasheed, Segmentation fault is usually due to memory access violation. A common example is as follows. int x[10]; x[20] = 0; where you create an array x with 10 slots, but try to access 20th slot of x. Hope this will help. Best Regards, Teerawat Issariyakul http://www.ns2ultimate.com/ http://www.facebook.com/pages/Teerawat-Issariyakul/358240861417 http://twitter.com/T_Bear http://www.t-issariyakul.blogspot.com http://www.ece.ubc.ca/~teerawat On 4/12/2010, "Èļ¼ÀÎ ¶ó½¬µå[RASHEED HUSSAIN] rasheed1...@gmail.com" <=?EUC-KR?B?yMS8vMDOICC2872steVbUkFTSEVFRCBIVVNTQUlOXQ==?= rasheed1...@gmail.com> wrote: > >Dear NS2 Users >I am facing a very serious problem regarding modification to AODV protocol. >I have customized AODV Protocol to work as VANET Beaconing Protocol >according to DSRC Standard. >I also having implemented the duplicity mechansim where each node on >receiving a beacon, stores it for certain time to check for duplicity, >because i want the beacons to travel for multihops. >i have divided the road into regions and there is a linked list for every >region which stores the hashes of certain values taken from every beacon. >i have implemented all this, and when i run my tcl script, it gives >segmentation fault. > >basically i get the segmentation fault after adding the following code (This >whole code is included in aodv.cc and aodv is no more a routing protocol. it >is just a VANET Beaconing protocol now which i optimized for my >simulations). > >aodv/aodv.cc >recev_beacon() >{ >... >... >. >receive the beacon and calculate the hash from some values >// Now Save the Beacons > > if (xx<=x && x<(xx+200)) > { > bool flag=obj.search(hash2); > if (flag==TRUE) > { > cout<<"Already exists in the linked list"< } > else > { > obj.add(hash2, 1); > //ofstream list1;//for saving hash values > //list1.open("linkedlist1.dat", ios::app); > //list1< } >} // end of if > else if (x>=xx && (xx<=x && x<(xx+400))) > { > obj.add(hash2, 2); >ofstream list2;//for saving hash values > list2.open("linkedlist2.dat", ios::app); > list2< } > else if (x>=xx && (xx<=x && x<(xx+600))) > { > obj.add(hash2, 3); > } > else if (x>=xx && (xx<=x && x<(xx+1000))) > { > obj.add(hash2, 4); > } > >the linked list implemented is given below >// >// Defining Linked Lists >// >struct list1{ >unsigned int bid;list1 *link; >}; > >struct list2{ >unsigned int bid;list2 *link; >}; > > >struct list3{ >unsigned int bid;list3 *link; >}; > >struct list4{ >unsigned int bid;list4 *link; >}; > >class list{ >private: >int i; > list1 *cur1,*temp1,*start1; > list2 *cur2,*temp2,*start2; > list3 *cur3,*temp3,*start3; > list4 *cur4,*temp4,*start4; > >public: > >list() >{ >start1=NULL; >start2=NULL; >start3=NULL; >start4=NULL; >} > >void add(unsigned int hashval, int listno) >{ >//cout<<"Enter the list number to add element to";cin>>i; >// check for list no. > if (listno==1) > { > > if(start1==NULL) > { > start1=new list1; > cur1=start1; > cur1->bid=hashval; > cur1->link=NULL; > } > else > { >cur1->link=new list1; >cur1=cur1->link; >cur1->bid=hashval; >cur1->link=NULL; > } > > } > else if (listno==2) > { >if(start2==NULL) > { > start2=new list2; > cur2=start2; > cur2->bid=hashval; > cur2->link=NULL; > } > else >{ >cur2->link=new list2; >cur2=cur2->link; >cur2->bid=hashval; >cur2->link=NULL; >} > } >else if (listno==3) > { >if(start3==NULL) > { > start3=new list3; > cur3=start3; > cur3->bid=hashval; > cur3->link=NULL; > } > else >{ >cur3->link=new list3; >cur3=cur3->link; >cur3->bid=hashval; >cur3->link=NULL; >} > } >else if (listno==4) > { >if(start4==NULL) > { > start4=new list4; > cur4=start4; > cur4->bid=hashval; > cur4->link=NULL; > } > else >{ >cur4->link=new list4; >cur4=cur4->link; >cur4->bid=hashval; >cur4->link=NULL; >} > } >} > // searching method > bool search(unsigned int hashval) > { >bool b; > cur1=start1; > while (cur1->link!=NULL) > { > if(cur1->bid==hashval) > b=TRUE; > else > b=FALSE; > cur1=cur1->link; >} > return b; > } > >I will be looking for some help as soon as possible. >THanks to all concerned in advance!! > > >Rasheed >
[ns] Segmentation Fault while Modifying AODV
Dear NS2 Users I am facing a very serious problem regarding modification to AODV protocol. I have customized AODV Protocol to work as VANET Beaconing Protocol according to DSRC Standard. I also having implemented the duplicity mechansim where each node on receiving a beacon, stores it for certain time to check for duplicity, because i want the beacons to travel for multihops. i have divided the road into regions and there is a linked list for every region which stores the hashes of certain values taken from every beacon. i have implemented all this, and when i run my tcl script, it gives segmentation fault. basically i get the segmentation fault after adding the following code (This whole code is included in aodv.cc and aodv is no more a routing protocol. it is just a VANET Beaconing protocol now which i optimized for my simulations). aodv/aodv.cc recev_beacon() { ... ... . receive the beacon and calculate the hash from some values // Now Save the Beacons if (xx<=x && x<(xx+200)) { bool flag=obj.search(hash2); if (flag==TRUE) { cout<<"Already exists in the linked list"<=xx && (xx<=x && x<(xx+400))) { obj.add(hash2, 2); ofstream list2;//for saving hash values list2.open("linkedlist2.dat", ios::app); list2<=xx && (xx<=x && x<(xx+600))) { obj.add(hash2, 3); } else if (x>=xx && (xx<=x && x<(xx+1000))) { obj.add(hash2, 4); } the linked list implemented is given below // // Defining Linked Lists // struct list1{ unsigned int bid;list1 *link; }; struct list2{ unsigned int bid;list2 *link; }; struct list3{ unsigned int bid;list3 *link; }; struct list4{ unsigned int bid;list4 *link; }; class list{ private: int i; list1 *cur1,*temp1,*start1; list2 *cur2,*temp2,*start2; list3 *cur3,*temp3,*start3; list4 *cur4,*temp4,*start4; public: list() { start1=NULL; start2=NULL; start3=NULL; start4=NULL; } void add(unsigned int hashval, int listno) { //cout<<"Enter the list number to add element to";cin>>i; // check for list no. if (listno==1) { if(start1==NULL) { start1=new list1; cur1=start1; cur1->bid=hashval; cur1->link=NULL; } else { cur1->link=new list1; cur1=cur1->link; cur1->bid=hashval; cur1->link=NULL; } } else if (listno==2) { if(start2==NULL) { start2=new list2; cur2=start2; cur2->bid=hashval; cur2->link=NULL; } else { cur2->link=new list2; cur2=cur2->link; cur2->bid=hashval; cur2->link=NULL; } } else if (listno==3) { if(start3==NULL) { start3=new list3; cur3=start3; cur3->bid=hashval; cur3->link=NULL; } else { cur3->link=new list3; cur3=cur3->link; cur3->bid=hashval; cur3->link=NULL; } } else if (listno==4) { if(start4==NULL) { start4=new list4; cur4=start4; cur4->bid=hashval; cur4->link=NULL; } else { cur4->link=new list4; cur4=cur4->link; cur4->bid=hashval; cur4->link=NULL; } } } // searching method bool search(unsigned int hashval) { bool b; cur1=start1; while (cur1->link!=NULL) { if(cur1->bid==hashval) b=TRUE; else b=FALSE; cur1=cur1->link; } return b; } I will be looking for some help as soon as possible. THanks to all concerned in advance!! Rasheed
[ns] segmentation fault while calling getLoc function(getting node position)
Hello, I need to get the current position of the node during the simulation, so I added in the cc file: double ox,oy,oz; MobileNode * otherNode; otherNode = (MobileNode *)(Node::get_node_by_address(id)); otherNode->getLoc(&ox,&oy,&oz); but I have a segmentation fault at the beginning of the simulation. Can you help me please to solve this problem ? Is there any other method to know the current node position? Thanks
Re: [ns] segmentation fault when trying to read common header of a packet
Hi Sireesha I am working with MAC802.11 I am not sure about authentication packets... but my understanding is that packets are identified by the common header. The types of packets i know of are defined in packet.h as below: static const packet_t PT_TCP = 0; static const packet_t PT_UDP = 1; static const packet_t PT_CBR = 2; static const packet_t PT_AUDIO = 3; static const packet_t PT_VIDEO = 4; static const packet_t PT_ACK = 5; static const packet_t PT_START = 6; static const packet_t PT_STOP = 7; static const packet_t PT_PRUNE = 8; static const packet_t PT_GRAFT = 9; static const packet_t PT_GRAFTACK = 10; static const packet_t PT_JOIN = 11; static const packet_t PT_ASSERT = 12; static const packet_t PT_MESSAGE = 13; static const packet_t PT_RTCP = 14; static const packet_t PT_RTP = 15; static const packet_t PT_RTPROTO_DV = 16; static const packet_t PT_CtrMcast_Encap = 17; static const packet_t PT_CtrMcast_Decap = 18; static const packet_t PT_SRM = 19; /* simple signalling messages */ static const packet_t PT_REQUEST = 20; static const packet_t PT_ACCEPT = 21; static const packet_t PT_CONFIRM = 22; static const packet_t PT_TEARDOWN = 23; static const packet_t PT_LIVE = 24; // packet from live network static const packet_t PT_REJECT = 25; static const packet_t PT_TELNET = 26; // not needed: telnet use TCP static const packet_t PT_FTP = 27; static const packet_t PT_PARETO = 28; static const packet_t PT_EXP = 29; static const packet_t PT_INVAL = 30; static const packet_t PT_HTTP = 31; /* new encapsulator */ static const packet_t PT_ENCAPSULATED = 32; static const packet_t PT_MFTP = 33; /* CMU/Monarch's extnsions */ static const packet_t PT_ARP = 34; static const packet_t PT_MAC = 35; static const packet_t PT_TORA = 36; static const packet_t PT_DSR = 37; static const packet_t PT_AODV = 38; static const packet_t PT_IMEP = 39; // RAP packets static const packet_t PT_RAP_DATA = 40; static const packet_t PT_RAP_ACK = 41; static const packet_t PT_TFRC = 42; static const packet_t PT_TFRC_ACK = 43; static const packet_t PT_PING = 44; static const packet_t PT_PBC = 45; // Diffusion packets - Chalermek static const packet_t PT_DIFF = 46; // LinkState routing update packets static const packet_t PT_RTPROTO_LS = 47; // MPLS LDP header static const packet_t PT_LDP = 48; // GAF packet static const packet_t PT_GAF = 49; // ReadAudio traffic static const packet_t PT_REALAUDIO = 50; // Pushback Messages static const packet_t PT_PUSHBACK = 51; #ifdef HAVE_STL // Pragmatic General Multicast static const packet_t PT_PGM = 52; #endif //STL // LMS packets static const packet_t PT_LMS = 53; static const packet_t PT_LMS_SETUP = 54; static const packet_t PT_SCTP = 55; static const packet_t PT_SCTP_APP1 = 56; // SMAC packet static const packet_t PT_SMAC = 57; // XCP packet static const packet_t PT_XCP = 58; // HDLC packet static const packet_t PT_HDLC = 59; // Bell Labs Traffic Trace Type (PackMime OL) static const packet_t PT_BLTRACE = 60; // insert new packet types here static packet_t PT_NTYPE = 61; // This MUST be the LAST one >From the common header the ptype variable holds a number which corresponds to a certain type of packet. for instance, exponential traffic that i am using is 29... whereas DSDV routing update packets are 13. Then, the mechanism for directing the packets through the priority queue or the normal queue is as follows. All packets are received by the llc.cc file. If the packet has a direction DOWN, then it is passed to the LL::sendDown method. In this method, the schedules the packet to be received by the PriQueue::recv method in the file priqueue.cc. Now, depending on the ptype in the common header... the packet is directed to an IFQ. If it is TORA or AODV it goes to the red recvHighPriority(p, h); and get s received by the PriQueue::recvHighPriority in priqueue.cc if it is just a normal packet... like mine are type MESSAGE... then it goes to the blue Queue::recv(p, h); and is received by the normal IFQ Queue::recv in file queue.cc void PriQueue::recv(Packet *p, Handler *h) { struct hdr_cmn *ch = HDR_CMN(p); if(Prefer_Routing_Protocols) { switch(ch->ptype()) { case PT_DSR: case PT_MESSAGE: case PT_TORA: case PT_AODV: recvHighPriority(p, h); break; default: Queue::recv(p, h); } } else { Queue::recv(p, h); } } That's how i think it works... i could be completely lost... but yeah. Hope it helps Kind Regards Ariel On Mon, Mar 8, 2010 at 6:53 PM, sireesha madabhushi wrote: > Hello! > Are you working on 802.11 MAC? If yes I need some help regarding the > interface queues. I want to differentiate the authentication packets from > others and give priority to them. But in the case statement of priqueue.cc, > I am not able to identify the MAC AUTH packet. I go
Re: [ns] segmentation fault when trying to read common header of a packet
I just made some progress with this... i still have the problem, but a better idea where it comes from. Basically, its that i get a blank packet of the IFQ... i don't know why? What is happening is that node 1 is sending a packet to node 0. Node 0 replies with an Ack to node 1. Node 1 receives the Ack in Mac802_11::recv which then schedules the packet to be received in Mac802_11::recv_timer. This then calls Mac802_11::recvAck and a packet is dequeued from the IFQ... but this packet that is being dequeued from the IFQ is blank. So, the MAC layer receives this blank packet... and one of the first things it checks is the direction it is supposed to be going... usually it should be DOWN and this then goes off to the send procedure... but because it is blank it is skipping over the send function and going to the part of the MAC802_11::recv function that deals with packets with direction UP... anyways... this leads to a collision and some other stuff and eventually the pktRx is placed on the calendar and then deleted... so what happens when it comes off the calendar is that looking at its common header struct hdr_cmn *hdr = HDR_CMN(pktRx_); results in a segmentation fault because pktRx is literally stored as 0x in memory. The original cause of the problem is this blank packet that comes off the IFQ? On Mon, Mar 8, 2010 at 4:15 PM, Ariel Goldberg wrote: > I'm running into a segmentation fault in my simulation. The essence of the > problem is that i am putting a packet into the IFQ of a node, but when i > take the packet off the queue to be processed by the MAC layer... it is > blank. > > When the simulation tries to read the common header of the packet it > results in a segmentation fault. > > Do you have any idea what could be happening to the packet while it is in > the IFQ... or where this blank packet could be coming from. I am trying to > monitor the queue by looking at the packets inserted before and after the > packet... but i can't really make much sense of it right now. > > By looking at the memory addresses of the packets, i thought i would be > able to track the packets as they are added to the queue from the > LL::sendDown method in llc.cc and then see them in that order in the queue > by looking at the next_ variable... but what i have found is that the order > of the packets in the queue does not correspond to the order of the packets > that came through llc.cc? > > I don't understand this? Surely all packets in the IFQ must be coming > through the LL::sendDown method? > > Kind Regards > > Ariel Goldberg > > Mobile: +27 82 998 7122 > Phone: +27 21 940 9757 > Mail: ariel.goldbe...@gmail.com > -- Kind Regards Ariel Goldberg Mobile: +27 82 998 7122 Phone: +27 21 940 9757 Mail: ariel.goldbe...@gmail.com
[ns] segmentation fault when trying to read common header of a packet
I'm running into a segmentation fault in my simulation. The essence of the problem is that i am putting a packet into the IFQ of a node, but when i take the packet off the queue to be processed by the MAC layer... it is blank. When the simulation tries to read the common header of the packet it results in a segmentation fault. Do you have any idea what could be happening to the packet while it is in the IFQ... or where this blank packet could be coming from. I am trying to monitor the queue by looking at the packets inserted before and after the packet... but i can't really make much sense of it right now. By looking at the memory addresses of the packets, i thought i would be able to track the packets as they are added to the queue from the LL::sendDown method in llc.cc and then see them in that order in the queue by looking at the next_ variable... but what i have found is that the order of the packets in the queue does not correspond to the order of the packets that came through llc.cc? I don't understand this? Surely all packets in the IFQ must be coming through the LL::sendDown method? Kind Regards Ariel Goldberg Mobile: +27 82 998 7122 Phone: +27 21 940 9757 Mail: ariel.goldbe...@gmail.com
[ns] "Segmentation fault : Core dumped"
Hello, I've modified the aodv routing protocol and now running it in ns2 i get this error : "Segmentation fault : Core dumped" how to solve this problem? please help me. Best regards. Aimi
[ns] segmentation fault, please help
hi everyone, i installed ns-2.1b8-mcast on RedHat7, it seems that i installed correctly (i run one of the ns examples) then i try to run ADMR protocol, i try the command from README (http://www.monarch.cs.rice.edu/ftp/multicast/README) ./ns scripts/run.tcl -x 1200 -y 800 -nn 100 -stop 900 -tr TRACES/out.tr -mg mcast_communication_scenarios/cbr_100_4x64_3x3x20_mcast_ns_rs -sc movement_scenarios/scen-1200x800-100-0-20-1 -rp admr > & TRACES/sim_stdoutput after 31 minutes it gives me segmentation fault, but when i look at TRACES folder, there are two files, (sim_stdoutput, out.tr) i don't know where is the problem, is it from admr.tcl file? i attache both run.tcl and admr.tcl, please help me, i really need it for my dessertation, but no result yet. # File name: admr.tcl # Last revision: May 13, 2002 # Created by:Jorjeta G. Jetcheva (jorje...@cs.cmu.edu) # Copyright (c) 2002, 2003 Rice University. All Rights Reserved. # Permission to use, copy, modify, and distribute this software and # its documentation is hereby granted (including for commercial or # for-profit use), provided that both the copyright notice and this # permission notice appear in all copies of the software, derivative # works, or modified versions, and any portions thereof, and that both # notices appear in supporting documentation, and that credit is given # to Rice University in all publications reporting on direct or indirect # use of this code or its derivatives. # ALL CODE, SOFTWARE, PROTOCOLS, AND ARCHITECTURES DEVELOPED BY THE Rice # MONARCH PROJECT ARE EXPERIMENTAL AND ARE KNOWN TO HAVE BUGS, SOME OF # WHICH MAY HAVE SERIOUS CONSEQUENCES. RICE PROVIDES THIS SOFTWARE OR # OTHER INTELLECTUAL PROPERTY IN ITS ``AS IS'' CONDITION, AND ANY EXPRESS # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL RICE UNIVERSITY BE LIABLE FOR ANY DIRECT, # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE OR INTELLECTUAL PROPERTY, # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Rice University encourages (but does not require) users of this # software or intellectual property to return any improvements or # extensions that they make, and to grant Rice University the rights to # redistribute these changes without encumbrance. # == # Default Script Options # == set opt(rt_port) 255 set mcast_base_addr 0x8000 Agent/RTRAgent set sport_ 254 Agent/RTRAgent set dport_ 254 Agent/RTRAgent set mcast_base_address_ $mcast_base_addr Agent/UniAgent set sport_ 255 Agent/UniAgent set dport_ 255 Agent/ADMRAgent set sport_ 255 Agent/ADMRAgent set dport_ 255 Agent/ADMRAgent set mcast_base_address_ $mcast_base_addr Mac/802_11 set mcast_base_address_ $mcast_base_addr Class McastNode -superclass Node/MobileNode McastNode instproc init {args} { global opt ns_ tracefd RouterTrace $self instvar rtr_agent_ admr_agent_ uni_agent_ dmux_ mcast_dmux_ entry_point_ eval $self next $args ;# parent class constructor # puts "making dmragent for node [$self id]" set rtr_agent_ [new Agent/RTRAgent] $rtr_agent_ ip-addr [$self id] set uni_agent_ [new Agent/UniAgent] $uni_agent_ ip-addr [$self id] set admr_agent_ [new Agent/ADMRAgent] $admr_agent_ ip-addr [$self id] if { $RouterTrace == "ON" } { # Recv Target set rcvT [cmu-trace Recv "ADM" $self] $rcvT target $rtr_agent_ set entry_point_ $rcvT } else { # Recv Target set entry_point_ $rtr_agent_ } # # Drop Target (always on regardless of other tracing) # set drpT [cmu-trace Drop "ADM" $self] $rtr_agent_ drop-target $drpT $uni_agent_ drop-target $drpT $admr_agent_ drop-target $drpT # # Log Target # set T [new Trace/Generic] $T target [$ns_ set nullAgent_] $T attach $tracefd $T set src_ [$self id] $rtr_agent_ log-target $T $uni_agent_ log-target $T $admr_agent_ log-target $T # jj: not sure abt mask set mcast_dmux_ [new Classifier/Addr] $mcast_dmux_ set mask_ 0x $mcast_dmux_ set shift_ 0 $self add-route [$self id] $mcast_dmux_ # ported: this was in MobileNode but they removed it set dmux_ [new Classifier/Addr] $dmux_ set mask_ 0xff $dmux_ set shift_ 0 $self add-route [$self id] $dmux_ $rtr_agent_ target $uni_agent_ $rtr_agent_ mcast_target $admr_ag
[ns] segmentation fault(core dumped) when making
Hi *I have installed the ns2 2.31 all in one version on cygwin in Windows Vista environment. I've added some modules to ns for my designed routing.Therer is no error in making however,when I run the below example, the ns2 will segmentation fault (core dumped).I use GDB to find where the problem is,and the GDB gives the information: *Program received signal SIGSEGV, Segmentation fault. 0x0046370f in Queue::recv (this=0x39ac458, p=0x39d0a40) at queue/queue.cc:137 137 downtarget_->recv(p, &qh_); Then i use "bt" to find the detail,it shows: (gdb) bt #0 0x0046370f in Queue::recv (this=0x39ac458, p=0x39d0a40) at queue/queue.cc:137 #1 0x006a7514 in Connector::send (this=0x39af360, p=0x39d0a40, h=0x0) at ./common/connector.h:56 #2 0x0040dd9d in Trace::recv (this=0x39af360, p=0x39d0a40, h=0x0) at trace/trace.cc:432 #3 0x006a7514 in Connector::send (this=0x39ae708, p=0x39d0a40, h=0x0) at ./common/connector.h:56 #4 0x0040c611 in Connector::recv (this=0x39ae708, p=0x39d0a40, h=0x0) at common/connector.cc:103 #5 0x0040f189 in Classifier::recv (this=0x3999cb0, p=0x39d0a40, h=0x0) at classifier/classifier.cc:151 #6 0x0041e81b in UdpAgent::sendmsg (this=0x39c5418, nbytes=1000, data=0x0, flags=0x0) at apps/udp.cc:107 #7 0x006a639a in UdpAgent::sendmsg (this=0x39c5418, nbytes=1000, flags=0x0) at apps/udp.h:61 #8 0x00414bad in Application::send (this=0x39c5ce8, nbytes=1000) at apps/app.cc:111 #9 0x0041522c in TrafficGenerator::timeout (this=0x39c5ce8) at tools/trafgen.cc:74 #10 0x004169a6 in CBR_Traffic::start (this=0x39c5ce8) at tools/cbr_traffic.cc:101 #11 0x004149b8 in Application::command (this=0x39c5ce8, argc=2, argv=0x22a22c) My queue.cc is: void Queue::recv(Packet* p, Handler*) { double now = Scheduler::instance().clock(); enque(p); //printQueue(); if (!blocked_) { /* * We're not blocked. Get a packet and send it on. * We perform an extra check because the queue * might drop the packet even if it was * previously empty! (e.g., RED can do this.) */ p = deque(); if (p != 0) { utilUpdate(last_change_, now, blocked_); last_change_ = now; blocked_ = 1; downtarget_->recv(p, &qh_);//here I made a change for my routing protocol } } } Thank you very much in advance ! set ns [new Simulator] $ns color 1 Blue $ns color 2 Red set nf [open out.nam w] $ns namtrace-all $nf set nd [open out.tr w] $ns trace-all $nd proc finish {} { global ns nf nd $ns flush-trace close $nf close $nd exec nam out.nam & exit 0 } set s1 [$ns node] set s2 [$ns node] set r [$ns node] set d [$ns node] $ns duplex-link $s1 $r 2Mb 10ms DropTail $ns duplex-link $s2 $r 2Mb 10ms DropTail $ns duplex-link $r $d 1.7Mb 20ms DropTail $ns queue-limit $r $d 10 $ns duplex-link-op $s1 $r orient right-down $ns duplex-link-op $s2 $r orient right-up $ns duplex-link-op $r $d orient right $ns duplex-link-op $r $d queuePos 0.5 set tcp [new Agent/TCP] $ns attach-agent $s1 $tcp set sink [new Agent/TCPSink] $ns attach-agent $d $sink $ns connect $tcp $sink $tcp set fid_ 1 set ftp [new Application/FTP] $ftp attach-agent $tcp $ftp set type_ FTP set udp [new Agent/UDP] $ns attach-agent $s2 $udp set null [new Agent/Null] $ns attach-agent $d $null $ns connect $udp $null $udp set fid_ 2 set cbr [new Application/Traffic/CBR] $cbr attach-agent $udp $cbr set type_ CBR $cbr set packet_size_ 1000 $cbr set rate_ 1mb $cbr set random_ false $ns at 0.1 "$cbr start" $ns at 1.0 "$ftp start" $ns at 4.0 "$ftp stop" $ns at 4.5 "$cbr stop" $ns at 4.5 "$ns detach-agent $s1 $tcp ; $ns detach-agent $d $sink" $ns at 5.0 "finish" $ns run
[ns] Segmentation fault (core dumped) for ping example
Hi NSusers, I am new to ns2 and started learing from tutorial. I am using ns-2.34 in windowsXP thru cygwin. In this version ping example for adding new protocol comes with it with all settings already made in required files. So, I am trying to add new protocol named "link" to ns2 using ns tutorial's "ping" example steps. I just renamed 'ping' with 'link' in the ping example files. 1. Copied link.cc, link.h files to folder "ns-2/apps/" 2. Defined LINK packet type in "ns-2/common/packet.h" as per the tutorial ping example. 3. Defined default value of LINK agent in "ns-2/tcl/lib/ns-default.tcl" as Agent/Link set packet_size 64 4. Defined new packet type in ns-packet.tcl 5. Added apps/link.o in Makefile 6. under ns2 directory i ran "make" And finally, typed "$ns link.tcl" to run the example script, then i see below error. I looked into archives and didnot find why this issue is coming for the ping example. Why do we see this error. "Segmentation fault (core dumped)" means what. where can i see this stack trace atleat to find where it failed. Please guide me in right direction to fix this. I greatly appriciate your help. Error from my cygwin window: - $ ns link.tcl warning: no class variable Agent/Link::packetSize_ see tcl-object.tcl in tclcl for info about this warning. warning: no class variable Agent/Link::off_link_ warning: no class variable Agent/Link::packetSize_ see tcl-object.tcl in tclcl for info about this warning. warning: no class variable Agent/Link::off_link_ Segmentation fault (core dumped) --- -- Regards, Manoop Talasila
[ns] segmentation fault with 802_11e
hi,all when i change 802_11 in examples in ns\tcl\ex with 802_11e and run it i get segmentation fault this script work well without changing i need to tcl script that run with 802_11 correctly and i need to guide about using 802_11e in my tcl script correctly please help me about that soon mr.ali.balador homepage:www.balador.org
Re: [ns] Segmentation fault with wireless simulation
in your script you have to change ifq value Queue/DropTail/PriQueue by CMUPriQueue #Define wirleess scenario parameters set val(chan) Channel/WirelessChannel; set val(prop) Propagation/TwoRayGround1; set val(netif) Phy/WirelessPhy; set val(mac) Mac/802_11; set val(ifq) CMUPriQueue ; set val(ll) LL; set val(ant) Antenna/OmniAntenna; set val(ifqlen) 50; set val(nn) 5; set val(rp) DSR; set val(x) 500; set val(y) 400; set val(stop) 150; set ns [new Simulator] set tracefd [open problem1Trace.tr w] set windowVsTime2 [open problem1Win.tr w] set namfd [open problem1Namtrace.nam w] $ns trace-all $tracefd $ns namtrace-all-wireless $namfd $val(x) $val(y) set topo [new Topography] $topo load_flatgrid $val(x) $val(y) create-god $val(nn) $ns node-config -adhocRouting $val(rp) \ -llType $val(ll) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType $val(prop) \ -phyType $val(netif) \ -channelType $val(chan) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON\ -macTrace OFF \ -movementTrace ON for {set i 0} {$i < $val(nn) } {incr i} { set node_($i) [$ns node] } $node_(0) set X_ 5.0 $node_(0) set Y_ 5.0 $node_(0) set Z_ 0.0 $node_(1) set X_ 490.0 $node_(1) set Y_ 285.0 $node_(1) set Z_ 0.0 $node_(2) set X_ 150.0 $node_(2) set Y_ 240.0 $node_(2) set Z_ 0.0 $node_(3) set X_ 495.0 $node_(3) set Y_ 100 $node_(3) set Z_ 0.0 $node_(4) set X_ 495 $node_(4) set Y_ 395 $node_(4) set Z_ 0.0 $ns at 10.0 "$node_(0) setdest 250.0 250.0 3.0" $ns at 15.0 "$node_(1) setdest 45.0 285.0 5.0" $ns at 20.0 "$node_(2) setdest 480.0 300.0 5.0" $ns at 25.0 "$node_(3) setdest 50.0 150.0 5.0" $ns at 15.0 "$node_(4) setdest 50.0 50.0 3.0" #set TCP Connection between node_(0) and node_(1) set tcp0 [new Agent/TCP/Newreno] $tcp0 set class_ 2 set sink0 [new Agent/TCPSink] $ns attach-agent $node_(0) $tcp0 $ns attach-agent $node_(1) $sink0 $ns connect $tcp0 $sink0 set ftp [new Application/FTP] $ftp attach-agent $tcp0 $ns at 10.0 "$ftp start" #set TCP Connection between node_(0) and node_(4) set tcp1 [new Agent/TCP/Newreno] $tcp1 set class_ 2 set sink1 [new Agent/TCPSink] $ns attach-agent $node_(0) $tcp1 $ns attach-agent $node_(4) $sink1 $ns connect $tcp1 $sink1 set ftp1 [new Application/FTP] $ftp1 attach-agent $tcp1 $ns at 12.0 "$ftp1 start" #set TCP Connection between node_(3) and node_(2) set tcp2 [new Agent/TCP/Newreno] $tcp2 set class_ 2 set sink2 [new Agent/TCPSink] $ns attach-agent $node_(3) $tcp2 $ns attach-agent $node_(2) $sink2 $ns connect $tcp2 $sink2 set ftp2 [new Application/FTP] $ftp2 attach-agent $tcp2 $ns at 15.0 "$ftp2 start" proc plotWindow {tcpSource file} { global ns set time 0.01 set now [$ns now] set cwnd [$tcpSource set cwnd_] puts $file "$now $cwnd" $ns at [expr $now+$time] "plotWindow $tcpSource $file" } $ns at 10.1 "plotWindow $tcp0 $windowVsTime2" #define node position in NAM for {set i 0} {$i < $val(nn)} {incr i} { $ns initial_node_pos $node_($i) 30 } for {set i 0} {$i < $val(nn) } {incr i} { $ns at $val(stop) "$node_($i) reset"; } $ns at $val(stop) "$ns nam-end-wireless $val(stop)" $ns at $val(stop) "stop" $ns at 150.01 "puts \"end simulation\" ; $ns halt" proc stop {} { global ns tracefd namfd $ns flush-trace close $tracefd close $namfd } $ns run #Good Luck -- View this message in context: http://www.nabble.com/Segmentation-fault-with-wireless-simulation-tp14679409p25017741.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Segmentation fault
Dear All, I am having Segmentation fault while running ns-OBS under NS-2.28. Any assistance ? -- COULIBALY Yahaya PhD Candidate Faculty of Computer Science & Information Systems Department of Communication & Computer Systems Malaysia University of Technology (UTM) 81310 Skudai, Johor Bahru, Johor Cell: 0060196886615
[ns] segmentation fault with SFQ
Dear friends, in a wireless 802.11 topology with couple of nodes when I set the queue type as Queue/DropTail/PriQueue everything is fine but when I change it to Queue/SFQ it gives "Segmentation fault". Does anybody know why this happens? I tried SFQ with wired links and it works correctly!!! Any suggestions? Thanks Fariborz
[ns] Segmentation fault when compiling
Hi everybody, I am working on ns2.33 using cygwin. When compiling the attached code, I get the following message: $ ./ns Evaltran.tcl num_nodes is set 1 warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl INITIALIZE THE LIST xListHead Base station is created! wireles node is created! 39.312258 Simulation starts!! Segmentation fault (core dumped) An ns.exe text file appears in my compiling folder with the following content Exception: STATUS_ACCESS_VIOLATION at eip=18F71E50 eax= ebx=011F762C ecx=011EBDE4 edx=011F6808 esi=00229B00 edi=00229B50 ebp=002294B8 esp=002293E0 program=C:\cygwin\home\KiKoLoCo\ns-allinone-2.33\ns-2.33\ns.exe, pid 8112, thread main cs=001B ds=0023 es=0023 fs=003B gs= ss=0023 Stack trace: Frame Function Args 002294B8 18F71E50 (011E0998, 0602, , ) 002294D8 19226F3E (011E0998, 0602, , 1913AFAB) 002294F8 18F8685D (011E1E08, 0602, 00229518, 18F88603) 00229518 18F86ED0 (011E1E08, 011E1E08, 00229968, 18F86668) 00229528 18F8863A (011E1E08, 19338CEB, 00F72488, ) 00229968 18F86668 (011E1E08, 0002, 00229B0C, 0003) 00229988 1913B9C6 (011E1E08, 00F72370, 0005, 00229B00) 00229B38 1913F0F2 (011EB1D0, 00F72370, 0003, 00229B50) 00229BB8 19143F88 (011EB2F0, 00F72370, 0003, 00F74690) 00229C48 19145650 (00F72370, 0003, 00F74690, ) 00229EF8 191671D3 (00F72370, 011F29A8, 0010, 1915C357) 00229F28 1916AC4C (00F72370, 011F29A8, 0005, ) 0022A1D8 19167463 (00F72370, 0116D2A0, 0022A208, 1916B2FC) 0022A208 1916AC4C (00F72370, 00F7B320, 00F7CF40, 0001) 0022A5D8 19160E78 (00F861F8, 00F72370, 0005, 0022A600) 0022A668 191610F5 (00F861F8, 00F72370, 0005, 0022A720) End of stack trace (more stack frames may be present) I tried to solve this problem by following the instructions in the link listed below and provided by Mr Rehmani. http://article.gmane.org/gmane.network.simulator.isi/2766/match=segmentation +fault but I got the following lines $ gdb -c core GNU gdb 6.8.0.20080328-cvs (cygwin-special) Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later
Re: [ns] segmentation fault
Hi Dasari Mallikarjuna Look at this link to resolve the problem of segmentation fault. http://article.gmane.org/gmane.network.simulator.isi/2766/match=segmentation+fault Besides this, after making any changes in c++ code of ns2, do this: make clean make sudo make install Regards Mubashir Lip6, UPMC, Paris, France. 2009/1/8 dasari mallikarjuna > > I am using programs written by Lavina Jain et al (in ns-2). I have made > some changes to the program and tried to run it.It is giving Segmentation > fault. I removed the changes and again used make, still the problem is > persisting. I had to re-install theoperating system (fedora linux) to > remove the erro. What could be the problem? > > > > -- Mubashir Husain Rehmani
[ns] segmentation fault
I am using programs written by Lavina Jain et al (in ns-2). I have made some changes to the program and tried to run it.It is giving Segmentation fault. I removed the changes and again used make, still the problem is persisting. I had to re-install theoperating system (fedora linux) to remove the erro. What could be the problem?
Re: [ns] Segmentation fault
I have resolved the problem Instead of, set opt(ifq)Queue/DropTail/PriQueue; use: set opt(ifq)CMUPriQueue; souhaj wrote: > > Hello i am using ns2 2.30 and 2.29 under fedora 9.. > i am using wireless roouting protocols AODV, DSDV, OLSR... > i have an error segmentation when using DSR... > i have tried to change Linux version by using Mandrake 9.2.. > PLZ can you help me to solve this error.. > thanks in advance.. > > > > -- View this message in context: http://www.nabble.com/Segmentation-fault-tp21263300p21263863.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Segmentation fault
Hello i am using ns2 2.30 and 2.29 under fedora 9.. i am using wireless roouting protocols AODV, DSDV, OLSR... i have an error segmentation when using DSR... i have tried to change Linux version by using Mandrake 9.2.. PLZ can you help me to solve this error.. thanks in advance.. -- View this message in context: http://www.nabble.com/Segmentation-fault-tp21263300p21263300.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Segmentation fault in AODV when using DRR in wireless network
Hi all! I got a segmentation fault when using Queue/DRR and AODV in wireless network. following is the message output by valgrind ==2252== Invalid read of size 4 ==2252==at 0x81BD274: PacketQueue::head() (queue.h:82) ==2252==by 0x829A1D6: PriQueue::filter(int) (priqueue.cc:158) ==2252==by 0x82C82FF: AODV::rt_ll_failed(Packet*) (aodv.cc:343) ==2252==by 0x82C8339: aodv_rt_failed_callback(Packet*, void*) (aodv.cc:293) ==2252==by 0x827A041: Mac802_11::RetransmitRTS() (mac-802_11.cc:1295) ==2252==by 0x827A4C4: Mac802_11::send_timer() (mac-802_11.cc:883) ==2252==by 0x827A530: Mac802_11::sendHandler() (mac-802_11.cc:793) ==2252==by 0x82A142D: TxTimer::handle(Event*) (mac-timers.cc:254) ==2252==by 0x81A7933: Scheduler::dispatch(Event*, double) (scheduler.cc:150) ==2252==by 0x81A7B85: Scheduler::run() (scheduler.cc:129) ==2252==by 0x81A7E44: Scheduler::command(int, char const* const*) (scheduler.cc:198) ==2252==by 0x83CCAFD: TclClass::dispatch_cmd(void*, Tcl_Interp*, int, char const**) (in /home/howardgod/ns2/ns-2.33/ns) ==2252== Address 0x1a is not stack'd, malloc'd or (recently) free' I think the problem is in AODV::rt_ll_failed(Packet*) and PriQueue::filter(int). And there was a similar problem posed http://mailman.isi.edu/pipermail/ns-users/2005-April/048686.html and there's a solution about this problem http://mailman.isi.edu/pipermail/ns-users/2005-April/048710.html but solution is aimed at adding a new routing protocol. So the solutions is not help for me. I'm making a new queue based on DRR. And use it in wireless network. So when I use Queue/MyQueue and AODV in TCL file, segmentation fault occurs. But I make the problem easier. I write the same tcl file except I use Queue/DRR. And I find out there's still a segmentation fault just as I use Queue/MyQueue. following is the TCL file # = # Define options # = set opt(chan) Channel/WirelessChannel set opt(prop) Propagation/TwoRayGround set opt(netif) Phy/WirelessPhy set opt(mac) Mac/802_11 set opt(ifq) Queue/DRR set opt(ll) LL set opt(ant) Antenna/OmniAntenna set opt(ifqLen) 50 set opt(nn) 7 set opt(rp) AODV set opt(x) 1000 set opt(y) 1000 set opt(stop) 10 set opt(tran) 250 # = # Create simulation object set ns [new Simulator] # Open trace file set tracefd [open drr-out.tr w] set namtrace [open drr-out.nam w] $ns trace-all $tracefd $ns namtrace-all-wireless $namtrace $opt(x) $opt(y) # Create topology object set topo [new Topography] # Define topology $topo load_flatgrid $opt(x) $opt(y) # Create God create-god $opt(nn) set chan [new $opt(chan)] # Congigure for node $ns node-config -adhocRouting $opt(rp) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqLen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -channel $chan \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ -macTrace OFF \ -movementTrace OFF # = # Node Definition # = for {set i 0} {$i < 3} {incr i} { set wl_node_($i) [$ns node] $wl_node_($i) random-motion 0 puts "wireless node $i created ..." $wl_node_($i) set X_ [expr 200.0 + $i * 200.0] $wl_node_($i) set Y_ 400.0 $wl_node_($i) set Z_ 0.0 $ns initial_node_pos $wl_node_($i) 20 } for {set i 3} {$i < 5} {incr i} { set wl_node_($i) [$ns node] $wl_node_($i) random-motion 0 puts "wireless node $i created ..."; $wl_node_($i) set X_ 400.0 $wl_node_($i) set Y_ [expr 800.0 - ($i - 3)*200.0] $wl_node_($i) set Z_ 0.0 $ns initial_node_pos $wl_node_($i) 20 } for {set i 5} {$i < 7} {incr i} { set wl_node_($i) [$ns node] $wl_node_($i) random-motion 0 puts "wireless node $i created ..."; $wl_node_($i) set X_ 400.0 $wl_node_($i) set Y_ [expr 200.0 - ($i - 5)*200.0] $wl_node_($i) set Z_ 0.0 $ns initial_node_pos $wl_node_($i) 20 } # = # Traffic Definition # = set udp0 [new Agent/UDP] set dst_udp0 [new Agent/Null] $ns attach-agent $wl_node_(0) $udp0 $ns attach-agent $wl_node_(2) $dst_udp0 set cbr0 [new Application/Traffic/CBR] $cbr0 set rate_ 200Kb $cbr0 attach-agent $udp0 $ns connect $udp0 $dst_udp0 $ns at 0.0 "$cbr0 start" $ns at $opt(stop) "$cbr0 stop" set udp1 [new Agent/UDP] set des_udp1 [new Agent/Null] $ns attach-agent $wl_node_(4) $udp1 $ns attach-agent $wl_node_(5) $des_udp1 set cbr1 [new Application/Traffic/CBR] $cbr1 set rate_ 500Kb $cbr1 attach-agent $udp1 $ns connect $udp1 $des_udp1 $ns at 0.0 "$cbr1 start" $ns at $opt(stop) "$cbr1 stop" set udp2 [new Agent/UDP] set des_udp2 [new Agent/Null] $ns attach-agent $wl_node_(3) $udp2 $ns attach-agent $wl_node_(6) $des_udp2 set cbr2 [new Application/Traffic/CBR] $cbr2 set rate_ 500Kb $cbr2 attach-agent $udp2
[ns] Segmentation fault
this istruction give to me a "Segmentation fault": $data(0) attach-agent $tr(S,0,0) where $data(0) has been just defined as FTP application and $tr(S,0,0) is a TCP Module provided by ns miracle Note that the same scheme has been used in the sample "dei80211mr_infrastruct_plus_wired_tcp.tcl" in the sample directory of nsmiracle I don't know which is the problem and i've sent this mail to both the ML cheers Davide
[ns] segmentation fault with dsr
i tried to simulate the wireless1.tcl file given in marcs tutorial and ran it for 50 nodes and 20 connections but when the protocol is set to dsr it gives segmentation fault any idea why -- B Sriram Wing Commander mob : 09733706981
Re: [ns] segmentation fault (core dumped) using ZRP in ns-2.27
HI Batbold Toiruul, here is no "the" solution to *segmentation* *fault*s. From what I've seen on this list and in practice, there can be several causes: 1. you deleted a resource from within TCL, causing pointers in C++ to point to memory regions no longer in use. Fix: be careful what you delete in TCL. 2. you added or modified the ns2 source code: a. there is a dependency problem and parts of your source have not been recompiled. fix: type "make clean" and "make" to make ultimately sure that all code is within sync with each other b. your additions are the cause of the memory violation. fix: fix! how to find the location of your error? a. first you have to convince your shell to produce a coredump when a *segmentation* *fault* occurs. Usually this is done with the command "ulimit -c 10" which sets the limit of coredumps to really huge so that they are allways produced. b. add "-g" to the CFLAGS in the Makefile (and Makefile.in to make sure your change is not removed when you ./configure ns2). This flag says that debugging code is compiled into the executable. c. make clean & make to have the debugging code properly compiled in. When a *segmentation* *fault* occurs, type: "gdb -c core", then in gdb tell it that you want to load symbols from the ns executable with "file ns", and then you can inspect the stack ("bt"), select a stack frame ("select 0") and inspect the values of variables in that stack frame. Use the online help of gdb to get familiar with it. This link may be useful to you. http://article.gmane.org/gmane.network.simulator.isi/2766/match=segmentation +fault Good luck debugging! 3. May be you are accessing the wrong memory location while declaring your data structures like linked list, arrays etc Regards Mubashir Husain Rehmani 2008/10/4 Batbold Toiruul <[EMAIL PROTECTED]> > > Dear ns-users, > I installed Zone Routing Protocol (ZRP) on ns-2.27. However, when i use ZRP > to run below example, I got the segmentation fault (Core Dumped). > I don't know why this kind of error is occured. if anyone knows, please > help > me. > > thank you very much in advance > sincerely, >Batbold > > > set val(chan) Ch.annel/WirelessChannel;#Channel Type > set val(prop) Propagation/TwoRayGround ;# radio-propagation > model > set val(netif) Phy/WirelessPhy;# network interface > type > set val(mac)Mac/802_11 ;# MAC type > set val(ifq)Queue/DropTail/PriQueue;# interface queue type > set val(ll) LL ;# link layer type > set val(ant)Antenna/OmniAntenna;# antenna model > set val(ifqlen) 500 ;# max packet in ifq > set val(nn) 22 ;# number of mobilenodes > set val(rp) ZRP;# routing protocol > set val(x)1000 > set val(y)[expr ($val(nn)+1)*250] > > # Initialize Global Variables > set ns_[new Simulator] > set tracefd [open mo4.tr w] > $ns_ trace-all $tracefd > > set namtrace [open mo4.nam w] > $ns_ namtrace-all-wireless $namtrace $val(x) $val(y) > > # set up topography object > set topo [new Topography] > > $topo load_flatgrid $val(x) $val(y) > > # Create God > create-god $val(nn) > > # New API to config node: > # 1. Create channel (or multiple-channels); > # 2. Specify channel in node-config (instead of channelType); > # 3. Create nodes for simulations. > > # Create channel #1 and #2 > set chan_1_ [new $val(chan)] > set chan_2_ [new $val(chan)] > > # Create node(0) "attached" to channel #1 > > # configure node, please note the change below. > $ns_ node-config -adhocRouting $val(rp) \ >-llType $val(ll) \ >-macType $val(mac) \ >-ifqType $val(ifq) \ >-ifqLen $val(ifqlen) \ >-antType $val(ant) \ >-propType $val(prop) \ >-phyType $val(netif) \ >-topoInstance $topo \ >-agentTrace ON \ >-routerTrace ON \ >-macTrace ON \ >-movementTrace ON \ >-channel $chan_1_ > > > # node_(1) can also be created with the same configuration, or with a > different > # channel specified. > # Uncomment below two lines will create node_(1) with a different channel. > # $ns_ node-config \ > # -channel $chan_2_ > #set node_(0) [$ns_ node] > #set node_(8) [$ns_ node] > > #$node_(0) random-motion 0 > #$node_(8) random-motion 0 > > for {set i 0} {$i < $val(nn)} {incr i} { >set node_($i) [$ns_ node] >$node_($i) random-motion 0 >$ns_ initial_node_pos $node_($i) 20 > } > > # > # Provide initial (X,Y, for now Z=0) co-ordinates for mobilenodes > # > #$node_(0) set X_ 500.0 > #$node_(0) set Y_ 250.0 > #$node_(0) set Z_ 0.0 > #... > #$node_(8) set X_ 500.0 > #$node_(8) set Y_ 2250.0 > #$node_(8) set Z_ 0.0 > > for {set i 0} {$i < 10 } {incr i} { > $node_($i) set X_ 750.0 > $node_($i) set
[ns] segmentation fault (core dumped) using ZRP in ns-2.27
Dear ns-users, I installed Zone Routing Protocol (ZRP) on ns-2.27. However, when i use ZRP to run below example, I got the segmentation fault (Core Dumped). I don't know why this kind of error is occured. if anyone knows, please help me. thank you very much in advance sincerely, Batbold set val(chan) Ch.annel/WirelessChannel;#Channel Type set val(prop) Propagation/TwoRayGround ;# radio-propagation model set val(netif) Phy/WirelessPhy;# network interface type set val(mac)Mac/802_11 ;# MAC type set val(ifq)Queue/DropTail/PriQueue;# interface queue type set val(ll) LL ;# link layer type set val(ant)Antenna/OmniAntenna;# antenna model set val(ifqlen) 500 ;# max packet in ifq set val(nn) 22 ;# number of mobilenodes set val(rp) ZRP;# routing protocol set val(x)1000 set val(y)[expr ($val(nn)+1)*250] # Initialize Global Variables set ns_[new Simulator] set tracefd [open mo4.tr w] $ns_ trace-all $tracefd set namtrace [open mo4.nam w] $ns_ namtrace-all-wireless $namtrace $val(x) $val(y) # set up topography object set topo [new Topography] $topo load_flatgrid $val(x) $val(y) # Create God create-god $val(nn) # New API to config node: # 1. Create channel (or multiple-channels); # 2. Specify channel in node-config (instead of channelType); # 3. Create nodes for simulations. # Create channel #1 and #2 set chan_1_ [new $val(chan)] set chan_2_ [new $val(chan)] # Create node(0) "attached" to channel #1 # configure node, please note the change below. $ns_ node-config -adhocRouting $val(rp) \ -llType $val(ll) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType $val(prop) \ -phyType $val(netif) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ -macTrace ON \ -movementTrace ON \ -channel $chan_1_ # node_(1) can also be created with the same configuration, or with a different # channel specified. # Uncomment below two lines will create node_(1) with a different channel. # $ns_ node-config \ # -channel $chan_2_ #set node_(0) [$ns_ node] #set node_(8) [$ns_ node] #$node_(0) random-motion 0 #$node_(8) random-motion 0 for {set i 0} {$i < $val(nn)} {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0 $ns_ initial_node_pos $node_($i) 20 } # # Provide initial (X,Y, for now Z=0) co-ordinates for mobilenodes # #$node_(0) set X_ 500.0 #$node_(0) set Y_ 250.0 #$node_(0) set Z_ 0.0 #... #$node_(8) set X_ 500.0 #$node_(8) set Y_ 2250.0 #$node_(8) set Z_ 0.0 for {set i 0} {$i < 10 } {incr i} { $node_($i) set X_ 750.0 $node_($i) set Y_ [expr $i*250+5] $node_($i) set Z_ 0.0 } for {set i 10} {$i < 20 } {incr i} { $node_($i) set X_ 250.0 $node_($i) set Y_ [expr ($i-10)*250+5] $node_($i) set Z_ 0.0 } $node_(20) set X_ 500.0 $node_(20) set Y_ 5.0 $node_(20) set Z_ 0.0 $node_(21) set X_ 500.0 $node_(21) set Y_ 505.0 $node_(21) set Z_ 0.0 #for {set i 0} {$i < 3} {incr i} { #for {set j 0} {$j < 3} {incr j} { #$node_([expr $i+$j*3]) set X_ [expr $i*250] #$node_([expr $i+$j*3]) set Y_ [expr $j*250] #$node_([expr $i+$j*3]) set Z_ 0.0 #} #} # Now produce some simple node movements # Node_(1) starts to move towards node_(0) # #$ns_ at 3.0 "$node_(5) setdest 100.0 500.0 05.0" #$ns_ at 100.0 "$node_(5) setdest 100.0 500.0 00.0" #$ns_ at 200.0 "$node_(5) setdest 005.0 700.0 05.0" #$ns_ at 3.0 "$node_(0) setdest 48.0 38.0 5.0" # Node_(1) then starts to move away from node_(0) #$ns_ at 20.0 "$node_(1) setdest 490.0 480.0 30.0" # Setup traffic flow between nodes #TCP connections between node_(0) and node_(1) set udp [new Agent/UDP] $udp set fid_ 2 set sink [new Agent/Null] $ns_ attach-agent $node_(10) $udp $ns_ attach-agent $node_(9) $sink $ns_ connect $udp $sink set cbr [new Application/Traffic/CBR] $cbr attach-agent $udp $cbr set type_ CBR $cbr set packet_size_ 100 $cbr set rate_ 10kb $cbr set random_ false $ns_ at 10.0 "$cbr start" $ns_ at 100.0 "$cbr stop" #set tcp [new Agent/TCP] #$tcp set class_ 1 #$tcp set fid_ 2 #set sink [new Agent/TCPSink] #$ns_ attach-agent $node_(2) $tcp #$ns_ attach-agent $node_(5) $sink #$ns_ connect $tcp $sink #set ftp [new Application/FTP] #$ftp attach-agent $tcp #$ftp set type_ FTP #$ns_ at 23.0 "$ftp start" #$ns_ at 173.0 "$ftp stop" Mac/802_11 set dataRate_ 1Mb for {set i 0} {$i < $val(nn) } {incr i} { set r_($i) [$node_($i) set ragent_] $ns_ at 0.0 "$r_($i) radius 2.0" # @@@ $ns_ at 0.4 "$r_($i) beacon_period 12.0" # @@@ $ns_ at 0.0 "$r_($i) radius 1.0" } # # Tell nodes when the simulation ends # for {set i 0} {$i < $val(nn) } {incr i} { $ns_ at 100.0 "$node_(
Re: [ns] segmentation fault (core dumped) in ns-2.27
The fault occured due to a part of code making invalid access to memory ( obviously ! ) but inorder to know which part of the code.. pl install gdb in ns.. so that when you run 'x.tcl' you will be able to get loads of info which might help you to spot which part of code leads to seg fault. Batbold Toiruul-2 wrote: > > > Dear ns-users, > I installed ZRP on ns-2.27. However, when I using ZRP to run example, the > ns2 will segmentation fault (core dumped). > *if *anyone knows about this error, help me > > thank you for helping > > sincerely, >Bold > * > * > > -- View this message in context: http://www.nabble.com/segmentation-fault-%28core-dumped%29-in-ns-2.27-tp19775436p19777041.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] segmentation fault (core dumped) in ns-2.27
Dear ns-users, I installed ZRP on ns-2.27. However, when I using ZRP to run example, the ns2 will segmentation fault (core dumped). *if *anyone knows about this error, help me thank you for helping sincerely, Bold * *
[ns] Segmentation fault
hi ns-users i run trust bsed DSR(written by Lennart conard) and see some error like follow help me thanks alot Error on opening file: 23.dtmf.dtmf in TrustManager::load() Node :23 is evil in Trust DSR i: 24 value of AVR_ACK_TIME_OUT_VAL: 0.07 value of MAXWAIT: 0.01 value of ACKRECEIVED: 1 value of NOACKRECEIVED: -1 value of DATAPACKETRECEIVED: 0.7 value of S1_DEFAULTTRUSTVALUE: -0.4 value of S2_DEFAULTTRUSTVALUE: -0.4 value of DEFAULTUNKNOWNVAL: -0.4 value of NOEXPERIENCES: -0.4 value of MAX_NR_OF_EXP: 5 value of NROFEVILNODES: 10 and the number was24.dtmf Opening file: 24.dtmf for loading... Error on opening file: 24.dtmf.dtmf in TrustManager::load() Node :24 is evil in Trust DSR and the number was24.dtmf Opening file: 24.dtmf for loading... Error on opening file: 24.dtmf.dtmf in TrustManager::load() Node :24 is evil in Trust DSR value of AVR_ACK_TIME_OUT_VAL: 0.07 value of MAXWAIT: 0.01 value of ACKRECEIVED: 1 value of NOACKRECEIVED: -1 value of DATAPACKETRECEIVED: 0.7 value of S1_DEFAULTTRUSTVALUE: -0.4 value of S2_DEFAULTTRUSTVALUE: -0.4 value of DEFAULTUNKNOWNVAL: -0.4 value of NOEXPERIENCES: -0.4 value of MAX_NR_OF_EXP: 5 value of NROFEVILNODES: 10 and the number was25.dtmf Opening file: 25.dtmf for loading... Error on opening file: 25.dtmf.dtmf in TrustManager::load() Node :25 is evil in Trust DSR and the number was25.dtmf Opening file: 25.dtmf for loading... Error on opening file: 25.dtmf.dtmf in TrustManager::load() Node :25 is evil in Trust DSR value of AVR_ACK_TIME_OUT_VAL: 0.07 value of MAXWAIT: 0.01 value of ACKRECEIVED: 1 value of NOACKRECEIVED: -1 value of DATAPACKETRECEIVED: 0.7 value of S1_DEFAULTTRUSTVALUE: -0.4 value of S2_DEFAULTTRUSTVALUE: -0.4 value of DEFAULTUNKNOWNVAL: -0.4 value of NOEXPERIENCES: -0.4 value of MAX_NR_OF_EXP: 5 value of NROFEVILNODES: 10 and the number was26.dtmf Opening file: 26.dtmf for loading...
[ns] Segmentation fault for more simultaneous CBR traffics in Wireless simulation
Dear all, We are doing wireless static (802.11) chain topology simulation, for determining energy consumption per successful packet received. Actually we face segmentation fault (core dumped) for more than 4 CBR simultaneous active traffics. For 4 or less simultaneous flows it works nicely. In above case, we started the CBR traffics at 10 seconds and stop at 120 seconds. When we changed it to 10 seconds to 25 seconds resp, the (segmentation fault) problem started after 6 simultaneous traffics. We don't understand exactly, what is the problem? Is it some limitation of the ns? We are using: 1> ns 2.30 2> Operating System: Ubuntu 7.10, The output of "uname -a" is: Linux wsl1 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686 GNU/Linux 3> The machine has Intel Core 2 (Duo) processor and 2GB RAM, I've read the FAQ, ns-problems page, and manual and I couldn't find the answer there with regards, Mayur - Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
[ns] Segmentation Fault when implementing a new protocol
Hi All, I have implemented a Layer 3 routing protocol by reading the document by Francisco & Pedro. I installed NS2, added my protocol & did make. Make worked without errors, but when I run a simulation script (the same script used for AODV) specifying my protocol as option I am getting segmentation fault. Does anyone know what could be the reason behind this. My protocol is a MANET protocol based on AODV & OLSR and I am using NS 2.31 for my simulation. Please let me know some of the possible causes for segmentation faults in NS2. *Thanks & Regards, Madhava.N*
[ns] Segmentation fault in Scheduler when scheduling a new packet
hi, Whenever I make the following call ( Scheduler::instance.schedule(target ,p ,0.0) ) I get a segmentation fault. has anybody come across this problem before? Regards, Abdulla - Looking for last minute shopping deals? Find them fast with Yahoo! Search.
Re: [ns] segmentation fault(core dumped) error
I have 69 nodes, it was working well until yesterday that I added one line to create a new variable. After the value set up the simulation crash around the middle, if I remove the line, it works well. The "offending" line could be something as silly as: set dummy 0 I wonder if any body knows any limits in the number of nodes (as the original e-mail), number of procedures, variables that the ns can handle in a tcl script. Thanks, -as On 14 Mar 2008, at 05:59, SS Mukaka wrote: > > I'm having problems with the above mentioned error when the number > of nodes > in my simulation is more than 30. > I'm simulating my own protocol and it works well with nodes less > than 30... > > > Regards...
[ns] segmentation fault(core dumped) error
I'm having problems with the above mentioned error when the number of nodes in my simulation is more than 30. I'm simulating my own protocol and it works well with nodes less than 30... Regards...
[ns] segmentation fault(core dumped)
I have written and compiled a new protocol for NS2 When I'm running my tcl script i get this error message before the simulation ends [segmentation fault (core dumped)] I have noted also that my nodes are able to send packets but they are not receiving... i dont know if there is a connection between these two errors. Please help
[ns] Segmentation Fault while running DSR simulation
hi, I'm trying to simulate the DSR protocol on NS-2.28. While running the simulation with the ENERGY PARAMETERS set i'm constantly getting a Segmentation Fault. If I remove the energy parameters then the script runs fine. Also, if I change the protocol to AODV or DSDV the script runs fine. Can anyone please advice me on the issue. I've attached the script file. Regards Siddharth - Unlimited freedom, unlimited storage. Get it now
[ns] Segmentation fault in ns
Hi, I have generated a random scenario file and while running the tcl script with different speeds, it gives segmentation fault (with speed 20,25) and with some higher speed it gives Floating point exception error. Please someone give me some guideline if you have any idea regarding this. thanks Rupesh Kumar M.Tech(CSE)
Re: [ns] Segmentation fault with wireless simulation
Hi, Try to change queue type. Segmentation fault will remove. thanks. KHALIL MS COMSATS - Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
Re: [ns] Segmentation fault with wireless simulation
change the ifq to CMUPriQueue. On Jan 7, 2008 7:06 PM, jayachandra gullapalli <[EMAIL PROTECTED]> wrote: > > Hi, > > I was trying an wireless simulation on NS, I encounter this segmentation > fault. I tried to troubleshoot the code but with no success. Could you > please correct if I have some problem with the code. > > The code with which I tried the simulation. > > #Define wirleess scenario parameters > > set val(chan) Channel/WirelessChannel; > set val(prop) Propagation/TwoRayGround1; > set val(netif) Phy/WirelessPhy; > set val(mac) Mac/802_11; > set val(ifq) Queue/DropTail/PriQueue; > set val(ll) LL; > set val(ant) Antenna/OmniAntenna; > set val(ifqlen) 50; > set val(nn) 5; > set val(rp) DSR; > set val(x) 500; > set val(y) 400; > set val(stop) 150; > set ns [new Simulator] > set tracefd [open problem1Trace.tr w] > set windowVsTime2 [open problem1Win.tr w] > set namfd [open problem1Namtrace.nam w] > $ns trace-all $tracefd > $ns namtrace-all-wireless $namfd $val(x) $val(y) > set topo [new Topography] > $topo load_flatgrid $val(x) $val(y) > create-god $val(nn) > $ns node-config -adhocRouting $val(rp) \ > -llType $val(ll) \ > -macType $val(mac) \ > -ifqType $val(ifq) \ > -ifqLen $val(ifqlen) \ > -antType $val(ant) \ > -propType $val(prop) \ > -phyType $val(netif) \ > -channelType $val(chan) \ > -topoInstance $topo \ > -agentTrace ON \ > -routerTrace ON\ > -macTrace OFF \ > -movementTrace ON > for {set i 0} {$i < $val(nn) } {incr i} { > set node_($i) [$ns node] > } > $node_(0) set X_ 5.0 > $node_(0) set Y_ 5.0 > $node_(0) set Z_ 0.0 > $node_(1) set X_ 490.0 > $node_(1) set Y_ 285.0 > $node_(1) set Z_ 0.0 > $node_(2) set X_ 150.0 > $node_(2) set Y_ 240.0 > $node_(2) set Z_ 0.0 > $node_(3) set X_ 495.0 > $node_(3) set Y_ 100 > $node_(3) set Z_ 0.0 > $node_(4) set X_ 495 > $node_(4) set Y_ 395 > $node_(4) set Z_ 0.0 > > $ns at 10.0 "$node_(0) setdest 250.0 250.0 3.0" > $ns at 15.0 "$node_(1) setdest 45.0 285.0 5.0" > $ns at 20.0 "$node_(2) setdest 480.0 300.0 5.0" > $ns at 25.0 "$node_(3) setdest 50.0 150.0 5.0" > $ns at 15.0 "$node_(4) setdest 50.0 50.0 3.0" > #set TCP Connection between node_(0) and node_(1) > set tcp0 [new Agent/TCP/Newreno] > $tcp0 set class_ 2 > set sink0 [new Agent/TCPSink] > $ns attach-agent $node_(0) $tcp0 > $ns attach-agent $node_(1) $sink0 > $ns connect $tcp0 $sink0 > set ftp [new Application/FTP] > $ftp attach-agent $tcp0 > $ns at 10.0 "$ftp start" > #set TCP Connection between node_(0) and node_(4) > set tcp1 [new Agent/TCP/Newreno] > $tcp1 set class_ 2 > set sink1 [new Agent/TCPSink] > $ns attach-agent $node_(0) $tcp1 > $ns attach-agent $node_(4) $sink1 > $ns connect $tcp1 $sink1 > set ftp1 [new Application/FTP] > $ftp1 attach-agent $tcp1 > $ns at 12.0 "$ftp1 start" > #set TCP Connection between node_(3) and node_(2) > set tcp2 [new Agent/TCP/Newreno] > $tcp2 set class_ 2 > set sink2 [new Agent/TCPSink] > $ns attach-agent $node_(3) $tcp2 > $ns attach-agent $node_(2) $sink2 > $ns connect $tcp2 $sink2 > set ftp2 [new Application/FTP] > $ftp2 attach-agent $tcp2 > $ns at 15.0 "$ftp2 start" > proc plotWindow {tcpSource file} { > global ns > set time 0.01 > set now [$ns now] > set cwnd [$tcpSource set cwnd_] > puts $file "$now $cwnd" > $ns at [expr $now+$time] "plotWindow $tcpSource $file" } > $ns at 10.1 "plotWindow $tcp0 $windowVsTime2" > #define node position in NAM > for {set i 0} {$i < $val(nn)} {incr i} { > $ns initial_node_pos $node_($i) 30 > } > for {set i 0} {$i < $val(nn) } {incr i} { > $ns at $val(stop) "$node_($i) reset"; > } > $ns at $val(stop) "$ns nam-end-wireless $val(stop)" > $ns at $val(stop) "stop" > $ns at 150.01 "puts \"end simulation\" ; $ns halt" > proc stop {} { > global ns tracefd namfd > $ns flush-trace > close $tracefd > close $namfd > } > $ns run > > > Your help in this regard would be greatly appreciated. > > Thanks, > Jayachandra. > > > Chat on a cool, new interface. No download required. Go to > http://in.messenger.yahoo.com/webmessengerpromo.php > -- Song Luo Intelligent Automation, Inc.
[ns] Segmentation fault with wireless simulation
Hi, I was trying an wireless simulation on NS, I encounter this segmentation fault. I tried to troubleshoot the code but with no success. Could you please correct if I have some problem with the code. The code with which I tried the simulation. #Define wirleess scenario parameters set val(chan) Channel/WirelessChannel; set val(prop) Propagation/TwoRayGround1; set val(netif) Phy/WirelessPhy; set val(mac) Mac/802_11; set val(ifq) Queue/DropTail/PriQueue; set val(ll) LL; set val(ant) Antenna/OmniAntenna; set val(ifqlen) 50; set val(nn) 5; set val(rp) DSR; set val(x) 500; set val(y) 400; set val(stop) 150; set ns [new Simulator] set tracefd [open problem1Trace.tr w] set windowVsTime2 [open problem1Win.tr w] set namfd [open problem1Namtrace.nam w] $ns trace-all $tracefd $ns namtrace-all-wireless $namfd $val(x) $val(y) set topo [new Topography] $topo load_flatgrid $val(x) $val(y) create-god $val(nn) $ns node-config -adhocRouting $val(rp) \ -llType $val(ll) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType $val(prop) \ -phyType $val(netif) \ -channelType $val(chan) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON\ -macTrace OFF \ -movementTrace ON for {set i 0} {$i < $val(nn) } {incr i} { set node_($i) [$ns node] } $node_(0) set X_ 5.0 $node_(0) set Y_ 5.0 $node_(0) set Z_ 0.0 $node_(1) set X_ 490.0 $node_(1) set Y_ 285.0 $node_(1) set Z_ 0.0 $node_(2) set X_ 150.0 $node_(2) set Y_ 240.0 $node_(2) set Z_ 0.0 $node_(3) set X_ 495.0 $node_(3) set Y_ 100 $node_(3) set Z_ 0.0 $node_(4) set X_ 495 $node_(4) set Y_ 395 $node_(4) set Z_ 0.0 $ns at 10.0 "$node_(0) setdest 250.0 250.0 3.0" $ns at 15.0 "$node_(1) setdest 45.0 285.0 5.0" $ns at 20.0 "$node_(2) setdest 480.0 300.0 5.0" $ns at 25.0 "$node_(3) setdest 50.0 150.0 5.0" $ns at 15.0 "$node_(4) setdest 50.0 50.0 3.0" #set TCP Connection between node_(0) and node_(1) set tcp0 [new Agent/TCP/Newreno] $tcp0 set class_ 2 set sink0 [new Agent/TCPSink] $ns attach-agent $node_(0) $tcp0 $ns attach-agent $node_(1) $sink0 $ns connect $tcp0 $sink0 set ftp [new Application/FTP] $ftp attach-agent $tcp0 $ns at 10.0 "$ftp start" #set TCP Connection between node_(0) and node_(4) set tcp1 [new Agent/TCP/Newreno] $tcp1 set class_ 2 set sink1 [new Agent/TCPSink] $ns attach-agent $node_(0) $tcp1 $ns attach-agent $node_(4) $sink1 $ns connect $tcp1 $sink1 set ftp1 [new Application/FTP] $ftp1 attach-agent $tcp1 $ns at 12.0 "$ftp1 start" #set TCP Connection between node_(3) and node_(2) set tcp2 [new Agent/TCP/Newreno] $tcp2 set class_ 2 set sink2 [new Agent/TCPSink] $ns attach-agent $node_(3) $tcp2 $ns attach-agent $node_(2) $sink2 $ns connect $tcp2 $sink2 set ftp2 [new Application/FTP] $ftp2 attach-agent $tcp2 $ns at 15.0 "$ftp2 start" proc plotWindow {tcpSource file} { global ns set time 0.01 set now [$ns now] set cwnd [$tcpSource set cwnd_] puts $file "$now $cwnd" $ns at [expr $now+$time] "plotWindow $tcpSource $file" } $ns at 10.1 "plotWindow $tcp0 $windowVsTime2" #define node position in NAM for {set i 0} {$i < $val(nn)} {incr i} { $ns initial_node_pos $node_($i) 30 } for {set i 0} {$i < $val(nn) } {incr i} { $ns at $val(stop) "$node_($i) reset"; } $ns at $val(stop) "$ns nam-end-wireless $val(stop)" $ns at $val(stop) "stop" $ns at 150.01 "puts \"end simulation\" ; $ns halt" proc stop {} { global ns tracefd namfd $ns flush-trace close $tracefd close $namfd } $ns run Your help in this regard would be greatly appreciated. Thanks, Jayachandra. Chat on a cool, new interface. No download required. Go to http://in.messenger.yahoo.com/webmessengerpromo.php
[ns] Segmentation fault (core dumped)
"Segmentation fault (core dumped)" what is it? after googling , it's about memory. but how to solve it HELP!! -- jho
[ns] segmentation fault extending ns2 because of more output channels: how to fix it???
Hi everybody, I am extending ns2 and below is my script tcl. I have realized that my tcl script works only with one output stream. For example, If at the script below I take off the "open a file" part and the "puts" function in the finish{} then the tcl script works. Any idea? Thanks Adriano # Create a simulator object set ns [new Simulator] #Open a file set f [open out.tr w] $ns trace-all $f # Open a nam trace file set nf [open out.nam w] $ns namtrace-all $nf # Define a 'finish' procedure proc finish {} { global ns f nf $ns flush-trace close $f close $nf puts "Starting nam..." exec nam out.nam & exit 0 } #Create nodes set node1 [$ns node] set node2 [$ns node] #Create the agent for the first node set dtn1 [new Agent/DTNAgent] #Create another Agent for the second node set dtn2 [new Agent/DTNAgent] #attach the agents to the nodes $ns attach-agent $node1 $dtn1 $ns attach-agent $node2 $dtn2 #Set local region $dtn1 region "REGION1" $dtn2 region "REGION2" #Setup routing table #$dtn1 add "REGION2" $dtn2 1 1 1500 #$dtn2 add "REGION1" $dtn1 1 1 1500 # Set endtime $ns at 100.0 "finish" # Run the simulation $ns run This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
[ns] segmentation fault in the tcl script
Hi, when I write and run my tcl script with puts "Starting Simulation..." or when I open a file for writing with set f [open out.tr w] $ns trace-all $f I get a segmentation fault Does anybody know the reason? Thanks Adriano This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
[ns] Segmentation Fault extending ns2
Hi, I have extended ns2 for dtn simulations. I have also created my classes for routing. I have written my tcl file, see below, and I simply get a segmentation fault, without any explanation... Does anybody have suggestions or got similar problem??? Thank you in advance, Adriano # Create a simulator object set ns [new Simulator] #Create nodes set node1 [$ns node] set node2 [$ns node] #Create the agent for the first node set dtn1 [new Agent/DTNAgent] #Create another Agent for the second node set dtn2 [new Agent/DTNAgent] #attach the agents to the nodes $ns attach-agent $node1 $dtn1 $ns attach-agent $node2 $dtn2 #Set local region $dtn1 region "REGION1" $dtn2 region "REGION2" #Setup routing table $dtn1 add "REGION2" $dtn2 1 1 1500 $dtn2 add "REGION1" $dtn1 1 1 1500 This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
[ns] segmentation fault (2)
Hi All, After modifying aodv.cc and aodv.h and recompiling NS-2.30. When I run make install I got this error; linux-i3km:/usr/share/ns-2.30 # make install for d in /usr/local/man/man1; do \ if [ ! -d $d ]; then \ mkdir -p $d ;\ fi;\ done /usr/bin/install -c -m 755 ns /usr/local/bin /usr/bin/install -c -m 644 ns.1 /usr/local/man/man1 when I run NS I obtained a segmentation fault as follows; [EMAIL PROTECTED]:~/Documents/AODV/simulations> ns aodv-50.tcl num_nodes is set 50 INITIALIZE THE LIST xListHead Loading connection pattern... Loading scenario file... Starting Simulation... channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 SORTING LISTS ...DONE! Segmentation fault [EMAIL PROTECTED]:~/Documents/AODV/simulations> Does anyone know the reason for this or what might have caused the fault to occur. Thanks Regards Olakunle _ Connect to the next generation of MSN Messenger http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
[ns] segmentation fault
Hi All, After modifying aodv.cc and aodv.h and recompiling NS-2.30. I obtained a segmentation fault as follows; [EMAIL PROTECTED]:~/Documents/AODV/simulations> ns aodv-50.tcl num_nodes is set 50 INITIALIZE THE LIST xListHead Loading connection pattern... Loading scenario file... Starting Simulation... channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 SORTING LISTS ...DONE! Segmentation fault [EMAIL PROTECTED]:~/Documents/AODV/simulations> Does anyone know the reason for this or what might have caused the fault to occur. Thanks Regards Olakunle _ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE
Re: [ns] Segmentation Fault in NIST implementation of WiMax module
> Hi All, > > When I run the tcl scripts (e.g. test-be.tcl) provided with the NIST > implementation of WiMax module in NS2, setting the number of nodes (SS) as > 20, the bw_backoff_start_ (of Mac/802_16) as 4 and start the traffic at, > say, 240 and stop the traffic at 350, NS2 crashes with segmentation fault. > > Can anyone provide any inputs on this behavior? Any help is highly > appreciated. > This is a very urgent issue. > > Regards, > Debarshi > >
[ns] segmentation fault with smac
Hi, I am using ns-2.31. I am getting a segmentation fault while running smac for more than 22 nodes. For <= 22 nodes, the simulation runs fine. Other simulations run without problem for large number of nodes. Kindly let me know what is to be done. My OS is ubuntu 7.0 . Thanks and Regards, Shanti.
Re: [ns] Segmentation Fault
Segmentation fault is usually caused by programming error. For example, you define an array int x[10]; Then the statement x[11] = 0; would cause segmentation fault. you have to debug the program in order to solve this. Good Luck Teerawat On 9/30/2007, "Faraz Siddiqui" <[EMAIL PROTECTED]> wrote: > >Hi All > >I am getting segmentation fault when I am defining cbr >start time as $ns at 0.5 "$cbr start" . Anyone has any >idea ?? > >Thanks >Faraz > > > > >Pinpoint customers who are looking for what you sell. >http://searchmarketing.yahoo.com/ >
[ns] Segmentation Fault
Hi All I am getting segmentation fault when I am defining cbr start time as $ns at 0.5 "$cbr start" . Anyone has any idea ?? Thanks Faraz Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/
[ns] segmentation fault
Hello all, I wrote a new agent. this agent has a command{} which receives 6 arguments. I used the following line to pass the arguments to the command{}. "$ns at $now "$source-ad($j) ad-request $j $peak $error $standard-dev" but when I ran tcl script, I received this error: "segmentation fault". i know segmentation fault usually stems from illegal access to the memory but i don't know how i should solve it. can anybody help me about this error?any kind of help. Thanks in advance Regards Elahe - Need a vacation? Get great deals to amazing places on Yahoo! Travel.
Re: [ns] segmentation fault
"segmentation fault" usually stems from illegal access to the memory. check your code to see whether you illegally try to access some memory when it is already deallocated. usually it's because using pointers incorrectly. > Date: Wed, 22 Aug 2007 11:52:11 -0700> From: [EMAIL PROTECTED]> To: > ns-users@ISI.EDU> Subject: [ns] segmentation fault> > > Hello all,> > I wrote > a new agent. this agent has a command{} which receives 6 arguments. I use the > following line to pass the arguments to the command{}.> "$ns at $now > "$source-ad($j) ad-request $j $peak $error $standard-dev"> but when I run my > tcl script. I receive this error:> "segmentation fault"> can anybody help me > about this error?any kind of help.> Thanks in advance> > Regards> Elahe> > > > -> Pinpoint customers who are looking for > what you sell. _ 中国十大热门旅游景点 http://search.msn.com/results.aspx?q=%E4%B8%AD%E5%9B%BD%E5%8D%81%E5%A4%A7%E9%A3%8E%E6%99%AF&mkt=zh-CN&form=QBRE
[ns] segmentation fault
Hello all, I wrote a new agent. this agent has a command{} which receives 6 arguments. I use the following line to pass the arguments to the command{}. "$ns at $now "$source-ad($j) ad-request $j $peak $error $standard-dev" but when I run my tcl script. I receive this error: "segmentation fault" can anybody help me about this error?any kind of help. Thanks in advance Regards Elahe - Pinpoint customers who are looking for what you sell.
Re: [ns] Segmentation fault (core dumped)
Use CMUPriQueue instaed of Queue/DropTail/PriQueue in DSR.tcl Onyekachi wrote: > > > Hello NS-Users, > Please I need urgent help concerning the above-named subject. > I am trying to run a DSR ad-hoc simulation involving 3 mobile nodes. the > tcl script briefly runs but suddenly terminates with the following > error: Segmentation fault (core dumped) > i would appreciate any help to resolve this. > > regards. > > Kachi. > > > -- View this message in context: http://www.nabble.com/Re%3A-Segmentation-fault-%28core-dumped%29-tf4077003.html#a12010973 Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Segmentation fault with WiMAX..
Thomas Michael Bohnert wrote: > > > > You should tell us which module you use. NDSL or NIST? Attached a paper > published in NEW2AN 2007 (www.new2an.org) which deals with such issues. > > Best, > Thomas > NDSL with the packet.h modified.. (before the change of it, the gcc gave me errors and an user send me the modified packet.h that seems to work..) -- For complete analysis I upload this file. Thank you! http://www.nabble.com/file/p11983853/packet.h packet.h -- View this message in context: http://www.nabble.com/Segmentation-fault-with-WiMAX..-tf4191758.html#a11983853 Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Segmentation fault (core dumped)
Please check your tcl script, if you are using DSR routing protocol you must set the interface queue type with CMUPriQueue. Instead of, set opt(ifq)Queue/DropTail/PriQueue; use: set opt(ifq)CMUPriQueue; Hope this helps! Regards, Wayan Onyekachi <[EMAIL PROTECTED]> wrote: Hello NS-Users, Please I need urgent help concerning the above-named subject. I am trying to run a DSR ad-hoc simulation involving 3 mobile nodes. the tcl script briefly runs but suddenly terminates with the following error: Segmentation fault (core dumped) i would appreciate any help to resolve this. regards. Kachi. - Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
Re: [ns] Segmentation fault with WiMAX..
You should tell us which module you use. NDSL or NIST? Attached a paper published in NEW2AN 2007 (www.new2an.org) which deals with such issues. Best, Thomas On Tuesday 31 July 2007 09:08, ComputerScienceStudent wrote: > Hi all! > > I'm doing a work for an universitary course where I've to model a network > via WiMAX; in the specific, I've to substitute the central bottleneck from > wired to wireless. > > The schema is that two nodes send their own packets through the network to > an other node that communicates to the one on the other side; this receive > the data and dispatches bits to the two related nodes to the senders. > > Here I upload my tcl file.. > http://www.nabble.com/file/p11920664/MixMax_Quaglia.tcl MixMax_Quaglia.tcl > > Please, I search help here because nobody can do anything for me in my > university -holidays! :,( -..
[ns] Segmentation fault with WiMAX..
Hi all! I'm doing a work for an universitary course where I've to model a network via WiMAX; in the specific, I've to substitute the central bottleneck from wired to wireless. The schema is that two nodes send their own packets through the network to an other node that communicates to the one on the other side; this receive the data and dispatches bits to the two related nodes to the senders. Here I upload my tcl file.. http://www.nabble.com/file/p11920664/MixMax_Quaglia.tcl MixMax_Quaglia.tcl Please, I search help here because nobody can do anything for me in my university -holidays! :,( -.. -- View this message in context: http://www.nabble.com/Segmentation-fault-with-WiMAX..-tf4191758.html#a11920664 Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Segmentation fault (core dumped)
Hello NS-Users, Please I need urgent help concerning the above-named subject. I am trying to run a DSR ad-hoc simulation involving 3 mobile nodes. the tcl script briefly runs but suddenly terminates with the following error: Segmentation fault (core dumped) i would appreciate any help to resolve this. regards. Kachi.
[ns] Segmentation fault in PacketQueue/Semantic
Dear everyone, I tried to do simulation with the semantic queue in ns2.26. I changed nothing in ns2 original code. I set PacketQueue/Semantic in the tcl script, but got the segmentation fault. By using gdb, i got the following report for error: Program received signal SIGSEGV, Segmentation fault. 0x08054564 in Scheduler::dispatch(Event*, double) () (gdb) bt #0 0x08054564 in Scheduler::dispatch(Event*, double) () #1 0x080544c9 in Scheduler::run() () #2 0x08054665 in Scheduler::command(int, char const* const*) () #3 0x081f28ea in TclClass::dispatch_cmd(void*, Tcl_Interp*, int, char**) () #4 0x081f63e2 in OTclDispatch (cd=0x855c080, in=0x83b2e90, argc=3, argv=0xbfffdf00) at otcl.c:420 #5 0x081fabeb in TclInvokeStringCommand () #6 0x08214d72 in TclExecuteByteCode () #7 0x081fb599 in Tcl_EvalObjEx () #8 0x08214f60 in TclExecuteByteCode () #9 0x081fb599 in Tcl_EvalObjEx () #10 0x082366e5 in TclObjInterpProc () #11 0x08236294 in TclProcInterpProc () #12 0x081f657e in OTclDispatch (cd=0x855c080, in=0x83b2e90, argc=2, argv=0xbfffe750) at otcl.c:463 #13 0x081fabeb in TclInvokeStringCommand () #14 0x08214d72 in TclExecuteByteCode () #15 0x081fb599 in Tcl_EvalObjEx () #16 0x082366e5 in TclObjInterpProc () #17 0x08236294 in TclProcInterpProc () #18 0x081f63e2 in OTclDispatch (cd=0x8559590, in=0x83b2e90, argc=2, argv=0xbfffee20) at otcl.c:420 #19 0x081fabeb in TclInvokeStringCommand () #20 0x0822fde8 in EvalObjv () #21 0x08230477 in Tcl_EvalEx () #22 0x08227ad2 in Tcl_EvalFile () #23 0x0822a5b0 in Tcl_Main () #24 0x0804e6ab in main () #25 0x42015967 in __libc_start_main () from /lib/i686/libc.so.6 Could anybody tell me where's the segmentation fault? Your help is highly appreciated, Min
[ns] segmentation fault in strlen()
Hello, all: When I run ns-2.29.3 with AODV-UU-0.8 ( not aodv), which has segmentation fault at the end of transmission. For example, I set up 60 nodes with 600 transmission, it will be broken with segmentation error. I used gdb, and it shows the phrase of strlen() . I tested all of strlen() functions cross all of files containing this function in each directory, but all of printed values show normal. Can anyone give kindly help? I haven't slept or eaten for almost 2 days, which I got stucked by this fault. Thanks in advance. Celina