Encountered a difficult SIGSEGV error using flowmon, traced back to nstime.h. Any suggestions appreciated.

181 views
Skip to first unread message

oleg...@gmail.com

unread,
May 15, 2014, 3:15:49 AM5/15/14
to ns-3-...@googlegroups.com
Hello, I have been using tracemetrics to analyze data of my script, now I want to try using Flow Monitor and I have encountered this problem, I've used Mr Konstantinos lab example http://personal.ee.surrey.ac.uk/Personal/K.Katsaros/media/ns3lab-sol/lab-2-solved.cc as it is very close to what I needed, but running both the example aswell as my script gives me this error, which I traced using gdb as adviced on ns wiki, gdb output is :

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7564ef2 in ns3::Time::Time (this=0x7fffffffce50, o=...
    at ./ns3/nstime.h:175
175    : m_data (o.m_data)
(gdb) where
#0  0x00007ffff7564ef2 in ns3::Time::Time (this=0x7fffffffce50, o=...)
    at ./ns3/nstime.h:175
#1  0x00007ffff40efdba in ns3::FlowMonitor::CheckForLostPackets (this=0x0)
    at ../src/flow-monitor/model/flow-monitor.cc:316
#2  0x00007ffff40f0174 in ns3::FlowMonitor::SerializeToXmlStream (this=0x0, 
    os=..., indent=0, enableHistograms=true, enableProbes=true)
    at ../src/flow-monitor/model/flow-monitor.cc:400
#3  0x00007ffff40f0ef0 in ns3::FlowMonitor::SerializeToXmlFile (this=0x0, 
    fileName=..., enableHistograms=true, enableProbes=true)
    at ../src/flow-monitor/model/flow-monitor.cc:492
#4  0x000000000040d946 in main (argc=1, argv=0x7fffffffdd68)
    at ../scratch/2323.cc:330

line 175 in ~/src/core/model/nstime.h looks like this 

174  inline Time(const Time &o)
175    : m_data (o.m_data)
176  {}

Looking in documentation I've found that m_data contains virtual time value, and my progress on resolving this bug stopped, I would appreciate any suggestion as to why is it occuring and what I can change about it. Thank you.

Tommaso Pecorella

unread,
May 15, 2014, 3:51:29 AM5/15/14
to ns-3-...@googlegroups.com
Hi,

you're looking at the wrong point.

#3  0x00007ffff40f0ef0 in ns3::FlowMonitor::SerializeToXmlFile (this=0x0
    fileName=..., enableHistograms=true, enableProbes=true)
    at ../src/flow-monitor/model/flow-monitor.cc:492
#4  0x000000000040d946 in main (argc=1, argv=0x7fffffffdd68)
    at ../scratch/2323.cc:330

you're using a null pointer in your main at line 330.

T.

oleg...@gmail.com

unread,
May 15, 2014, 4:00:10 AM5/15/14
to ns-3-...@googlegroups.com
Oh my, problem resolved. Thanks :)

четверг, 15 мая 2014 г., 10:51:29 UTC+3 пользователь Tommaso Pecorella написал:

crea...@gmail.com

unread,
Jan 18, 2016, 7:20:33 AM1/18/16
to ns-3-users
hi~ I have a similar problem.Can you tell me how to solve this problem?Thanks

在 2014年5月15日星期四 UTC+8下午4:00:10,Олег Чабан写道:

Tommaso Pecorella

unread,
Jan 18, 2016, 10:00:00 AM1/18/16
to ns-3-users
Hi,

no, you don't have a similar problem. Not more than anyone having a segmentation fault, which is more or less like saying that everyone feeling ill has the same illness.
No matter what, the solution is: learn to use a debugger.

T.
Reply all
Reply to author
Forward
0 new messages