Quote:
Originally Posted by knudfl
Post #16, @Beky : Welcome to LQ.
ns2 is ancient. Things that were possible 15 years ago may not work any more.
Besides that, some protocols / some simulations will cause `Segmentation faultī.
If `Segmentation faultī appears after the creation of the trace files, then it can be ignored.
Anyway, your question is not possible to answer without knowing the C++ code and the simulation.tcl .
Suggest : Upload the files to e.g. Dropbox or Google Drive, and post a copy of a shared link.
-
|
Hello Knudfi,
I also have a similar problem at the moment (I am using TCP-Linux module in NS-2.35 on Ubuntu 18.10 ) and I don't know how to solve that, hopefully, you could help us. Please, what would you recommend? see below what I got after backtracing using GDB:
(gdb) run hybic2lnx.tcl
Starting program: /home/name/ns-allinone-2.35/bin/ns hybic2lnx.tcl
cmd select_ca hybic
Program received signal SIGSEGV, Segmentation fault.
0x00000000005ea396 in TracedInt:
perator=(int) ()
(gdb) bt
#0 0x00000000005ea396 in TracedInt:
perator=(int) ()
#1 0x000000000061c766 in LinuxTcpAgent::send_much(int, int, int) ()
#2 0x000000000061bf10 in LinuxTcpAgent::recv(Packet*, Handler*) ()
#3 0x00000000005db1a0 in Classifier::recv(Packet*, Handler*) ()
#4 0x00000000005db1a0 in Classifier::recv(Packet*, Handler*) ()
#5 0x00000000005d7605 in Connector::send(Packet*, Handler*) ()
#6 0x00000000005d936f in Trace::recv(Packet*, Handler*) ()
#7 0x00000000005d7605 in Connector::send(Packet*, Handler*) ()
#8 0x00000000005d7a81 in TTLChecker::recv(Packet*, Handler*) ()
#9 0x00000000005d21b4 in NsObject::handle(Event*) ()
#10 0x00000000005cea9d in Scheduler::dispatch(Event*, double) ()
#11 0x00000000005ce9b5 in Scheduler::run() ()
#12 0x00000000005cebc8 in Scheduler::command(int, char const* const*) ()
#13 0x00000000008431e2 in TclClass::dispatch_cmd(void*, Tcl_Interp*, int, char const**) ()
#14 0x000000000084767b in OTclDispatch (cd=<optimized out>, in=0xb5c140, argc=3, argv=0xb5d530) at otcl.c:455
#15 0x000000000084c80b in TclInvokeStringCommand ()
#16 0x0000000000851428 in TclEvalObjvInternal ()
#17 0x00000000008993fe in TclExecuteByteCode ()
#18 0x000000000089faa9 in TclCompEvalObj ()
#19 0x000000000089936c in TclExecuteByteCode ()
#20 0x00000000008d9266 in TclObjInterpProcCore ()
#21 0x000000000084c952 in TclInvokeObjectCommand ()
#22 0x000000000084780b in OTclDispatch (cd=<optimized out>, in=0xb5c140, argc=2, argv=0xb5d330) at otcl.c:498
#23 0x000000000084c80b in TclInvokeStringCommand ()
#24 0x0000000000851428 in TclEvalObjvInternal ()
#25 0x00000000008993fe in TclExecuteByteCode ()
#26 0x00000000008d9266 in TclObjInterpProcCore ()
#27 0x000000000084c952 in TclInvokeObjectCommand ()
#28 0x000000000084767b in OTclDispatch (cd=<optimized out>, in=0xb5c140, argc=2, argv=0xb5d110) at otcl.c:455
#29 0x000000000084c80b in TclInvokeStringCommand ()
#30 0x0000000000851428 in TclEvalObjvInternal ()
#31 0x0000000000852a1f in TclEvalEx ()
#32 0x0000000000853193 in Tcl_EvalEx ()
#33 0x00000000008bac2a in Tcl_FSEvalFileEx ()
#34 0x00000000008c0b03 in Tcl_Main ()
#35 0x0000000000842151 in nslibmain ()
#36 0x00000000008422c4 in main ()
However, the c code (mytcp.c) of the new protocol compiled successfully and generate the binary file (mytcp.o), but the trace data file is empty. Also, the same .tcl code works and generates trace data when I replaced my modified algorithm with any of the TCP-Linux such as highspeed, which returned the following message at the end;
(gdb) run hybic2lnx.tcl
Starting program: /home/name/ns-allinone-2.35/bin/ns hybic2lnx.tcl
cmd select_ca highspeed
[Inferior 1 (process 13212) exited normally]
Thank you,