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

[BUG] Message out-of-order mode: should not use first_seq to update group read state #2004

Closed
gou4shi1 opened this issue May 16, 2021 · 2 comments
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@gou4shi1
Copy link
Contributor

Describe the bug
In file mode, message api, inorder set to false, group receiver can read messages out of order, then update m_RcvBaseSeqNo beyond first_seq, then m_parent->m_GroupOf->updateReadState(m_SocketID, first_seq) will keep fail.

To Reproduce
Use file mode, message api, inorder false, group broadcast send, group receiver.

Expected behavior
Group receiver should always be marked as readable as soon as some messages received.

Desktop (please provide the following information):

  • OS: Linux
  • SRT Version / commit ID: master/88309439
@gou4shi1 gou4shi1 added the Type: Bug Indicates an unexpected problem or unintended behavior label May 16, 2021
@ethouris
Copy link
Collaborator

Wait! Nice that you found it, but we have never tested the groups in the file/message mode. It was intended to be used only in live mode.

The problem here is that this is likely not solvable, at least not in the current buffer implementation. This is because the group reader is currently implemented in the "application style", that is, it simply treats member links as independent links that just have the sequence number synchronization (that is, the packet with the same payload will have the same sequence number in all links), and this sequence synchronization will be used to make the group reader go forward on every particular link. The base condition for this thing to work is that sequence numbers from the read packets are MONOTONIC, and with a possibility to read messages out of order it definitely won't be. So this read-readiness problem is not the only problem here.

The problem is solvable in general, but it requires some of the key parts to be reimplemented, so for the time being it must be put aside.

@gou4shi1
Copy link
Contributor Author

LOL, but "group reader ignore old messages" is ok for my usecase, so I temporarily use last_seq (instead or first_seq) to update group read state.

@maxsharabayko maxsharabayko added this to the v1.5.0 milestone May 17, 2021
@maxsharabayko maxsharabayko added the [core] Area: Changes in SRT library core label May 17, 2021
@mbakholdina mbakholdina modified the milestones: v1.5.0, v1.4.5 Apr 13, 2022
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 a pull request may close this issue.

4 participants