Bug 2628

Summary: Simulation crashes because of an out of range TID
Product: ns-3 Reporter: sebastien.deronne
Component: wifiAssignee: sebastien.deronne
Status: RESOLVED FIXED    
Severity: major CC: ns-bugs, william.r.dieter
Priority: P3    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: script to reproduce the issue
patch to fix segfault

Description sebastien.deronne 2017-01-21 03:57:57 UTC
Created attachment 2752 [details]
script to reproduce the issue

Issue was reported by William Dieter on the forum:
https://groups.google.com/forum/#!topic/ns-3-users/_0GrI6SCC7o

The symptom is a tid of 8 being used to index into an array of aggregate queues of length 8, causing a segementation fault.

Instructions to reproduce:

1. Download the attached wmm-tcp.cc to the scratch directory (or any other convenient place to build it)
2. Run wmm-tcp with

    waf --run "wmm-tcp --nBeStreams=0 --nBkStreams=0 --nViStreams=1 --nVoStreams=0"

On ns-3-dev, wmm-tcp will crash with a SIGSEGV

Script is provided in attachment.
Comment 1 sebastien.deronne 2017-01-21 04:08:45 UTC
Created attachment 2753 [details]
patch to fix segfault

m_currentPacket should not hold received packets.
Patch solves the segfault issue.
Comment 2 sebastien.deronne 2017-01-21 04:11:38 UTC
This can be pushed asap to ns-3-dev, once William Dieter confirms the patch does solve his problem.
Comment 3 William R. Dieter 2017-01-23 16:42:00 UTC
The patch solves this bug.  I tested both debug and optimized builds without seeing this problem.
Comment 4 sebastien.deronne 2017-01-24 03:28:46 UTC
(In reply to William R. Dieter from comment #3)
> The patch solves this bug.  I tested both debug and optimized builds without
> seeing this problem.

Thanks for your feedback, I will deliver the fix later today.
Comment 5 sebastien.deronne 2017-01-24 12:55:39 UTC
Fixed in changeset 12563:5e180d987403