-
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
Intermittent issue establishing DTLS connectivty #2113
Comments
Hey @bryphe-coder 10% is really high, that's no good! I have seen two DTLS issues come up lately. If you are running a ICE Lite Offerer this fixed things where DTLS would never connect. I would expect things to never work though. this fixes connections with very high RTT, it doesn't sound like this either. Would you be able to capture a |
@bryphe-coder If you can also grab the SDP from both sides in addition to pcap Sean is requesting, that would be great. Will be good to cross check that the SDP setup line is not causing a deadlock. |
I added logging for the SDP (ctrl+f "offer" and "answer). It's difficult for us to grab a I put the full log output in a gist. @bryphe-coder and I will try to grab a @Sean-Der the second RTT issue sounds close, because this only occurs when connections are exchanged extremely slowly. |
Based on consistent failed output from multiple runs:
This occurs because the ICE connection is still in a new state: Line 2162 in 8796a5c
Updating the ICE state occurs async: Lines 101 to 106 in 8796a5c
I'm not sure how the timing works here, but could we remove the check for Lines 284 to 286 in 8796a5c
Lines 448 to 454 in 8796a5c
|
I am in support of that change @kylecarbs! It looks like the check was added in 736e0bb and not for a specific reason. |
I ran this locally and all the tests passed. The change also makes sense to me from a ORTC stand point. I should be able to start a new DTLSTransport over an existing ICETransport. Want to open a PR with this commit @bryphe-coder would love to have you in the diff --git a/dtlstransport.go b/dtlstransport.go
index de078d6..109513b 100644
--- a/dtlstransport.go
+++ b/dtlstransport.go
@@ -446,7 +446,7 @@ func (t *DTLSTransport) validateFingerPrint(remoteCert *x509.Certificate) error
}
func (t *DTLSTransport) ensureICEConn() error {
- if t.iceTransport == nil || t.iceTransport.State() == ICETransportStateNew {
+ if t.iceTransport == nil {
return errICEConnectionNotStarted
}
|
More than happy to push up the change! Although @Sean-Der and @kylecarbs , you're the ones that deserve the credit 😄 Really appreciate the help! |
DTLS should be able to be negotiated over an already established ICETransport Resolves pion#2113
DTLS should be able to be negotiated over an already established ICETransport Resolves pion#2113
DTLS should be able to be negotiated over an already established ICETransport Resolves #2113
DTLS should be able to be negotiated over an already established ICETransport Resolves #2113
DTLS should be able to be negotiated over an already established ICETransport Resolves pion#2113
Hi, first off, thanks for all the work you do in maintaining this library!
Your environment.
go
- test case with bothpion
client <->pion
serverWhat did you do?
We've set up a test case that creates a client and server and connects them with
pion
. Most of the time, the test passes. However, we've found ~10% of the time, there will be a failure. (cc @kylecarbs)When it fails, it seems there is an issue establishing a DTLS connection. Here's an excerpt of the log where a failure takes place:
Essentially it seems that we get to the point of
Flight 1: Waiting
on the client, and then justFailed to start manager: ICE connection not started
andFailed to start SCTP: DTLS not established
.We also see
handshake error: context deadline exceed
- but it's not clear to me if this is due to the previous failures, or is actually the root cause.Unfortunately, our code is in a private repro, so I can't provide a runnable repro at the moment - but I'll see what I can do to minimize it.
Just a few questions:
It's not clear to me if this is a bug in
pion
or a bug in the way we're using it - so appreciate any tips 😄What did you expect?
Excerpt from successful run
What happened?
Full Failure Log (Verbose!)
Thanks again for your help & work on this library!
The text was updated successfully, but these errors were encountered: