Bug 362 - "Test for possibly unreachable code-- please file a bug report if this is ever hit"
: "Test for possibly unreachable code-- please file a bug report if this is eve...
Status: RESOLVED FIXED
: ns-3
internet-stack
: ns-3-dev
: All All
: P3 normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-09-23 13:02 EDT by
Modified: 2008-10-31 00:58 EDT (History)


Attachments
gustavo's test case (1.46 KB, patch)
2008-10-27 12:45 EDT, Rajib Bhattacharjea
Details | Diff
patch to fix (1.17 KB, patch)
2008-10-29 00:40 EDT, Tom Henderson
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-09-23 13:02:46 EDT
Guess what? :-)

#0  0x00007f54dbb08f62 in ns3::ArpL3Protocol::Lookup (this=0xe4c610,
packet=@0x421e6ed0, destination={m_address = 167837953}, 
    device=@0x421e6ee0, cache=@0x421e6ec0, hardwareDestination=0x421e6fd0) at
../src/internet-stack/arp-l3-protocol.cc:224
224                  NS_FATAL_ERROR ("Test for possibly unreachable code--
please file a bug report if this is ever hit");

In my case, I have a wifi node sending a flow to an AP; after a while I drag
the node out of wifi range, and then after a short time that error occurs.
------- Comment #1 From 2008-09-25 09:09:05 EDT -------
I think I see the problem-- I'll take this bug.
------- Comment #2 From 2008-10-24 13:50:14 EDT -------
Gustavo,
I've spent a couple of hours trying to reproduce this event, and no luck.  Can
you easily provide a test program?

I think it is safe to uncomment that FATAL_ERROR as a workaround.  However, I'd
like to understand how to get to that state in the code. 
------- Comment #3 From 2008-10-27 12:45:38 EDT -------
Created an attachment (id=282) [details]
gustavo's test case
------- Comment #4 From 2008-10-29 00:38:20 EDT -------
So, the reason this triggers in the wifi case, and not the csma case, is that
what is going on in this example is a Wifi::LinkUp() event that triggers an
ArpCache flush.  However, the WaitReplyTimer was left running, leading to the
supposedly "unreachable" state.

The attached patch will cancel the WaitReplyTimer when an ArpCache is flushed. 
The unreachable test can remain to see if we ever get another example.
------- Comment #5 From 2008-10-29 00:40:28 EDT -------
Created an attachment (id=285) [details]
patch to fix
------- Comment #6 From 2008-10-29 06:34:33 EDT -------
+1
------- Comment #7 From 2008-10-31 00:58:08 EDT -------
changeset 761f94afe2a2