Position distibution causes crash in mac layer concerning duration time

47 views
Skip to first unread message

Łukasz M

unread,
Aug 10, 2016, 5:10:58 AM8/10/16
to ns-3-users
Hi,

I have a script with the follow piece of code:
auto positionAllocator = CreateObject<ListPositionAllocator>();
double position = 0.0;
const double distance = 5.0;


for (const auto &network : networks)
{
   
const auto numberOfAps = 1u;
   
const auto numberOfNodes = network.GetNumberOfStations() + numberOfAps;
   
for (auto positionIndex = 0u; positionIndex < numberOfNodes; ++positionIndex)
   
{
        positionAllocator
->Add(Vector(0.0, position, 0.0));
        position
+= distance;
   
}
}


There is one network with 4 stations (and one AP, of course), so:
networks.size() == 1
network
.GetNumberOfStations() == 4

In other words I did something like follow:

positionAllocator->Add(Vector(0.0, 0.0, 0.0)); position += distance;
positionAllocator
->Add(Vector(0.0, 5.0, 0.0)); position += distance;
positionAllocator
->Add(Vector(0.0, 10.0, 0.0)); position += distance;
positionAllocator
->Add(Vector(0.0, 15.0, 0.0)); position += distance;
positionAllocator
->Add(Vector(0.0, 20.0, 0.0)); position += distance;


Great, everything is ok, but when i want to change positions for my needs as follow:
positionAllocator->Add(Vector(5.0,  5.0, 0.0));
positionAllocator
->Add(Vector(0.0,  0.0, 0.0));
positionAllocator
->Add(Vector(10.0, 0.0, 0.0));
positionAllocator
->Add(Vector(10.0, 10.0, 0.0));
positionAllocator
->Add(Vector(0.0,  10.0, 0.0));

I got the crash:
assert failed. cond="duration >= MicroSeconds (0)", file=../src/wifi/model/mac-low.cc, line=2671
terminate called without an active exception


Can anyone could help me? This is weird for me and i have no clue what I did wrong...
Maybe it is a bug..?

BR

Tommaso Pecorella

unread,
Aug 10, 2016, 8:13:20 AM8/10/16
to ns-3-users
Hi,

it could be a new bug or an old bug already patched. Since you didn't say what ns-3 version are you sing, we can't tell. We can't even test your script on the latest ns-3 release, as you didn't attach it. Pity.
I'd strongly suggest to check your script with ns-3-dev.

T.

Łukasz M

unread,
Aug 12, 2016, 11:47:22 AM8/12/16
to ns-3-users
Unfortunately, I can't show my own script, but I have tried recast the ht-wifi-network example to trigger the same failure.
The scenario is very similar to my script, but I don't know if it is the same reason of the assert failure.
It seems that there is a problem with ShortGuardEnabled flag. When the flag is set to "false", the failure appears, otherwise everything is ok.

I attached files, but you have to put udp-client* files in src/applications/model/ directory. The script is in ht-wifi-network.cc file.
ht-wifi-network.cc
udp-client.cc
udp-client.h

Łukasz M

unread,
Aug 12, 2016, 12:10:47 PM8/12/16
to ns-3-users
Version of ns-3 is 3.25.

Tommaso Pecorella

unread,
Aug 12, 2016, 6:48:48 PM8/12/16
to ns-3-users
Hi,

we have a problem... I can't run your script either, because QosTag has been removed from ns-3.
If I remove the priority part, your script runs fine. This suggests that the bug has been found and closed already. problem is: you need to migrate your script to ns-3-dev or (soon) to ns-3-.26.

About the QosTag, it has been removed because packet priority is now set in a different way. I'd suggest to check the TrafficClass documentation in ns-3-dev.

Cheers,

T.

Łukasz M

unread,
Aug 14, 2016, 2:23:55 AM8/14/16
to ns-3-users
I see...

Is there a TrafficClass support for IPv4? Because I have downloaded dev version and made research (grep) for all project and outcomes concerns only IPv6. There is no the IPv4. 

And, by the way, when the release of ns-3.26 will be available?

Thank you for your help.

Tommaso Pecorella

unread,
Aug 14, 2016, 3:12:39 AM8/14/16
to ns-3-users
https://www.nsnam.org/docs/models/html/traffic-control.html

3.26 should be out "soon", we're closing some bugs that need to be handled.

Cheers,

T.
Reply all
Reply to author
Forward
0 new messages