-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
EOF returns earlier than the last message on receipt of Reset #652
EOF returns earlier than the last message on receipt of Reset #652
Comments
Related issues: Race condition in exsiting tests (in pion/webrtc - datachannel tests)Lines 38 to 44 in 75a1299
Some tests expects the first datachannel opened is the one the test tried to open and cash the pointer in the test, but the first one opened may be the one created by the above code, causing unexpected behavior with race conditions. All the tests using the above code should check the data channel label always. On receipt of EOS, pion/datachannel closes the outgoing channelThis code should be removed: It is the requirement from libp2p that even EOF is received on a datachannel, the datachannel be available for write until the app calls Close on the datachannel. (in the context of detached mode) |
Current pion/sctp has a few problems which prevent 'reset' transmission from correctly causing EOF on the other end: (1) Bug with a comparison between senderLastTSN and peerLastTSN. A PR will follow! |
Relates to pion/webrtc#652
Relates to pion/webrtc#652
The fixes yield much higher success ratio (90%) but it still occasionally fail.
@backkem do you have any thoughts? (I feel like I've been in a long and deep rabbit hole - just digging deeper and never been able to come out of it... lol) |
Added another ping-pong test without using detach Resolves #652
Relates to pion/webrtc#652
Relates to pion/webrtc#652
Relates to pion/webrtc#652
Relates to pion/webrtc#652
Relates to pion/webrtc#652
Your environment.
What did you do?
libp2p test (SubTestPingPong) is failing.
The test uses ioutil.ReadAll() in datachannel's detached mode which reads data until EOF is received.
See slack thread for more details: https://gophers.slack.com/archives/CAK2124AG/p1556658527035200
What did you expect?
When the sender side's SCTP stream is closed, Reset chunk will be received with indicating the last TSN in the chunk. Receiver side should forward all the data received that are equal to or smaller than the reset's TSN.
What happened?
stream.ReadSCTP() returns EOF before the last message (which has TSN <= the last TSN reset chunk indicates) becomes available to read.
The text was updated successfully, but these errors were encountered: