[ns] [bug] aodv-rtqueue-timeout

poby pbo@csnet4.cs.tsinghua.edu.cn
Mon Apr 15 18:45:26 2002


[Bug Report]

-----------------------------
Category:  Other
Package:   ns 2.1b8a
OS:        RedHat 7.2
Environment Variables:
LD_LIBRARY_PATH=
TCL_LIBRARY=
TK_LIBRARY=


-----------------------------
Description:

Description of Problem:
In a trace file, the strange lines indicate the bug.
The trace file looks like:
 
s 149.506157000 _1_ MAC  --- 0 AODV 96 [a2 0 1 800] ------- [1:255 0:255 30 0] [0x4 0 [1 3] 60] (REPLY)
r 149.506541667 _0_ MAC  --- 0 AODV 44 [a2 0 1 800] ------- [1:255 0:255 30 0] [0x4 0 [1 3] 60] (REPLY)
s 149.506551667 _0_ MAC  --- 0 MAC 38 [0 1 0 0]
r 149.506566667 _0_ RTR  --- 0 AODV 44 [a2 0 1 800] ------- [1:255 0:255 30 0] [0x4 0 [1 3] 60] (REPLY)
D 149.506566667 _0_ RTR TOUT 3152 ack 60 [0 1 0 800] ------- [0:0 1:0 30 1] [1575 0] 0 0
D 149.506566667 _0_ RTR TOUT 0 tcp 0 [0 0 0 0] ------- [0:0 0:0 0 0] [0 0] 0 0
D 149.506566667 _0_ RTR TOUT 0 tcp 0 [0 0 0 0] ------- [0:0 0:0 0 0] [0 0] 0 0
D 149.506566667 _0_ RTR TOUT 0 tcp 0 [0 0 0 0] ------- [0:0 0:0 0 0] [0 0] 0 0
D 149.506566667 _0_ RTR TOUT 0 tcp 0 [0 0 0 0] ------- [0:0 0:0 0 0] [0 0] 0 0
D 149.506566667 _0_ RTR TOUT 0 tcp 0 [0 0 0 0] ------- [0:0 0:0 0 0] [0 0] 0 0
D 149.506566667 _0_ RTR TOUT 0 tcp 0 [0 0 0 0] ------- [0:0 0:0 0 0] [0 0] 0 0
... ...// and go on forever


We find the bug is in "rtqueue.cc", line 147 should be changed to:

remove_head();   // omit "assert"

Because the option -NDEBUG is set by default in the Makefile of ns, so "assert" and "remove_head" in it will not be executed. This will cause a infinite loop as we can see in the trace file. 

How Easily Reproducible:
(e.g. every time, intermittent, once only, etc.)


Steps to Reproduce:
(describe the minimal set of steps necessary to trigger the bug)
1. 
2. 
3. 


Actual Results:
(describe what the application did after performing the above steps)


Expected Results:
(describe what the application should have done, were the bug not present)


Additional Information:
(the following infomation is helpful to debug:
 1. simulation script, detailed output files, packet trace
 2. patch file if you modify some source code
 3. a backtrace from gdb if you get a segment fault
 If they are big files, PLEASE put them in your web space and
 include the URL here.)