Observing the simulation, I've seen that this error is raised always in a
line containing "SFs". I've seen that this is something related to DSR
control. Does anyone has any clue to this problem?

[]s,

2009/4/25 Laziz Yunusov <[email protected]>

> Try to use a C++ debugger to identify a source of problem, for example gdb.
> There's also very good GUI for it called DDD. You may also consider memory
> check tool like Valgrind.
> http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging.html<http://tagus.inesc-id.pt/%7Epestrela/ns2/ns2_debugging.html>
> http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging2.html<http://tagus.inesc-id.pt/%7Epestrela/ns2/ns2_debugging2.html>
>
> 2009/4/25 david candeia <[email protected]>
>
>
>>
>> Hi,
>>
>> I'm running some simulations in NS2 using the attached file. When I run a
>> simulation using AODV or DSDV, the trace is created correctly. However,
>> when
>> I change the protocol to DSR (also changing the queue), in the end of the
>> simulation the following memory error is being raised:
>>
>> *** glibc detected *** ns: free(): invalid pointer: 0x08cdbb84 ***
>> ======= Backtrace: =========
>> /lib/tls/i686/cmov/libc.so.6[0xb7bf5a85]
>> /lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7bf94f0]
>> /usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb7d9bb11]
>> ns(_ZN9FlowTable4growEv+0x122)[0x82c2f88]
>> ns(_ZN9FlowTable11createEntryEiit+0x5f)[0x82c3005]
>> ns(_ZN8DSRAgent22sendOutPacketWithRouteER8SRPacketbd+0x4b3)[0x82b57d9]
>> ns(_ZN8DSRAgent18handlePktWithoutSRER8SRPacketb+0x1b0)[0x82b7a4a]
>> ns(_ZN8DSRAgent15sendBufferCheckEv+0xe0)[0x82ba99e]
>> ns(_ZN15SendBufferTimer6expireEP5Event+0x14)[0x82bd266]
>> ns(_ZN12TimerHandler6handleEP5Event+0x39)[0x81a55e9]
>> ns(_ZN9Scheduler8dispatchEP5Eventd+0x92)[0x81a7254]
>> ns(_ZN9Scheduler3runEv+0x2c)[0x81a74a6]
>> ns(_ZN9Scheduler7commandEiPKPKc+0x6b)[0x81a7765]
>> ns(_ZN8TclClass12dispatch_cmdEPvP10Tcl_InterpiPPKc+0x32)[0x83cace6]
>> ns[0x83cfa5c]
>> ns(TclInvokeStringCommand+0x6e)[0x83d682e]
>> ns(TclEvalObjvInternal+0x326)[0x83d8386]
>> ns[0x8402ac1]
>> ns(TclCompEvalObj+0x9c)[0x84072fc]
>> ns[0x8402962]
>> ns(TclCompEvalObj+0x9c)[0x84072fc]
>> ns(TclObjInterpProc+0x2e8)[0x842ff38]
>> ns(TclProcInterpProc+0x82)[0x8430392]
>> ns[0x83cfbe6]
>> ns(TclInvokeStringCommand+0x6e)[0x83d682e]
>> ns(TclEvalObjvInternal+0x326)[0x83d8386]
>> ns[0x8402ac1]
>> ns(TclCompEvalObj+0x9c)[0x84072fc]
>> ns(TclObjInterpProc+0x2e8)[0x842ff38]
>> ns(TclProcInterpProc+0x82)[0x8430392]
>> ns[0x83cfa5c]
>> ns(TclInvokeStringCommand+0x6e)[0x83d682e]
>> ns(TclEvalObjvInternal+0x326)[0x83d8386]
>> ns(Tcl_EvalEx+0x435)[0x83d8925]
>> ns(Tcl_FSEvalFile+0x21b)[0x841f7db]
>> ns(Tcl_Main+0x337)[0x8422e97]
>> ns(nslibmain+0x20)[0x83ca9de]
>> ns(main+0x22)[0x83caa3a]
>> /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb7ba0450]
>> ns(__gxx_personality_v0+0x339)[0x819eec1]
>> ======= Memory map: ========
>> 08048000-08532000 r-xp 00000000 07:00 377131
>> /home/david/ns2/kit-linux/ns-allinone-2.33/ns-2.33/ns
>> 08532000-085cd000 rw-p 004e9000 07:00 377131
>> /home/david/ns2/kit-linux/ns-allinone-2.33/ns-2.33/ns
>> 085cd000-107db000 rw-p 085cd000 00:00 0          [heap]
>> b7a00000-b7a21000 rw-p b7a00000 00:00 0
>> b7a21000-b7b00000 ---p b7a21000 00:00 0
>> b7b26000-b7b65000 r--p 00000000 07:00 1281625
>> /usr/lib/locale/pt_BR.utf8/LC_CTYPE
>> b7b65000-b7b67000 rw-p b7b65000 00:00 0
>> b7b67000-b7b6b000 r-xp 00000000 07:00 1250101
>>  /usr/lib/libXdmcp.so.6.0.0
>> b7b6b000-b7b6c000 rw-p 00003000 07:00 1250101
>>  /usr/lib/libXdmcp.so.6.0.0
>> b7b6c000-b7b83000 r-xp 00000000 07:00 1250931    /usr/lib/libxcb.so.1.0.0
>> b7b83000-b7b84000 rw-p 00016000 07:00 1250931    /usr/lib/libxcb.so.1.0.0
>> b7b84000-b7b85000 r-xp 00000000 07:00 1250929
>> /usr/lib/libxcb-xlib.so.0.0.0
>> b7b85000-b7b86000 rw-p 00000000 07:00 1250929
>> /usr/lib/libxcb-xlib.so.0.0.0
>> b7b86000-b7b87000 rw-p b7b86000 00:00 0
>> b7b87000-b7b89000 r-xp 00000000 07:00 1250090    /usr/lib/libXau.so.6.0.0
>> b7b89000-b7b8a000 rw-p 00001000 07:00 1250090    /usr/lib/libXau.so.6.0.0
>> b7b8a000-b7cd3000 r-xp 00000000 07:00 66275      /lib/tls/i686/cmov/
>> libc-2.7.so
>> b7cd3000-b7cd4000 r--p 00149000 07:00 66275      /lib/tls/i686/cmov/
>> libc-2.7.so
>> b7cd4000-b7cd6000 rw-p 0014a000 07:00 66275      /lib/tls/i686/cmov/
>> libc-2.7.so
>> b7cd6000-b7cd9000 rw-p b7cd6000 00:00 0
>> b7cd9000-b7ce3000 r-xp 00000000 07:00 48972      /lib/libgcc_s.so.1
>> b7ce3000-b7ce4000 rw-p 0000a000 07:00 48972      /lib/libgcc_s.so.1
>> b7ce4000-b7dcc000 r-xp 00000000 07:00 1248811
>>  /usr/lib/libstdc++.so.6.0.9
>> b7dcc000-b7dcf000 r--p 000e8000 07:00 1248811
>>  /usr/lib/libstdc++.so.6.0.9
>> b7dcf000-b7dd1000 rw-p 000eb000 07:00 1248811
>>  /usr/lib/libstdc++.so.6.0.9
>> b7dd1000-b7dd7000 rw-p b7dd1000 00:00 0
>> b7dd7000-b7dfa000 r-xp 00000000 07:00 66279      /lib/tls/i686/cmov/
>> libm-2.7.so
>> b7dfa000-b7dfc000 rw-p 00023000 07:00 66279      /lib/tls/i686/cmov/
>> libm-2.7.so
>> b7dfc000-b7dfe000 r-xp 00000000 07:00 66278      /lib/tls/i686/cmov/
>> libdl-2.7.so
>> b7dfe000-b7e00000 rw-p 00001000 07:00 66278      /lib/tls/i686/cmov/
>> libdl-2.7.so
>> b7e00000-b7e14000 r-xp 00000000 07:00 66281      /lib/tls/i686/cmov/
>> libnsl-2.7.so
>> b7e14000-b7e16000 rw-p 00013000 07:00 66281      /lib/tls/i686/cmov/
>> libnsl-2.7.so
>> b7e16000-b7e19000 rw-p b7e16000 00:00 0
>> b7e19000-b7efd000 r-xp 00000000 07:00 1250084    /usr/lib/libX11.so.6.2.0
>> b7efd000-b7f00000 rw-p 000e4000 07:00 1250084    /usr/lib/libX11.so.6.2.0
>> b7f00000-b7f0d000 r-xp 00000000 07:00 1250105    /usr/lib/libXext.so.6.4.0
>> b7f0d000-b7f0e000 rw-p 0000d000 07:00 1250105    /usr/lib/libXext.so.6.4.0
>> b7f12000-b7f13000 rw-p b7f12000 00:00 0
>> b7f13000-b7f1a000 r--s 00000000 07:00 1248585
>> /usr/lib/gconv/gconv-modules.cache
>> b7f1a000-b7f1c000 rw-p b7f1a000 00:00 0
>> b7f1c000-b7f1d000 r-xp b7f1c000 00:00 0          [vdso]
>> b7f1d000-b7f37000 r-xp 00000000 07:00 49029      /lib/ld-2.7.so
>> b7f37000-b7f39000 rw-p 00019000 07:00 49029      /lib/ld-2.7.so
>> bf800000-bf815000 rw-p bffeb000 00:00 0          [stack]
>>
>>
>> Does anyone have any idea about what should I do?
>>
>> []s,
>>
>>
>> --
>> David Candeia M Maia - http://davcandeia.googlepages.com/
>> Undergraduate student at Federal University of Campina Grande
>> OurGrid Team Member - www.ourgrid.org
>> Paraíba - Brazil
>>
>
>


-- 
David Candeia M Maia - http://davcandeia.googlepages.com/
Undergraduate student at Federal University of Campina Grande
OurGrid Team Member - www.ourgrid.org
Paraíba - Brazil

Reply via email to