[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] what a crash ! :-( (bt included)



Hi,

I have a simulation with 500 mobile nodes, each sending data using Application/Traffic/Exponential.
This is the only place where random variables are used:

for {set j 0} {$j < $opt(nn)} {incr j} {
        puts stderr "creating traffic $j"

	set s($j) [new Agent/UDP]
	#$ns_ attach-agent $BS(0) $s($j)  
	$ns_ attach-agent $node_($j) $s($j)  
	$s($j) set packetSize_ 1500

	set null($j) [new Agent/LossMonitor]
	#$ns_ attach-agent $node_($j) $null($j) 
	$ns_ attach-agent $BS(0) $null($j) 
	$ns_ connect $s($j) $null($j)
      
	set exp($j) [new Application/Traffic/Exponential]
	$exp($j) set burst_time_ 1500ms
	$exp($j) set idle_time_ 3000ms
	$exp($j) set rate_ $opt(rate)

  	$exp($j) attach-agent $s($j) 
	$ns_ at $opt(start) "$exp($j) start"    
}

# Tell all nodes when the simulation ends
for {set i 0} {$i < $opt(nn) } {incr i} {
    $ns_ at $opt(stop).0 "$node_($i) reset";
}


After 15.5 seconds I get a crash, see the bt, it happens both on linux and windows at the same point, both with tcl 8.3

#33 0x402d1a8e in __libc_start_main () at libc-start.c:93
#32 0x804ae1b in strcpy () at strcpy.c:43
#31 0x40123bd7 in Tcl_Main () from libtcl8.3.so
#30 ... in Tcl_EvalFile ()
#29 ... in Tcl_EvalEx ()
#28 ... in TclExpandTokenArray ()
#27 ... in TclInvokeStringCommand ()
#26 ... in random ()
#25 ... in TclProcInterpProc ()
#24 ... in TclObjInterpProc ()
#23 ... in Tcl_EvalObjEx ()
#22 ... in TclExecuteByteCode ()
#21 ... in TclInvokeStringCommand ()
#20 ... in random ()
#19 ... in TclProcInterpProc ()
#18 ... in TclObjInterpProc ()
#17 ... in Tcl_EvalObjEx ()
#16 ... in TclExecuteByteCode ()
#15 ... in Tcl_EvalObjEx ()
#14 ... in TclExecuteByteCode ()
#13 ... in TclInvokeStringCommand ()
#12 ... in random ()
#11 ... in random ()
#10 ... in random ()
#9  ... in random ()
#8  ... in random ()
#7  ... in random ()
#6  ... in random ()
#5  ... in random ()
#4  ... in random ()
#3  ... in random ()
#2  ... in __malloc_alloc_template<0>::deallocate ()
#1  ... in __malloc_alloc_template<0>::deallocate ()
#0  ... in __malloc_alloc_template<0>::deallocate ()


I'm clueless, any ideas ?

/me doesn't want to debug tcl :-/

Bye
Alex
--
Free Dmitry Sklyarov ! 
http://www.freesklyarov.org