[ns] Problems with Pareto Traffic - SEGMENTATION FAULT

Di-Fa Chang difac@aludra.usc.edu
Sun Jan 11 10:55:01 2004


in trace/basetrace.cc, change line 184 to:
nwrk_ = new char[1024];

then rebuild ns2 and see if this hack works.


On Fri, 9 Jan 2004, Edwin Tan wrote:

>
> hello,
>
> I am having problems with even a single Pareto Distibuted Traffic.  I tried
> to look at pareto.cc and make sure variable rng_ is properly defined but
> still get SEGMENTATION Fault.  The following is my traffic generator script
> and when I gdb my script.  Can someone please help me?
>
> TestSuite instproc create-udp-traffic {id src dst start} {
>     $self instvar ns_
>     set udp_($id) [new Agent/UDP]
>     $udp_($id) set fid_ 1
>     $ns_ attach-agent $src $udp_($id)
>     set null_($id) [new Agent/Null]
>     $ns_ attach-agent $dst $null_($id)
>     set pareto [new Application/Traffic/Pareto]
>     $pareto set burst_time_ 731ms
>     $pareto set idle_time_ 385ms
>     $pareto set rate_ 200k
>     $pareto set packetSize_ 100
>     $pareto set shape_ 1.4
>     $pareto attach-agent $udp_($id)
>     $ns_ connect $udp_($id) $null_($id)
>     $ns_ at $start "$pareto start"
> }
>
> #0  0xff0b31f0 in strlen () from /usr/lib/libc.so.1
> #1  0xff106268 in _doprnt () from /usr/lib/libc.so.1
> #2  0xff107d10 in fprintf () from /usr/lib/libc.so.1
> #3  0x00121228 in CMUTrace::format (this=0x6da7a0, p=0x6f62b8,
>     why=0xff143a4c "") at trace/cmu-trace.cc:948
> #4  0x00121400 in CMUTrace::recv (this=0x6da7a0, p=0x6f62b8, h=0x0)
>     at trace/cmu-trace.cc:999
> #5  0x000b1688 in UdpAgent::sendmsg (this=0x6d9ce0, nbytes=100, data=0x0,
>     flags=0x0) at apps/udp.cc:100
> #6  0x000b1ae8 in UdpAgent::sendmsg (this=0x6d9ce0, nbytes=100, flags=0x0)
>     at apps/udp.h:38
> #7  0x000aa1fc in Application::send (this=0x6e8b30, nbytes=100)
>     at apps/app.cc:111
> #8  0x000aa738 in TrafficGenerator::timeout (this=0x6e8b30)
>     at tools/trafgen.cc:74
> #9  0x000aa7ac in TrafficTimer::expire (this=0x6e8b60) at
> tools/trafgen.cc:87
> #10 0x0009e8d8 in TimerHandler::handle (this=0x6e8b60, e=0x6e8b68)
>     at common/timer-handler.cc:74
> #11 0x0009ec04 in Scheduler::dispatch (this=0x46b0e0, p=0x6e8b68,
>     t=0.17132031722151589) at common/scheduler.cc:149
> #12 0x0009eb50 in Scheduler::run (this=0x46b0e0) at common/scheduler.cc:128
> #13 0x0009ecf8 in Scheduler::command (this=0x46b0e0, argc=2,
> argv=0xffbec9cc)
>     at common/scheduler.cc:197
> ---Type <return> to continue, or q <return> to quit---
> #14 0x001a98d4 in TclClass::dispatch_cmd () at nix/nixroute.cc:44
> #15 0x001ac858 in OTclDispatch (cd=0x46a448, in=0x3ee8d0, argc=0,
>     argv=0xffbeca50) at otcl.c:420
> #16 0x001b15d8 in TclInvokeStringCommand () at nix/nixroute.cc:44
> #17 0x001cdfc8 in TclExecuteByteCode () at nix/nixroute.cc:44
> #18 0x001b216c in Tcl_EvalObjEx () at nix/nixroute.cc:44
> #19 0x001ce1e4 in TclExecuteByteCode () at nix/nixroute.cc:44
> #20 0x001b216c in Tcl_EvalObjEx () at nix/nixroute.cc:44
> #21 0x001f44c0 in TclObjInterpProc () at nix/nixroute.cc:44
> #22 0x001f408c in TclProcInterpProc () at nix/nixroute.cc:44
> #23 0x001ac9e4 in OTclDispatch (cd=0x46a448, in=0x3ee8d0, argc=0,
>     argv=0xffbed370) at otcl.c:463
> #24 0x001b15d8 in TclInvokeStringCommand () at nix/nixroute.cc:44
> #25 0x001cdfc8 in TclExecuteByteCode () at nix/nixroute.cc:44
> #26 0x001b216c in Tcl_EvalObjEx () at nix/nixroute.cc:44
> #27 0x001f44c0 in TclObjInterpProc () at nix/nixroute.cc:44
> #28 0x001f408c in TclProcInterpProc () at nix/nixroute.cc:44
> #29 0x001ac858 in OTclDispatch (cd=0x4637f0, in=0x3ee8d0, argc=0,
>     argv=0xffbedaf0) at otcl.c:420
> #30 0x001b15d8 in TclInvokeStringCommand () at nix/nixroute.cc:44
> #31 0x001cdfc8 in TclExecuteByteCode () at nix/nixroute.cc:44
> #32 0x001b216c in Tcl_EvalObjEx () at nix/nixroute.cc:44
> #33 0x001f44c0 in TclObjInterpProc () at nix/nixroute.cc:44
> ---Type <return> to continue, or q <return> to quit---
> #34 0x001f408c in TclProcInterpProc () at nix/nixroute.cc:44
> #35 0x001ac858 in OTclDispatch (cd=0x462980, in=0x3ee8d0, argc=0,
>     argv=0xffbee270) at otcl.c:420
> #36 0x001b15d8 in TclInvokeStringCommand () at nix/nixroute.cc:44
> #37 0x001cdfc8 in TclExecuteByteCode () at nix/nixroute.cc:44
> #38 0x001b216c in Tcl_EvalObjEx () at nix/nixroute.cc:44
> #39 0x001f44c0 in TclObjInterpProc () at nix/nixroute.cc:44
> #40 0x001ecb50 in EvalObjv () at nix/nixroute.cc:44
> #41 0x001ed194 in Tcl_EvalEx () at nix/nixroute.cc:44
> #42 0x001e3d7c in Tcl_EvalFile () at nix/nixroute.cc:44
> #43 0x001e6c7c in Tcl_Main () at nix/nixroute.cc:44
> #44 0x0009af94 in main (argc=0, argv=0xffbef31c) at common/tclAppInit.cc:60
>
> Thank You
> Edwin
>
> _________________________________________________________________
> Get 10mb of inbox space with MSN Hotmail Extra Storage
> http://join.msn.com/?pgmarket=en-sg
>
>