Flow monitor - SIGSIGV Segmentation fault

51 views
Skip to first unread message

Jay Patel

unread,
Jan 25, 2020, 11:11:12 PM1/25/20
to ns-3-users
Hi all,

I added flow-monitor support to my module, compiled successfully but while running the simulation, I had received Segmentation fault. here is the snippet.


PHY 02-01-00: rx power after RX gain = 17.3937 dB re uPa
Calculating SINR:  RxPower = 17.3937 dB.  Effective Rx power 13.8036 dB.  Number of interferers = 2  Interference + noise power = 66.4204 dB.  SINR = -52.6167 dB.
PHY
02-01-00: Starting RX in IDLE mode.  SINR = -52.6167
[Thread 0x7ffff04d7700 (LWP 7542) exited]

Thread 1 "ns3.30-woss-alo" received signal SIGSEGV, Segmentation fault.
0x00007ffff7b29e84 in ns3::Time::Time(ns3::Time const&) ()
   
from /home/jay/Documents/workspace/ns-allinone-3.30/ns-3.30/build/lib/libns3.30-applications-debug.so
(gdb)


I use the general method of passing flow monitor, which is this:
  // Flow monitor
 
Ptr<FlowMonitor> flowMonitor;
 
FlowMonitorHelper flowHelper;
  flowMonitor
= flowHelper.InstallAll();
 
 
Simulator::Stop (m_simTime + Seconds (0.6));

 
Simulator::Run ();
 
  flowMonitor
->SerializeToXmlFile("flow-mon1.xml", true, true);

Any help would be appreciated.

Jay

Adil Alsuhaim

unread,
Jan 28, 2020, 2:00:25 AM1/28/20
to ns-3-users
What line is causing the issue? In gdb, use "bt" to show the stack trace. I'll take a guess that there's probably something that has a value of 0x0 (Null pointer)

Adil

Jay Patel

unread,
Jan 28, 2020, 7:38:40 PM1/28/20
to ns-3-users
Hi Adil,

Thanks for your reply.

Here is the backtrace output from gdb :

(gdb) bt
#0  0x00007ffff7b2b72e in ns3::Time::Time(ns3::Time const&) (this=0x7fffffffbb30, o=...) at ./ns3/nstime.h:148
#1  0x00007ffff743ee28 in ns3::FlowMonitor::CheckForLostPackets() (this=0x0) at ../src/flow-monitor/model/flow-monitor.cc:331
#2  0x00007ffff74403b0 in ns3::FlowMonitor::SerializeToXmlStream(std::ostream&, unsigned short, bool, bool) (this=0x0, os=..., indent=0, enableHistograms=false, enableProbes=false)
    at
../src/flow-monitor/model/flow-monitor.cc:422
#3  0x00007ffff744185a in ns3::FlowMonitor::SerializeToXmlFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, bool)
   
(this=0x0, fileName="WOSS.tr.flowmon", enableHistograms=false, enableProbes=false) at ../src/flow-monitor/model/flow-monitor.cc:519
#4  0x0000555555569752 in Experiment::Run(unsigned int) (this=0x7fffffffda00, param=5) at ../src/woss-ns3/examples/woss-aloha-example.cc:350
#5  0x000055555556b722 in main(int, char**) (argc=2, argv=0x7fffffffdbd8) at ../src/woss-ns3/examples/woss-aloha-example.cc:384

Does this mean I have to make constructor for constant time separately ? Can you please advice on this ?

Thanks in advance.

Jay
Reply all
Reply to author
Forward
0 new messages