NS-3.21 Mesh example error

223 views
Skip to first unread message

Luca Beltramelli

unread,
Dec 8, 2014, 7:55:50 AM12/8/14
to ns-3-...@googlegroups.com
Greetings,
I'm working with NS3 and I have to simulate a mesh network. I'm fairly new to this simulator so be patient.
When I try to run the file mesh.cc which I have found inside /src/mesh/examples/ an error occurs:

Waf: Entering directory `/ns3meshtest/ns-allinone-3.21/ns-3.21/build'
Waf: Leaving directory `/ns3meshtest/ns-allinone-3.21/ns-3.21/build'
'build' finished successfully (1.732s)
assert failed. cond="m_supportedRates->m_nRates + length <= MAX_SUPPORTED_RATES", file=../src/wifi/model/supported-rates.cc, line=214
terminate called without an active exception
Command ['/ns3meshtest/ns-allinone-3.21/ns-3.21/build/scratch/mesh'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").

I have  tried to run the following command:
./waf configure --enable-test --enable-examples

And these are the results:
...
...
...
317 of 322 tests passed (317 passed, 3 skipped, 0 failed, 2 crashed, 0 valgrind errors)
List of SKIPped tests: ns3-tcp-cwnd ns3-tcp-interoperability nsc-tcp-loss
List of CRASHed tests: devices-mesh-dot11s-regression src/mesh/examples/mesh


I don't have this kind of problem running the other example files, it seems strictly related with mesh networks only.
I have also tried to use older version of NS3 finding the same problem both in 3.21 and 3.19 while, back in version 3.17 the error disappears.
Have you got any suggestion on how to solve the error?

Thanks for helping
Regards,
Luca

Tommaso Pecorella

unread,
Dec 8, 2014, 8:17:24 AM12/8/14
to ns-3-...@googlegroups.com
Hi,

the tests failing are quite strange. Did you modify any file in src ?
About the error, it doesn't seems to be there in ns-3-dev. I remember that there was some bugs related to Wi-Fi supported rates, especially for 802.11n.
As a consequence, I'd suggest to try with ns-3-dev if you don't mind.

Let us know the results. If it still fails, please provide further info, such as:
- the files you modified (if any)
- your compiler version (gcc --version)
- your OS info (uname -a)

Thanks,

T

Luca Beltramelli

unread,
Dec 8, 2014, 8:58:40 AM12/8/14
to ns-3-...@googlegroups.com
Thank you Tommaso for the quick reply.

I have tried as you suggested to use the development version of ns-3 but the results are the same:

Waf: Leaving directory `/ns3dev/ns-3-dev/build'
'build' finished successfully (6m48.838s)

assert failed. cond="m_supportedRates->m_nRates + length <= MAX_SUPPORTED_RATES", file=../src/wifi/model/supported-rates.cc, line=214
terminate called without an active exception
Command ['/ns3dev/ns-3-dev/build/scratch/mesh'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").

  • I haven't modified any file for this installation, even though I have multiple version of NS3 on my PC some of which I modified. Every installation have its own folder though. Do you think this may be the problem?;
  • gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2;
  • Linux luca-HP-EliteBook-8460p 3.13.0-40-generic #69-Ubuntu SMP Thu Nov 13 17:56:26 UTC 2014 i686 i686 i686 GNU/Linux;
I'm sure I am doing something wrong because I have not been able to find a similar problem inside the ns-3-users group.
Let me know if you have any suggestions.
Thanks,
Luca

Tommaso Pecorella

unread,
Dec 8, 2014, 9:33:21 AM12/8/14
to ns-3-...@googlegroups.com
Hi,

yes, it's a problem in your setup. But I don't know what may be (yet). Do you have an "installed" ns-3 perhaps ? I.e., one where you used waf install ?
In other terms, did you install any ns-3 via apt-get (or any other package manager), or did you "install" ns-3 ?
The installed libraries may be getting in your way, and being used in place of the new ones.

Cheers,

T.

Luca Beltramelli

unread,
Dec 8, 2014, 10:24:01 AM12/8/14
to ns-3-...@googlegroups.com
Hi,
as I mentioned before I'm a big noob of ns-3. I'm keeping more version of ns-3 on the same PC at the same time because I'm trying to modify the WiFi modules. I would avoid to commit all the modification on the same installation. Instead I'm trying to tweak each module and move to the next one using another installation folder. In this way I hope to avoid compromise the work previously done.
Having said that I don't remember how I installed the oldest ns-3, the latest ones were installed following the wiki. (using tarball and building through ./build.py)
Anyway if I try to use:

sudo apt-get remove ns3

I get:

Package 'ns3' is not installed, so not removed

Shall I try to remove every single ns-3 folder on the PC or do you think there is another way around?

Thanks,
Luca

Tommaso Pecorella

unread,
Dec 8, 2014, 10:25:33 AM12/8/14
to ns-3-...@googlegroups.com
Hangout...

T.

Tom Henderson

unread,
Dec 8, 2014, 5:05:59 PM12/8/14
to ns-3-...@googlegroups.com
On 12/08/2014 05:58 AM, Luca Beltramelli wrote:
> Thank you Tommaso for the quick reply.
>
> I have tried as you suggested to use the dev/elopment version of ns-3
> but the results are the same:
>
> Waf: Leaving directory `/ns3dev/ns-3-dev/build'
> 'build' finished successfully (6m48.838s)
> assert failed. cond="m_supportedRates->m_nRates + length <=
> MAX_SUPPORTED_RATES", file=../src/wifi/model/supported-rates.cc, line=214
> terminate called without an active exception
> Command ['/ns3dev/ns-3-dev/build/scratch/mesh'] terminated with signal
> SIGIOT. Run it under a debugger to get more information (./waf --run
> <program> --command-template="gdb --args %s <args>")./
>
> * I haven't modified any file for this installation, even though I
> have multiple version of NS3 on my PC some of which I modified.
> Every installation have its own folder though. Do you think this may
> be the problem?;
> * /gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2/;
>
> * /Linux luca-HP-EliteBook-8460p 3.13.0-40-generic #69-Ubuntu SMP Thu
> Nov 13 17:56:26 UTC 2014 i686 i686 i686 GNU/Linux/;
>
> I'm sure I am doing something wrong because I have not been able to find
> a similar problem inside the ns-3-users group.
> Let me know if you have any suggestions.


You are probably hitting this bug:

https://www.nsnam.org/bugzilla/show_bug.cgi?id=1770

If you are getting it for non-optimized build, then that would be a new
condition that we're unaware of. If you are getting it for optimized
build, then the workaround is to lower the optimization level to -O1.

To lower this value, you can edit the 'wscript' file as follows, perform
a './waf clean', then another './waf build':

@@ -46,7 +46,7 @@
cflags.profiles = {
# profile name: [optimization_level, warnings_level, debug_level]
'debug': [0, 2, 3],
- 'optimized': [3, 2, 1],
+ 'optimized': [1, 2, 1],
'release': [3, 2, 0],
}
cflags.default_profile = 'debug'


I started to debug it (notes in the tracker) but haven't returned to it
lately.

- Tom



Luca Beltramelli

unread,
Dec 9, 2014, 3:23:08 AM12/9/14
to ns-3-...@googlegroups.com
Hi Tom,
I don't remember using the optimized build, anyway I have done as you said, I modified the 'wscript' file and then I've built in optimized mode.
Alas, when I've tried to simulate 'mesh.cc' the error was still there.
Regards,
Luca
Message has been deleted

Marwa Dammak

unread,
Jun 20, 2016, 8:33:58 PM6/20/16
to ns-3-users
Hi, 
i'm facing the same problem with mesh.cc. Did you find the solution? 
Thanks in advance.
Marwa

Tom Henderson

unread,
Jun 21, 2016, 10:00:05 AM6/21/16
to ns-3-...@googlegroups.com
On 06/20/2016 05:33 PM, Marwa Dammak wrote:
> Hi,
> i'm facing the same problem with mesh.cc. Did you find the solution?
> Thanks in advance.
> Marwa

This error is fixed in more recent versions of the simulator, with an
updated mesh module.

- Tom
Reply all
Reply to author
Forward
0 new messages