perhaps, the following change can fix your problem..
Pls look into zrp.cc file - for ZRPAgent constructor... Change 1st argument
from PT_TCP to PT_ZRP..
- Brijesh
oooh god wrote:
Hi all,
I am simulating zrp but it ends with segmentation fault. Other protocols
like AODV, DSR(with slight change in ifq) , TORA and DSDV are simulating
properly with trace file. But only ZRP is not working. I manually made the
changes in the ns-2 code where ever it is asked. If it would have problem
with some code then it should be an error isnt it?
Anyway i am attaching my simulation result, script and code are the one
which comes with the code from the cornel wnl site. I have not made
changes to zrp code but made to ns-2.29. One more thing...i just replaced
tcp sources to udp and no of nodes are 3.
I think its problem with RAM. I am using 256 MB RAM so i need suggestion
whether to buy more 256MB. If anyone has done this and has not worked can
let me know. If anyone got success in doing so, please reply to share ok.
Here is the result. I am also attaching gdb trace, even i tried with break
points..but unable to figure out. It works fine in initial trace...but you
proceed pointer location changes to 0x1 and there it stops by segmentation
fault. In DSR also i had almost same trace but by changing ifq to
CMUPriQueue it worked fine...
I will be obliged to get information of any sort relating to zrp either
solved or unsolved.
Thanks
For gdb trace see below.
irfanjun...@warangal:~/ns-allinone-2.29/ns-2.29 ns
~/ns_prac/wireless_4.tcl
num_nodes is set 3
_ 0_ [0.00] | Node 0 was created. ! Neighbor Table: empty ! LinkTable:
empty ! Routes empty Periph[]
INITIALIZE THE LIST xListHead
_ 1_ [0.00] | Node 1 was created. ! Neighbor Table: empty ! LinkTable:
empty ! Routes empty Periph[]
_ 2_ [0.00] | Node 2 was created. ! Neighbor Table: empty ! LinkTable:
empty ! Routes empty Periph[]
Loading connection pattern...
Loading scenario file...
_ 0_ [0.001019] | Node 0 neighborscan-timer timed out, but neighbor table
is empty. Next scan at 11.001019 sec.! Neighbor Table: empty ! LinkTable:
empty ! Routes empty Periph[]
.
.
.
.
_ 1_ [1.967914] | Node 1 received an ack (seq no. 1) from Node 0. | Node 1
added new neighbor Node 0, will expire at 16.967914 sec, lastack timer
will expire at 3.967914 sec.| Node 1 sent update (seq no. 2) about new
neighbor Node 0. ! Neighbor Table: 0 ! LinkTable: 0=1 ! Routes [0 1 ]
Periph[]
_ 0_ [2.062929] | Node 0 received update (seq no. 2) sent from Node 1
originating from Node 1 (contains: 1=0 ). | Node 0 forwarded update (seq
no. 2) sent from Node 1 originating from Node 1 (contains: 1=0 ). ttl=4!
Neighbor Table: empty ! LinkTable: 1=0 ! Routes [1 0 ] Periph[]
Segmentation fault (core dumped)
irfanjun...@warangal:~/ns-allinone-2.29/ns-2.29 gdb -c core
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB. Type show warranty for
details.
This GDB was configured as i586-suse-linux.
(no debugging symbols found)
Using host libthread_db library /lib/tls/libthread_db.so.1.
Core was generated by `ns /home/irfanjunedi/ns_prac/wireless_4.tcl'.
Program terminated with signal 11, Segmentation fault.
#0 0x0805b296 in ?? ()
(gdb) file ns
Reading symbols from /home/irfanjunedi/ns-allinone-2.29/ns-2.29/ns...done.
(gdb) bt
#0 0x0805b296 in Packet::access (this=0x1, off=848) at packet.h:381
#1 0x08220321 in hdr_zrp::access (p=0x1) at zrp.h:112
#2 0x0821cdcb in ZRPAgent::do_update (this=0x86413a0) at zrp.cc:1123
#3 0x0821cfa7 in ZRPPeriodicUpdateTimer::handle (this=0x8641458,
e=0x8641460)
at zrp.cc:1110
#4 0x08053417 in Scheduler::dispatch (this=0x8476880, p=0x8641460,
t=2.3974663605152173) at scheduler.cc:150
#5 0x08053442 in Scheduler::run (this=0x8476880) at scheduler.cc:129
#6 0x0805361b in Scheduler::command (this=0x8476880, argc=2,
argv=0xbfbebab0)
at scheduler.cc:198
#7 0x08269b74 in TclClass::dispatch_cmd ()
#8 0x0826d850 in OTclDispatch (cd=value optimized out, in=0x84542f8,
argc=3, argv=0xbfbebafc) at otcl.c:434
#9 0x08271fd7 in TclInvokeStringCommand ()
#10 0x08273706 in TclEvalObjvInternal ()
#11 0x08299e3d in TclExecuteByteCode ()
#12 0x082a027c in TclCompEvalObj ()
#13 0x08299f25 in TclExecuteByteCode ()
#14 0x082a027c in TclCompEvalObj ()
#15 0x082c6ec9 in TclObjInterpProc ()
#16 0x082c7292 in TclProcInterpProc ()
#17 0x0826d999 in OTclDispatch (cd=value optimized out, in=0x84542f8,
argc=2, argv=0xbfbec6ac) at otcl.c:477
#18 0x08271fd7 in TclInvokeStringCommand ()
#19 0x08273706 in TclEvalObjvInternal ()
#20 0x08299e3d in TclExecuteByteCode ()
#21 0x082a027c in TclCompEvalObj ()
#22 0x082c6ec9 in