Assert from Simulator:Now()

75 views
Skip to first unread message

Jinxue Zhang

unread,
May 28, 2010, 3:22:14 PM5/28/10
to ns-3-...@googlegroups.com
Hi all,
      When I run a application on the AODV MANET, an error is as follows:

assert failed. file=../src/devices/wifi/dcf-manager.cc, line=699, cond="m_lastNavStart < Simulator::Now ()"
Command ['/home/zhang/ns-allinone-3.8/ns-3.8/build/debug/examples/tap/tap-aodv'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").

       The topology is 4X4 matrix nodes with 100m both for x-step and y-step. The mac model is AdhocWifiMac and 802.11a. The routing protocol is AODV. It uses the RealtimeSimulatorImpl simulator.

        Anybody knows what this error means?

        Thanks very much!


         Jinxue

   

Quincy

unread,
May 29, 2010, 8:15:07 AM5/29/10
to ns-3-users
Well, it means it has suffered a segmentation fault, and you should
"run in under a debugger to get more information". It even tells you
how to do it "(./waf --run <program> --command-template="gdb --args %s
<args>)".

The error message already much easier to read than before, when it use
to just say "exited with code -11". (Thanks Gustavo)

http://www.nsnam.org/wiki/index.php/HOWTO_understand_and_find_cause_of_terminated_with_signal_errors

If you still don't know what seg faults are, do a search on the
internet. Try reading a textbook on C++.

Jinxue Zhang

unread,
May 29, 2010, 8:23:32 AM5/29/10
to ns-3-...@googlegroups.com
I have tried it  using the debug mode......but didn't get the userful message.

The error happens because of the assert sentence in line 699 of  file /src/devices/wifi/dcf-manager.cc:  

NS_ASSERT (m_lastNavStart < Simulator::Now ());

I just want to know the cause for m_lastNavStart < Simulator::Now ().

Thanks very much!

Jinxue


--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.


Quincy

unread,
May 29, 2010, 8:39:30 AM5/29/10
to ns-3-users
Try looking at the backtrace ("bt" command in gdb). That should tell
you when (or from where) that line was called. You can also try
stepping through the program (set a break point somewhere in the
program using the "break", then the commands "step" or "next" to go
through line-by-line. "step" will go into a function, "next" will go
to the following line in the current function.

Also, have a look at the how-to page I've linked in the reply, it uses
insight instead of gdb, which might make debugging easier.

SIGSEGV typically happen if you run into memory problems, or if
something hasn't been initialised. Not having seen your code, I'm just
guessing that maybe the simulator hasn't started yet (before
Simulator::Run) when that line was executed - I could well be wrong
though.

Jinxue Zhang

unread,
May 29, 2010, 8:51:49 AM5/29/10
to ns-3-...@googlegroups.com
Well, thanks for Quincy's suggestion, I will do more debug. 

BTW, in this experiment, I make some modification to the TapBridge, and build a 4x4 AODV mobile ad hoc network. 

The simulator seems to startup before run() sicne the system works OK at the beginning. While when there is heavy packet transmission, this kind of error appears, I guess there is something wrong for the real-time schedualer in simulator.


Best wishes
Jinxue



Quincy

unread,
May 29, 2010, 8:52:34 AM5/29/10
to ns-3-users
I've just had a look at the assert.h - I now think the SIGSEGV isn't
actually a normal seg fault - it's just the assertion fail, and the
seg faults occurred because that is how NS_ASSERT stops the program.

It seems that somehow the DcfManager state had been mangled. Can't
tell you any more info than that - we will need to work out how that
state gets scrambled, which I can't do without the code.

You might end up needing to step through the code.

Sagar Abhishek

unread,
Jun 2, 2010, 7:12:45 PM6/2/10
to ns-3-users
did anything come out ?? I have run into the same problem. I placed
nodes randomly and installed applications on some of them to send to
node 0 , all at different times. that is first application stops then
the second starts. It ran for 20 nodes but when I used 100 nodes,i ran
into the same error. Could this be a memory issue? I have a 2gb ram.

Quincy

unread,
Jun 3, 2010, 5:35:36 AM6/3/10
to ns-3-users
What problem do you have? A SIGSEGV, or an assertion failure at the
same file on the same line? Your scenario seems different to Jinxue's.

Abhishek sagar

unread,
Jun 3, 2010, 6:06:13 AM6/3/10
to ns-3-...@googlegroups.com
Exactly the same error as Jinxue mentioned i.e. the assertion failure on the same file on the same line. 
assert failed. file=../src/devices/wifi/dcf-manager.cc, line=699, cond="m_lastNavStart < Simulator::Now ()"
Command ['/home/asagar/ns-allinone-3.8/ns-3.7.1/scratch/hopswireless'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").



On Thu, Jun 3, 2010 at 9:05 AM, Quincy <quinc...@gmail.com> wrote:
What problem do you have? A SIGSEGV, or an assertion failure at the
same file on the same line? Your scenario seems different to Jinxue's.

Quincy

unread,
Jun 3, 2010, 8:02:21 AM6/3/10
to ns-3-users
Can you please raise a bug in Bugzilla? Please also attach the test
case.

Quincy
> > ns-3-users+...@googlegroups.com<ns-3-users%2Bunsubscribe@googlegrou ps.com>
> > .
Reply all
Reply to author
Forward
0 new messages