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

Mysterious crashing problem



I am having a problem with ns-2 version 2.1b5 crashing in mid simulation with
no error output.  I can supply additional information if it is required.

The simulation is supposed to run for 560 seconds.  It actually runs for 1.55
seconds.

I am unsure as to how to proceed with debugging this problem.

Thanks in Advance!

The following is a backtrace when I break upon a call to
exit():  What is it about ptypes.cc that caused this problem?

1  0x80d89a6 in Tcl_Exit () at gen/ptypes.cc:104
#2  0x80c5330 in Tcl_ExitObjCmd () at gen/ptypes.cc:104
#3  0x80d9744 in TclExecuteByteCode () at gen/ptypes.cc:104
#4  0x80c248c in Tcl_EvalObj () at gen/ptypes.cc:104
#5  0x80f50dc in TclObjInterpProc () at gen/ptypes.cc:104
#6  0x80f4d10 in TclProcInterpProc () at gen/ptypes.cc:104
#7  0x80bcdfc in OTclDispatch (cd=0x966ce80, in=0x823c208, argc=2,
    argv=0xbfffbb20) at otcl.c:421
#8  0x80c1c84 in TclInvokeStringCommand () at gen/ptypes.cc:104
#9  0x80d9744 in TclExecuteByteCode () at gen/ptypes.cc:104
#10 0x80c248c in Tcl_EvalObj () at gen/ptypes.cc:104
#11 0x80f50dc in TclObjInterpProc () at gen/ptypes.cc:104
#12 0x80f4d10 in TclProcInterpProc () at gen/ptypes.cc:104
#13 0x80bcdfc in OTclDispatch (cd=0x965ffc0, in=0x823c208, argc=2,
    argv=0xbfffc444) at otcl.c:421
#14 0x80c1c84 in TclInvokeStringCommand () at gen/ptypes.cc:104
#15 0x80d9744 in TclExecuteByteCode () at gen/ptypes.cc:104
#16 0x80c248c in Tcl_EvalObj () at gen/ptypes.cc:104
#17 0x80c229f in Tcl_Eval () at gen/ptypes.cc:104
#18 0x80c3763 in Tcl_GlobalEval () at gen/ptypes.cc:104
#19 0x80ba65b in Tcl::eval () at gen/ptypes.cc:104
#20 0x80ba727 in Tcl::eval () at gen/ptypes.cc:104
#21 0x80bc10c in Tcl::evalf () at gen/ptypes.cc:104
#22 0x8063f9d in TcpAgent::finish (this=0x966e570) at tcp.cc:971
#23 0x80639b2 in TcpAgent::recv_newack_helper (this=0x966e570, pkt=0x9923ca8)
    at tcp.cc:753
#24 0x8065b57 in RenoTcpAgent::recv (this=0x966e568, pkt=0x9923ca8)
    at tcp-reno.cc:77
#25 0x805451f in Classifier::recv (this=0x9525080, p=0x9923ca8, h=0x0)
    at classifier.cc:135
#26 0x805451f in Classifier::recv (this=0x8352bd0, p=0x9923ca8, h=0x0)
    at classifier.cc:135
#27 0x8052a03 in Connector::send (this=0x83d2390, p=0x9923ca8, h=0x0)
    at connector.h:54
#28 0x8053780 in Trace::recv (this=0x83d2390, p=0x9923ca8, h=0x0)
    at trace.cc:375
#29 0x8052a03 in Connector::send (this=0x83cead8, p=0x9923ca8, h=0x0)
    at connector.h:54
#30 0x81027e1 in TTLChecker::recv (this=0x83cead8, p=0x9923ca8, h=0x0)
    at ttl.cc:81
#31 0x804f2e1 in NsObject::handle (this=0x83cead8, e=0x9923ca8)    
    at object.cc:109
#32 0x804d5d4 in Scheduler::dispatch (this=0x82dc288, p=0x9923ca8,
    t=1.5561127781818258) at scheduler.cc:102
#33 0x804d5fd in Scheduler::dispatch (this=0x82dc288, p=0x9923ca8)
    at scheduler.cc:108
#34 0x804d53d in Scheduler::run (this=0x82dc288) at scheduler.cc:84
#35 0x804d6d8 in Scheduler::command (this=0x82dc288, argc=2, argv=0xbfffcc0c)
    at scheduler.cc:138
#36 0x80bab6d in TclClass::dispatch_cmd () at gen/ptypes.cc:104
#37 0x80bcdfc in OTclDispatch (cd=0x82d8cd8, in=0x823c208, argc=3,
    argv=0xbfffcc48) at otcl.c:421
#38 0x80c1c84 in TclInvokeStringCommand () at gen/ptypes.cc:104
#39 0x80d9744 in TclExecuteByteCode () at gen/ptypes.cc:104
#40 0x80c248c in Tcl_EvalObj () at gen/ptypes.cc:104
#41 0x80d9947 in TclExecuteByteCode () at gen/ptypes.cc:104
#42 0x80c248c in Tcl_EvalObj () at gen/ptypes.cc:104
#43 0x80f50dc in TclObjInterpProc () at gen/ptypes.cc:104
#44 0x80f4d10 in TclProcInterpProc () at gen/ptypes.cc:104
#45 0x80bcf8b in OTclDispatch (cd=0x82d8cd8, in=0x823c208, argc=2,
    argv=0xbfffd948) at otcl.c:464
#46 0x80c1c84 in TclInvokeStringCommand () at gen/ptypes.cc:104
#47 0x80d9744 in TclExecuteByteCode () at gen/ptypes.cc:104
#48 0x80c248c in Tcl_EvalObj () at gen/ptypes.cc:104
#49 0x80f50dc in TclObjInterpProc () at gen/ptypes.cc:104
#50 0x80f4d10 in TclProcInterpProc () at gen/ptypes.cc:104
#51 0x80bcdfc in OTclDispatch (cd=0x82fcbd8, in=0x823c208, argc=2,
    argv=0xbfffe26c) at otcl.c:421
#52 0x80c1c84 in TclInvokeStringCommand () at gen/ptypes.cc:104
#53 0x80d9744 in TclExecuteByteCode () at gen/ptypes.cc:104
#54 0x80c248c in Tcl_EvalObj () at gen/ptypes.cc:104
#55 0x80eac5c in Tcl_EvalFile () at gen/ptypes.cc:104
#56 0x80ca765 in Tcl_SourceObjCmd () at gen/ptypes.cc:104
#57 0x80d9744 in TclExecuteByteCode () at gen/ptypes.cc:104
#58 0x80c248c in Tcl_EvalObj () at gen/ptypes.cc:104
#59 0x80f4bf5 in Tcl_UplevelObjCmd () at gen/ptypes.cc:104
#60 0x80d9744 in TclExecuteByteCode () at gen/ptypes.cc:104
#61 0x80c248c in Tcl_EvalObj () at gen/ptypes.cc:104
#62 0x80f50dc in TclObjInterpProc () at gen/ptypes.cc:104
#63 0x80d9744 in TclExecuteByteCode () at gen/ptypes.cc:104
#64 0x80c248c in Tcl_EvalObj () at gen/ptypes.cc:104
#65 0x80e1b6c in Tcl_RecordAndEvalObj () at gen/ptypes.cc:104
#66 0x80ecc43 in Tcl_Main () at gen/ptypes.cc:104              
#67 0x804aec5 in main (argc=1, argv=0xbffffd04) at tclAppInit.cc:60
#68 0x4014fcb3 in __libc_start_main (main=0x804aeb0 <main>, argc=1,
    argv=0xbffffd04, init=0x804a32c <_init>, fini=0x81191c8 <_fini>,
    rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffcfc)
    at ../sysdeps/generic/libc-start.c:78      

Some investigation:
(gdb) up 38
#38 0x80c1c84 in TclInvokeStringCommand () at gen/ptypes.cc:104
104     EmbeddedTcl et_ns_ptypes(code);
Current language:  auto; currently c++
(gdb) print code
$1 = "\nglobal ptype pvals\nset ptype(error) -1\nset pvals(-1) error\nset ptype(tcp) 0\nset pvals(0) tcp\nset ptype(udp) 1\nset pvals(1) udp\nset ptype(cbr) 2\nset pvals(2) cbr\nset ptype(audio) 3\nset pvals(3) audio\n"...
(gdb)            

#11 0x80f50dc in TclObjInterpProc () at gen/ptypes.cc:104
104     EmbeddedTcl et_ns_ptypes(code);
(gdb) print code
$4 = "\nglobal ptype pvals\nset ptype(error) -1\nset pvals(-1) error\nset ptype(
tcp) 0\nset pvals(0) tcp\nset ptype(udp) 1\nset pvals(1) udp\nset ptype(cbr) 2\n

The following looks like that triggered the final chain of events that resulted
in exit being called by Tcl_Exit.

#22 0x8063f9d in TcpAgent::finish (this=0x966e570) at tcp.cc:971
971             Tcl::instance().evalf("%s done", this->name());