Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed CRcvLossList can not remove m_iMaxSeqNo. #2463

Merged
merged 2 commits into from
Sep 27, 2022

Conversation

gou4shi1
Copy link
Contributor

@gou4shi1 gou4shi1 commented Sep 27, 2022

It caused the "No room" issue:

processData: LOSS DETECTED, %: [ {2147483645 1} ] - RECORDING.
...
20:49:09.916010/SRT:RcvQ:w1!W:SRT.br: CRcvBufferNew::dropUpTo: seqno 3 m_iStartSeqNo 3. Nothing to drop.
20:49:09.916022/SRT:RcvQ:w1 D:SRT.xt: ackDataUpTo: %3 -> %2147483647 (-4 packets)
20:49:09.916031/SRT:RcvQ:w1 D:SRT.xt: ACK: clip %2147483647-%2147483647, REVOKED 0 from RCV buffer
...
20:53:59.603949/SRT:RcvQ:w1!W:SRT.qr: @203486701: No room to store incoming packet seqno 8190, insert offset 2. iFirstUnackSeqNo=2147483647 m_iStartSeqNo=8188 m_iStartPos=6659 m_iMaxPosInc=2. Space avail 2/8192 pkts. (TSBPD ready in -182ms, timespan 0 ms). STDCXX_STEADY drift 0 ms.

Previously, the loop of CRcvLossList::remove()

for (int32_t j = seqno1; j < CSeqNo::m_iMaxSeqNo; ++j) {}

excluded m_iMaxSeqNo, which caused m_iRcvLastAck stuck at m_iMaxSeqNo.

Note that if I just modify the < to <=, i will become negative, so I refine it with CSeqNo.

@maxsharabayko maxsharabayko added this to the Next release milestone Sep 27, 2022
@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Sep 27, 2022
Copy link
Collaborator

@maxsharabayko maxsharabayko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gou4shi1 Wow, many thanks for finding and fixing this!

srtcore/buffer_rcv.cpp Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants