Comment 3 for bug 573631

Revision history for this message
Daniel Bültmann (daniel.bueltmann) wrote : Re: [openWNS-bugsquad] [Bug 573631] Re: Incorrect behaviour of Segmentation/Reassembly mechanism after dropped PDU

Dear Jan

I think I already had that issue fixed. I think the problem was that we
did store a handle to the queued event.
Check if you have the following, especially the line marked with -------->
void
ReorderingWindow::onTReorderingExpired()
{
    // 3GPP TS 36.322 Section 5.1.2.2.4 (V8.5.0 2009-03)
    MESSAGE_SINGLE(NORMAL, logger_, "onTReorderingExpired: (vrUR = " <<
vrUR_ << " vrUX = " << vrUX_ << ")");

    vrUR_ = nextMissingSegment(Segment(vrUX_ - 1,
wns::ldk::CompoundPtr())).sn();

    updateReassemblyBuffer(vrUR_);

    if (vrUH_ > vrUR_)
    {

--------> reorderingTimer_ =
wns::simulator::getEventScheduler()->scheduleDelay(boost::lambda::bind(&ReorderingWindow::onTReorderingExpired,
this), tReordering_);

        vrUX_ = vrUH_;

        MESSAGE_SINGLE(NORMAL, logger_, "onTReorderingExpired:
tReordering started (vrUX = " << vrUX_ << ")");

    }

}

Regards,
  Daniel

Jan wrote:
> In addition to the previously documented bug, we have identified another
> potential problem related to the t-Reordering timer.
>
> In our simulations we observe that after the first expiration of the
> t-Reordering timer it won't be set again when another segment loss
> occurs.
>
> Here, segment 0 is lost, segment 1 is received and triggers the
> t-Reordering timer for the first time.
>
> 0.0519950) [ WNS] L2.SegAndConcat.SS18.Reordering ReorderingWindow (snFieldLength=20, windowSize_ = 524288)
> ( 0.0519950) [ WNS] L2.SegAndConcat.SS18 SegAndConcat::onFUNCreated()
> ( 0.0519950) [ WNS] L2.SegAndConcat.SS18.Reordering onSegment: New segment 1 (vrUH_ = 0 vrUR_=0 vrUX_ = 0)
> ( 0.0519950) [ WNS] L2.SegAndConcat.SS18.Reordering isExpired: Segment 1 is not expired
> ( 0.0519950) [ WNS] L2.SegAndConcat.SS18.Reordering isConsideredForReordering: Segment 1 is not considered
> ( 0.0519950) [ WNS] L2.SegAndConcat.SS18.Reordering insert: New segment 1
> ( 0.0519950) [ WNS] L2.SegAndConcat.SS18.Reordering insert: Inserting New segment 1
> ( 0.0519950) [ WNS] L2.SegAndConcat.SS18.Reordering isWithinReorderingWindow: Segment 1 is not in window
> ( 0.0519950) [ WNS] L2.SegAndConcat.SS18.Reordering onSegment: Updated vrUH_=2
> ( 0.0519950) [ WNS] L2.SegAndConcat.SS18.Reordering isWithinReorderingWindow: Segment 0 is in window
> ( 0.0519950) [ WNS] L2.SegAndConcat.SS18.Reordering onSegment: tReordering started (vrUX = 2)
> [...]
> later the t-Reordering timer expires and segments from 1 to 15, in this case, are moved to the reassembly buffer:
> ( 0.0659950) [ WNS] L2.SegAndConcat.SS18.Reordering onSegment: finished (vrUH_ = 16 vrUR_=0 vrUX_ = 2)
> ( 0.0669950) [ WNS] L2.SegAndConcat.SS18.Reordering onTReorderingExpired: (vrUR = 0 vrUX = 2)
>
> Now, if we lose another segment (number 16), the timer should be started
> again after segment 17 is received. However, this does not happen:
>
> ( 0.0679950) [ WNS] L2.SegAndConcat.SS18.Reordering onSegment: New segment 17 (vrUH_ = 16 vrUR_=16 vrUX_ = 2)
> ( 0.0679950) [ WNS] L2.SegAndConcat.SS18.Reordering isExpired: Segment 17 is not expired
> ( 0.0679950) [ WNS] L2.SegAndConcat.SS18.Reordering isConsideredForReordering: Segment 17 is not considered
> ( 0.0679950) [ WNS] L2.SegAndConcat.SS18.Reordering insert: New segment 17
> ( 0.0679950) [ WNS] L2.SegAndConcat.SS18.Reordering insert: Inserting New segment 17
> ( 0.0679950) [ WNS] L2.SegAndConcat.SS18.Reordering isWithinReorderingWindow: Segment 17 is not in window
> ( 0.0679950) [ WNS] L2.SegAndConcat.SS18.Reordering onSegment: Updated vrUH_=18
> ( 0.0679950) [ WNS] L2.SegAndConcat.SS18.Reordering isWithinReorderingWindow: Segment 16 is in window
> ( 0.0679950) [ WNS] L2.SegAndConcat.SS18.Reordering onSegment: finished (vrUH_ = 18 vrUR_=16 vrUX_ = 2)
>
> We believe the reason is that in ReorderingWindow::onSegment the timer
> will only be re-set if (reorderingTimer_ ==
> wns::events::scheduler::IEventPtr()). As the reorderingTimer_ never gets
> reset to wns::events::scheduler::IEventPtr(), no new timer will be
> started.
>
> Changing
> if (reorderingTimer_ == wns::events::scheduler::IEventPtr())
>
> to
>
> if (reorderingTimer_ == wns::events::scheduler::IEventPtr() ||
> reorderingTimer_->isFinished())
>
> in ReorderingWindow::onSegment should fix this problem. We will include
> this fix in our patch as well.
>
>