Project

General

Profile

Actions

Bug #32

closed

test_polling_hamburg_port.tcl is broken

Added by Vincenzo Cimino 11 months ago. Updated 11 months ago.

Status:
Closed
Priority:
High
Target version:
Start date:
11/19/2025
Due date:
% Done:

0%

Estimated time:

Description

The script test_polling_hamburg_port.tcl crashes with the following backtrace

Thread 1 "ns" received signal SIGSEGV, Segmentation fault.
0x00007e5237425082 in std::_Rb_tree<int, std::pair<int const, DiscoveryData>, std::_Select1st<std::pair<int const, DiscoveryData> >, std::less<int>, std::allocator<std::pair<int const, DiscoveryData> > >::_M_begin() const () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libMiracle.so
#0  0x00007e5237425082 in std::_Rb_tree<int, std::pair<int const, DiscoveryData>, std::_Select1st<std::pair<int const, DiscoveryData> >, std::less<int>, std::allocator<std::pair<int const, DiscoveryData> > >::_M_begin() const () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libMiracle.so
#1  0x00007e5237422166 in std::_Rb_tree<int, std::pair<int const, DiscoveryData>, std::_Select1st<std::pair<int const, DiscoveryData> >, std::less<int>, std::allocator<std::pair<int const, DiscoveryData> > >::lower_bound(int const&) () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libMiracle.so
#2  0x00007e5237420851 in std::map<int, DiscoveryData, std::less<int>, std::allocator<std::pair<int const, DiscoveryData> > >::lower_bound(int const&) () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libMiracle.so
#3  0x00007e523741f550 in std::map<int, DiscoveryData, std::less<int>, std::allocator<std::pair<int const, DiscoveryData> > >::operator[](int const&) () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libMiracle.so
#4  0x00007e523741d151 in DiscoveryStorage::addEntry(PlugIn const*, int, int, int, char const*, char const*) () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libMiracle.so
#5  0x00007e523741e518 in ClMsgDiscovery::addData(PlugIn const*, int, int, int, char const*, char const*) () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libMiracle.so
#6  0x00007e523741a584 in PlugIn::recvSyncClMsg(ClMessage*) () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libMiracle.so
#7  0x00007e523734d7a4 in PositionDB::recvSyncClMsg(ClMessage*) () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libMiracleBasicMovement.so
#8  0x00007e5237417b57 in ClSAP::sendSynchronousModule(ClMessage*) () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libMiracle.so
#9  0x00007e523742db6d in NodeCore::sendSynchronousClSAP(int, int, ClMessage*) () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libMiracle.so
#10 0x00007e523742e1f0 in NodeCore::synchronousCrLayCommand(ClMessage*) () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libMiracle.so
#11 0x00007e5237417e25 in ClSAP::sendSynchronousClLayer(ClMessage*) () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libMiracle.so
#12 0x00007e523741a85e in PlugIn::sendSyncClMsg(ClMessage*) () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libMiracle.so
#13 0x00007e523369c9cb in UnderwaterPhysical::endRx(Packet*) () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libuwphysical.so
#14 0x00007e52373c329a in MPhyRxTimer::handle(Event*) () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libmphy.so
#15 0x00000000005bc8ef in Scheduler::dispatch(Event*, double) ()
#16 0x00000000005bc7e1 in Scheduler::run() ()
#17 0x00000000005bca23 in Scheduler::command(int, char const* const*) ()
#18 0x00000000008080cc in TclClass::dispatch_cmd(void*, Tcl_Interp*, int, char const**) ()
#19 0x000000000080c7ab in OTclDispatch ()
#20 0x00007e5237bc54eb in TclInvokeStringCommand () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#21 0x00007e5237bc9370 in ?? () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#22 0x00007e5237c0f6b4 in ?? () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#23 0x00007e5237c170e8 in ?? () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#24 0x00007e5237c0f90a in ?? () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#25 0x00007e5237c5348b in TclObjInterpProcCore () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#26 0x00007e5237bc5628 in TclInvokeObjectCommand () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#27 0x000000000080c9fe in OTclDispatch ()
#28 0x00007e5237bc54eb in TclInvokeStringCommand () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#29 0x00007e5237bc9370 in ?? () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#30 0x00007e5237c0f6b4 in ?? () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#31 0x00007e5237c5348b in TclObjInterpProcCore () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#32 0x00007e5237bc5628 in TclInvokeObjectCommand () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#33 0x000000000080c7ab in OTclDispatch ()
#34 0x00007e5237bc54eb in TclInvokeStringCommand () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#35 0x00007e5237bc9370 in ?? () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#36 0x00007e5237bcb2d0 in ?? () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#37 0x00007e5237bcbb83 in Tcl_EvalEx () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#38 0x00007e5237c344b7 in Tcl_FSEvalFileEx () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#39 0x00007e5237c3b03b in Tcl_Main () from /DESERT_Underwater/DESERT_buildCopy_LOCAL/lib/libtcl8.5.so
#40 0x00000000008070ce in nslibmain ()
#41 0x000000000080725b in main ()

The issue seems related with the following lines inside UnderwaterPhysical::endRx(Packet*) method:

ClMsgTriggerStats m;
sendSyncClMsg(&m);

The cross layer message doesn't get correctly initialized and its type is equals to 0.

Actions #1

Updated by Vincenzo Cimino 11 months ago

  • Subject changed from Clmessage discovery is broken to test_polling_hamburg_port.tcl is broken
  • Description updated (diff)
Actions #2

Updated by Vincenzo Cimino 11 months ago

  • Status changed from New to In Progress
Actions #3

Updated by Vincenzo Cimino 11 months ago

The problem seems to be related with the stack creation. Using the WOSS physical layer solves the issue. However, there is another problem with Bathymetry/UMT_CSV: its parameters if not set correctly, triggers the following assert:

ns: ac-toolbox-woss.cpp:169: virtual bool woss::ACToolboxWoss::initCoordZVector(): Assertion `curr_bathy != HUGE_VAL && curr_bathy >= 0' failed.

Since a similar, script already exists (test_csma_aloha_hamburg_port_bathy.tcl), I won't spend any more time on this.

Actions #4

Updated by Vincenzo Cimino 11 months ago

  • Status changed from In Progress to Closed
Actions

Also available in: Atom PDF