-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
webrtc: potential problem with the Pion state machine #2614
Comments
There's one other bug which causes failure in connection establishment:
https://github.com/libp2p/go-libp2p/actions/runs/6602211220/job/17934010538 |
Both these errors haven't happened since merging #2717 The first errors was fixed by fixing the tests. When one side closes the connection the other side sees this line when it does a stream Close.
|
How was the other error fixed? |
I am not convinced it is fixed completely. We just find it flaking less for some reason. One of the reasons why that error occurs is this https://github.com/libp2p/go-libp2p/actions/runs/8125238982/job/22214622459?pr=2722 This will be fixed when pion/sctp does a new release. This was fixed by: pion/sctp#301 The other reason why it was flaking was an error in our udpmux code. That was fixed by: #2586 Again, not convinced it is fixed completely by these two. There might be some race condition in the conn establishment step that we are missing. One of the reasons for getting #2717 was that in the logs after failure there were so many go routines that this was impossible to debug. Hopefully now we can better identify the cause. |
For the failures after 10m we see. I have explained the reasoning in the PR. My current theory is. The problem is with connection state change notification being reordered. Pion just runs them in a separate goroutine without waiting for it to finish. So here the listener thinks that connection isn't established, while it actually has established. I've opened a PR in pion/webrtc that'd close this: https://github.com/pion/webrtc/pull/2702/files |
The same error in updating ice connection states: https://github.com/pion/ice/pull/656/files |
fixed by #2801 and other webrtc fixes. |
We might be using the Pion state machine incorrectly:
The text was updated successfully, but these errors were encountered: