Bug 343 - utils/bench-packets is broken and asserts
utils/bench-packets is broken and asserts
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: general
ns-3-dev
All All
: P3 normal
Assigned To: Mathieu Lacage
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-12 14:48 EDT by Rajib Bhattacharjea
Modified: 2008-10-16 06:44 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rajib Bhattacharjea 2008-09-12 14:48:13 EDT
It looks like this benchmark utility tries to run tests with and without metadata, which became disallowed at some point (here I think http://code.nsnam.org/ns-3-dev/rev/648048bca501).

So it appears that this utility wasn't run in the past year by anyone on the team...this begs the question of why do we have these utilities?  Perhaps they should be part of our validation, either check or regression or something else?
Comment 1 Rajib Bhattacharjea 2008-09-12 14:54:20 EDT
How to reproduce:

./waf --shell
gdb ./build/debug/utils/bench-packets
(gdb) set args --n=100
(gdb) r
Starting program: /home/raj/code.nsnam.org/ns-3-dev/build/debug/utils/bench-packets --n=100
[Thread debugging using libthread_db enabled]
Running bench-packets with n=100
a=100000 packets/s
b=inf packets/s
c=100000 packets/s
d=100000 packets/s
Error: attempting to enable the packet metadata subsystem too late in the simulation, which is not allowed.
A common cause for this problem is to enable ASCII tracing after sending any packets.  One way to fix this problem is to call ns3::PacketMetadata::Enable () near the beginning of the program, before any packets are sent.
[New Thread 0xb6c5eb00 (LWP 9075)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6c5eb00 (LWP 9075)]
0xb7b97a3d in ns3::PacketMetadata::Enable () at ../src/common/packet-metadata.cc:53
53	  NS_ASSERT_MSG (!m_metadataSkipped,
(gdb) bt
#0  0xb7b97a3d in ns3::PacketMetadata::Enable () at ../src/common/packet-metadata.cc:53
#1  0xb7bc092d in ns3::Packet::EnablePrinting () at ../src/common/packet.cc:469
#2  0x0804b604 in main (argc=0, argv=0xbf9315cc) at ../utils/bench-packets.cc:285
Comment 2 Mathieu Lacage 2008-10-16 06:44:36 EDT
changeset 79a21524565f