-
Notifications
You must be signed in to change notification settings - Fork 862
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
[core] Fixed group recv read-ready check. #2938
Merged
maxsharabayko
merged 3 commits into
Haivision:master
from
maxsharabayko:hotfix/group-recv-sync
Apr 30, 2024
Merged
[core] Fixed group recv read-ready check. #2938
maxsharabayko
merged 3 commits into
Haivision:master
from
maxsharabayko:hotfix/group-recv-sync
Apr 30, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maxsharabayko
added
Type: Bug
Indicates an unexpected problem or unintended behavior
[core]
Area: Changes in SRT library core
labels
Apr 22, 2024
Some drops still occur. The time base of members is not 100% in sync, e.g. 3 ms difference in this log. 17:35:04.490000/T25804.N:SRT.br: DRIFT=-3061.000000us AVG=-3.076ms, TB: 8D 22:36:47.203323500 [STDY] EXCESS: 0.000000us UPDATED TO:
8D 22:36:47.203323500 [STDY]
...
17:28:01.500000/T42308.N:SRT.ts: @1030351480: tsbpd: PLAYING PACKET seq=1321308536 (belated 2ms)
17:28:01.501000/T42308.N:SRT.ts: @1030351480: tsbpd: no data, scheduling wakeup at ack
17:28:01.501000/T16940.N:SRT.gr: group/recv: 1 RDY: @1030351480:[R]
17:28:01.501000/T42308.N:SRT.ts: @1030351480: tsbpd: WAKE UP!!!
17:28:01.501000/T16940.N:SRT.gr: group/recv: @1030351479: nextSeqNo=1321308535 gap=0 m_iStartSeqNo=1321308535
iFirstNonReadSeqNo=1321308595. (TSBPD ready in 0ms, timespan 122 ms. First pkt ts=13091126, time base=772607203323500).
STDCXX_STEADY drift 0 ms.
17:28:01.501000/T42308.N:SRT.ts: @1030351480: tsbpd: PLAYING PACKET seq=1321308536 (belated 2ms)
17:28:01.501000/T16940!W:SRT.gr: @2104093302 GROUP RCV-DROPPED 1 packet(s): seqno %1321308535 to %1321308535. ReadySockets 2
17:28:01.501000/T16940!W:SRT.gr: @2104093302, member @1030351480: m_iStartSeqNo=1321308537 iFirstNonReadSeqNo=1321308551. (TSBPD
ready in -2ms, timespan 122 ms. First pkt ts=13091234, time base=772607200821000 ns). STDCXX_STEADY drift 0 ms.
17:28:01.501000/T16940!W:SRT.gr: @2104093302, member @1030351479: m_iStartSeqNo=1321308535 iFirstNonReadSeqNo=1321308601. (TSBPD
ready in 0ms, timespan 123 ms. First pkt ts=13091126, time base=772607203323500 ns). STDCXX_STEADY drift 0 ms.
17:28:01.501482 [W] [METRICS] Detected loss of 1 packets (seqno [6206; 6207)) |
maxsharabayko
commented
Apr 26, 2024
maxsharabayko
force-pushed
the
hotfix/group-recv-sync
branch
from
April 26, 2024 09:44
ffc6f3a
to
6c27107
Compare
maxsharabayko
force-pushed
the
hotfix/group-recv-sync
branch
from
April 26, 2024 10:15
6c27107
to
6f7caf5
Compare
maxsharabayko
added a commit
to maxsharabayko/srt
that referenced
this pull request
Apr 30, 2024
A follow-up fix for Haivision#2938.
maxsharabayko
added a commit
to maxsharabayko/srt
that referenced
this pull request
Apr 30, 2024
A follow-up fix for Haivision#2938.
maxsharabayko
added a commit
that referenced
this pull request
Apr 30, 2024
A follow-up fix for #2938.
maxsharabayko
added a commit
that referenced
this pull request
Apr 30, 2024
A follow-up fix for #2938.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
CUDTGroup::recv_WaitForReadReady(..)
function forms the list of read-ready member sockets.If a socket was not signaled as read-ready, its receiver buffer is still checked using the
CRcvBuffer::isRcvDataReady(..)
function. The first mistake is that the current time is not provided as an argument, so it always returns false when TSBPD mode is enabled.Providing the current time greately redeces false drops of packets by a group (in the test setup described in #2937), but still occasional drop happens sometimes.
Therefore a member socket is instead checked for the existence of the very next packet to read.
Fixes #2937.