vanet routing compare.cc terminate SIGSEGV error

238 views
Skip to first unread message

Eweka Osazee

unread,
Apr 26, 2020, 6:27:00 AM4/26/20
to ns-3-users
Need urgent Help please with --vanet routing compare.cc terminate SIGSEGV error using scenerio 2, raw file and error from command line and gdb posted, please i have a mid night dead line

Routing Setup for AODV
Command ['/home/princeozed/Downloads/ns-allinone-3.30.1/ns-3.30.1/build/scratch/vanet-routing-compare', '--protocol=2', '--scenario=2'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").

vanet-routing-compare.cc
error.png
gdb result.png

Adesoji Bello

unread,
Apr 26, 2020, 6:39:28 AM4/26/20
to ns-3-users
Hi,

Can you comment out the animation command before the Simulator::Run.

Eweka Osazee

unread,
Apr 26, 2020, 6:57:04 AM4/26/20
to ns-3-users
still the same error nothing changes

Gopal Rawat

unread,
Apr 26, 2020, 8:06:02 AM4/26/20
to ns-3-users

Hi,

You need to ensure that the no of sinks nodes  <= half of total nodes , it will run with no such errors (already suggested in the group before too). You can refer this section for understanding this behavior.

void
RoutingHelper::SetupRoutingMessages (NodeContainer & c,
                                     
Ipv4InterfaceContainer & adhocTxInterfaces)
{
 
// Setup routing transmissions
 
OnOffHelper onoff1 ("ns3::UdpSocketFactory",Address ());
  onoff1
.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1.0]"));
  onoff1
.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0.0]"));

 
Ptr<UniformRandomVariable> var = CreateObject<UniformRandomVariable> ();
  int64_t stream
= 2;
 
var->SetStream (stream);
 
for (uint32_t i = 0; i < m_nSinks; i++)
   
{
     
// protocol == 0 means no routing data, WAVE BSM only
     
// so do not set up sink
     
if (m_protocol != 0)
       
{
         
Ptr<Socket> sink = SetupRoutingPacketReceive (adhocTxInterfaces.GetAddress (i), c.Get (i));
       
}

     
AddressValue remoteAddress (InetSocketAddress (adhocTxInterfaces.GetAddress (i), m_port));
      onoff1
.SetAttribute ("Remote", remoteAddress);

     
ApplicationContainer temp = onoff1.Install (c.Get (i + m_nSinks));
      temp
.Start (Seconds (var->GetValue (1.0,2.0)));
      temp
.Stop (Seconds (m_TotalSimTime));
   
}
}

regards,
G.

Eweka Osazee

unread,
Apr 26, 2020, 9:29:48 AM4/26/20
to ns-3-users
can you please explain a little bit more as my number of sinks nodes was not edited or inputed or suggest what should be edited out or a code to make the sink half my nodes

thanks @Gopal Rawat

Gopal Rawat

unread,
Apr 26, 2020, 10:41:39 AM4/26/20
to ns-3-users

It seems you have not gone through the code completely. If you go thorugh it , you will find the code used has
 
// in VanetRoutingExperiment::VanetRoutingExperiment ()
m_nSinks (10)

and

// in void VanetRoutingExperiment::SetupScenario ()
else if (m_scenario == 2)
    {
     
// Realistic vehicular trace in some roads around the university of Houston
     
// "low density, 17 total vehicles"
      m_traceFile
= "/home/princeozed/mobility.tcl";
      m_logFile
= "vtovpro.log";
      m_mobility
= 1;
      m_nNodes
= 17;  // total number of nodes has been changed here
      m_TotalSimTime
= 20.01;
      m_nodeSpeed
= 20;
      m_nodePause
= 0;
      m_CSVfileName
= "vtov.csv";
      m_CSVfileName
= "vtov2.csv";
   
}

The scenario 2 has total 17 nodes and setup has total 10 sink nodes. Either use 8 or less sink nodes or make total nodes at-least 20 ( whatever suits your application or scenario).

Eweka Osazee

unread,
Apr 26, 2020, 11:05:19 AM4/26/20
to ns-3-users
oh yes i did that a long time ago and just made the sink 6 and still same error, i have looked through before asking @Gopol
thanks


Gopal Rawat

unread,
Apr 26, 2020, 12:41:45 PM4/26/20
to ns-3-users

The error is because m_nSinks still holds the value 10 even after the value is changed. See the section below :

static ns3::GlobalValue g_nSinks ("VRCnSinks",
                                 
"Number of sink nodes for routing non-BSM traffic",
                                  ns3
::UintegerValue (10),
                                  ns3
::MakeUintegerChecker<uint32_t> ());

You can make the same changes here and it should work.

regards,
G.

Eweka Osazee

unread,
Apr 26, 2020, 1:02:48 PM4/26/20
to ns-3-users
Thanks so much @Gopal. 3 straight days resolved finally, God richly bless you and thanks for your time

be safe
Reply all
Reply to author
Forward
0 new messages