Bugs in my code


Cronologico Percorso di conversazione 
  • From: Michael Welzl < >
  • To:
  • Subject: Bugs in my code
  • Date: Tue, 19 Dec 2017 11:08:01 +0100

Hi,

If anyone stumbles over bugs in my code when testing it, I’d greatly 
appreciate being told !!

I noticed the following things when testing it "in real life”:

- a problem with SACK: this assert can fail:
NS_ASSERT ((*(m_sentList.begin ()))->m_sacked == false);
…  in the file tcp-tx-buffer.cc.

- when pacingDelay becomes zero, we get an endless loop (or, in real-life 
tests, a simple crash) - because ns-3 wants to endlessly schedule something 
at the same time.
This can happen because the calculation yields something close to zero (few 
packets over a large interval, something like that). As a quick fix, I added 
this line in my test script just above Simulator::Run():
    Time::SetResolution(ns3::Time::PS);
… but this doesn’t really solve the problem for all cases. I think I need to 
add a rule in the pacing logic to say, when the result is zero, simply don’t 
delay anything instead of trying to schedule.

I’ll look at these bugs as soon as I can, but if someone else feels like 
fixing, by all means go ahead!
…and if you detect more, please do tell me!

Meanwhile, I think for tests it’s safer to turn off SACK.

Cheers,
Michael




  • Bugs in my code, Michael Welzl

Archivio con motore MhonArc 2.6.16.

§