-
Notifications
You must be signed in to change notification settings - Fork 279
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
PR-SCTP issue if start fragment of a data chunk goes missing #286
Comments
You wouldn't send a
This is describes as Fast Retransmission in RFC 4960. |
Hi, the problem is that usrsctp library ignores my TSN=1 and TSN=2 because the library received TSN=4 before (start of a fragmented data chunk) When the library gets my TSNs, the function sctp_flush_reassm_for_str_seq is called and following condition is checked: if (!asoc->idata_supported && !ordered && SCTP_TSN_GT(control->fsn_included, cumtsn)) { control->fsn_included is equal to 4 and cumtsn is equal to 2 and the Forward-TSNs are apparently ignored. Another question is why you implemented express delivery for unfragmented data chunks but not for DataChunk3 or DataChunk5 is the example above since they were received completely. I think there is no reason to keep these data chunks in the queue. Best regards, |
TSN=4 before (start of a fragmented data chunk)
fsn_included means fragment sequence number. Why are you referring to FORWARD-TSN?
The implementation might not be optimal... Best regards
|
Hi Michael,
At the receiving side:
Hopefully the call stack adds some clarity to the problem. Best regards, |
I agree.
OK. I can write a packetdrill script in the next days and test it on the FreeBSD kernel stack, which should behave identical to the usrsctp stack. I'll post it here and will report whether it reproduces the issue you are seeing. Best regards
|
Hi, My application sends: usrsctp receives: Let me know if you need something else. Best Regards, SCTP_DEBUG: SCTP: add HMAC id 1 to list |
The following
Basically, reassembled unordered messages might not get delivered as soon as possible. This is a limitation of the current implementation. I can try to look at removing this limitation... |
Hi, In my tests, using ForwardTSN, the fragmented messages get never delivered, probably because the missing messages never arrive. Thanks again for testing this issue. |
The point is if the first fragment is lost, it is retransmitted by the peer, if it is not abandoned. However, if it is abandoned, you are right, there is a bug. The following scripts does NOT run:
It hangs at the |
That is exactly the problem I am having, nice that you could also reproduce it. |
and FORWARD-TSN. This bug was reported in sctplab/usrsctp#286 for the userland stack. This is joint work with rrs@. MFC after: 1 week git-svn-id: svn+ssh://svn.freebsd.org/base/head@345494 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
and FORWARD-TSN. This bug was reported in sctplab/usrsctp#286 for the userland stack. This is joint work with rrs@. MFC after: 1 week
and FORWARD-TSN. This bug was reported in sctplab/usrsctp#286 for the userland stack. This is joint work with rrs@. MFC after: 1 week git-svn-id: https://svn.freebsd.org/base/head@345494 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
and FORWARD-TSN. This bug was reported in sctplab/usrsctp#286 for the userland stack. This is joint work with rrs@. MFC after: 1 week
and FORWARD-TSN. This bug was reported in sctplab/usrsctp#286 for the userland stack. This is joint work with rrs@. MFC after: 1 week git-svn-id: svn+ssh://svn.freebsd.org/base/head@345494 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
and FORWARD-TSN. This bug was reported in sctplab/usrsctp#286 for the userland stack. This is joint work with rrs@. MFC after: 1 week git-svn-id: svn+ssh://svn.freebsd.org/base/head@345494 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the handling of fragmented unordered messages when using DATA chunks and FORWARD-TSN. This bug was reported in sctplab/usrsctp#286 for the userland stack. This is joint work with rrs@.
Fix the handling of fragmented unordered messages when using DATA chunks and FORWARD-TSN. This bug was reported in sctplab/usrsctp#286 for the userland stack. This is joint work with rrs@. git-svn-id: https://svn.freebsd.org/base/stable/12@347117 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the handling of fragmented unordered messages when using DATA chunks and FORWARD-TSN. This bug was reported in sctplab/usrsctp#286 for the userland stack. This is joint work with rrs@.
Fix the handling of fragmented unordered messages when using DATA chunks and FORWARD-TSN. This bug was reported in sctplab/usrsctp#286 for the userland stack. This is joint work with rrs@. git-svn-id: https://svn.freebsd.org/base/stable/11@347677 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Hi,
I will try to describe the problem I have using an unordered channel either with
DATA_CHANNEL_RELIABLE_UNORDERED or with DATA_CHANNEL_PARTIAL_RELIABLE_REXMIT_UNORDERED.
My SCTP implementation sends:
DataChunk0Fragment0 TSN=0 Start/End
DataChunk1Fragment0 TSN=1 Start
DataChunk1Fragment1 TSN=2 End
DataChunk2Fragment0 TSN=3 Start/End
DataChunk3Fragment0 TSN=4 Start
DataChunk3Fragment1 TSN=5 End
DataChunk4Fragment0 TSN=6 Start/End
DataChunk5Fragment0 TSN=7 Start
DataChunk5Fragment1 TSN=8 End
usrsctp receives: (TSN=1 goes missing which is a start fragment)
DataChunk0Fragment0 TSN=0
DataChunk1Fragment1 TSN=2
DataChunk2Fragment0 TSN=3 (express delivery, highest_tsn_inside_nr_map=3, cumulative_tsn=0)
DataChunk3Fragment0 TSN=4 (Start Flag, fsn_included=4, top=4)
DataChunk3Fragment1 TSN=5
DataChunk4Fragment0 TSN=6 (express delivery, highest_tsn_inside_nr_map=6, cumulative_tsn=0)
DataChunk5Fragment0 TSN=7
DataChunk5Fragment1 TSN=8
I (sender) get following SACK Messages:
CumTsnAck CumTsn=0 Gap Start=2 End=2
CumTsnAck CumTsn=0 Gap Start=2 End=3
CumTsnAck CumTsn=0 Gap Start=2 End=4
CumTsnAck CumTsn=0 Gap Start=2 End=5
CumTsnAck CumTsn=0 Gap Start=2 End=6
CumTsnAck CumTsn=0 Gap Start=2 End=7
CumTsnAck CumTsn=0 Gap Start=2 End=8
My problem is that I have no idea what to send in the ForwardTSN message. I think I tried every possible combination but I never get the right DataChunks.
I would expect to get DataChunk2, DataChunk3, DataChunk4 and DataChunk5 but I get
Could you please give me some advice about the ForwardTSN Message? According to the RFC3758 cumTsn+StartGap-1 should be ok for the receiver.
Best Regards,
Sergio
EDIT: I finally found a working case and this is when I select DATA_CHANNEL_RELIABLE and I send Data Chunks with the Unordered Flag unset.
In this case the receiving queue will not be processed if a fragment gets lost and my ForwardTSN Message (cumTsn+StartGap-1) does what I expected.
The text was updated successfully, but these errors were encountered: