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

DTLS transport crash on message :retransmit #137

Closed
Tracked by #28
sgfn opened this issue Jul 16, 2024 · 0 comments · Fixed by #148
Closed
Tracked by #28

DTLS transport crash on message :retransmit #137

sgfn opened this issue Jul 16, 2024 · 0 comments · Fixed by #148

Comments

@sgfn
Copy link
Member

sgfn commented Jul 16, 2024

[debug] Started DTLSTransport with role passive
[debug] Received binding request from: {{192, 168, 82, 181}, 53774}, on: {{192, 168, 82, 181}, 50576}
[debug] Role conflict, switching our role to controlling. Recomputing pairs priority.
Our tiebreaker: 11552852546584535244
Peer's tiebreaker: 5660097003257695623
[debug] Changing PeerConnection signaling state state: have_local_offer -> stable
[debug] Peer 402e5d6080 added remote video track 74319142476835193247643223536
[debug] Peer 402e5d6080 added remote audio track 19303035145960822483153125218
[debug] Ignoring unknown message: {:ex_webrtc, #PID<0.7470.0>, {:signaling_state_change, :stable}}
[debug] HANDLED sdp_answer INCOMING ON peer:signalling (NexusWeb.PeerChannel) in 459µs
  Parameters: %{"body" => "v=0\r\no=- 8985628995966016173 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS\r\nm=video 9 UDP/TLS/RTP/SAVPF 96 97\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:SN7i\r\na=ice-pwd:ScfV+V3HJLig1fQJTgl+zrXT\r\na=ice-options:trickle\r\na=fingerprint:sha-256 71:F1:0E:C0:4A:BF:A7:F4:D9:CE:CE:5A:21:C5:7C:85:10:09:4F:6E:10:EE:77:F2:2B:BC:F1:13:AA:5A:7A:63\r\na=setup:active\r\na=mid:0\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:2 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=sendonly\r\na=msid:- aced2659-9575-4f85-b052-3c470b1595f8\r\na=rtcp-mux\r\na=rtpmap:96 H264/90000\r\na=rtcp-fb:96 transport-cc\r\na=rtcp-fb:96 ccm fir\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=fmtp:96 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f\r\na=rtpmap:97 rtx/90000\r\na=fmtp:97 apt=96\r\na=ssrc-group:FID 3920356045 4190523872\r\na=ssrc:3920356045 cname:NEEIfSbcz0V7SnQX\r\na=ssrc:4190523872 cname:NEEIfSbcz0V7SnQX\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:SN7i\r\na=ice-pwd:ScfV+V3HJLig1fQJTgl+zrXT\r\na=ice-options:trickle\r\na=fingerprint:sha-256 71:F1:0E:C0:4A:BF:A7:F4:D9:CE:CE:5A:21:C5:7C:85:10:09:4F:6E:10:EE:77:F2:2B:BC:F1:13:AA:5A:7A:63\r\na=setup:active\r\na=mid:1\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=sendonly\r\na=msid:- 05f68402-8615-4e57-8dd4-abc9545ccbaf\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=ssrc:4117173597 cname:NEEIfSbcz0V7SnQX\r\n"}
[debug] HANDLED ice_candidate INCOMING ON peer:signalling (NexusWeb.PeerChannel) in 20µs
  Parameters: %{"body" => "{\"candidate\":\"candidate:1183350890 1 udp 2122260223 192.168.82.181 53774 typ host generation 0 ufrag SN7i network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"SN7i\"}"}
[debug] Adding new remote prflx candidate: %ExICE.Candidate{id: 33936565545562072957248198337, type: :prflx, address: {192, 168, 82, 181}, port: 53774, foundation: 3775828998, priority: 1862270975, transport: :udp, base_address: nil, base_port: nil}
[debug] Adding new candidate pair: %ExICE.Priv.CandidatePair{id: 75842787568691901740835553941, local_cand_id: 2337241859271583734996835597, remote_cand_id: 33936565545562072957248198337, priority: 7998392938176446463, nominate?: false, nominated?: false, state: :waiting, valid?: false, succeeded_pair_id: nil, discovered_pair_id: nil, keepalive_timer: nil, last_seen: -576457116752}
[debug] Connection state change: new -> checking
[debug] Setting remote credentials: "SN7i":"ScfV+V3HJLig1fQJTgl+zrXT"
[debug] Unmarshaling remote candidate: 1183350890 1 udp 2122260223 192.168.82.181 53774 typ host generation 0 ufrag SN7i network-id 1 network-cost 10
[debug] Changing PeerConnection state: new -> connecting
[debug] Ignoring unknown message: {:ex_webrtc, #PID<0.7470.0>, {:connection_state_change, :connecting}}
[debug] Ignoring unknown message: {:ex_webrtc, #PID<0.7470.0>, {:ice_connection_state_change, :checking}}
[debug] Successfully unmarshaled candidate.
Raw candidate: 1183350890 1 udp 2122260223 192.168.82.181 53774 typ host generation 0 ufrag SN7i network-id 1 network-cost 10.
Unmarshaled candidate: %ExICE.Candidate{id: 31923284033284547067393789138, type: :host, address: {192, 168, 82, 181}, port: 53774, foundation: 1572136343, priority: 2122260223, transport: :udp, base_address: nil, base_port: nil}

[debug] New remote candidate: %ExICE.Candidate{id: 31923284033284547067393789138, type: :host, address: {192, 168, 82, 181}, port: 53774, foundation: 1572136343, priority: 2122260223, transport: :udp, base_address: nil, base_port: nil}
[debug] Duplicated remote candidate. Ignoring.
Candidate: %ExICE.Candidate{id: 31923284033284547067393789138, type: :host, address: {192, 168, 82, 181}, port: 53774, foundation: 1572136343, priority: 2122260223, transport: :udp, base_address: nil, base_port: nil}
[debug] Generated local DTLS packets but ICE is not in the connected state yet.
We will send those packets once ICE is ready.

[debug] Changing DTLS state: new -> connecting
[debug] Received gathering transaction response from: {{1, 2, 3, 4}, 19302}, on: {{192, 168, 82, 181}, 50576}
[debug] New srflx candidate: %ExICE.Priv.Candidate.Srflx{base: #ExICE.Priv.CandidateBase<id: 5449183973417524052165273937, address: {5, 6, 7, 8}, foundation: 3995115028, port: 50576, priority: 1694498815, transport: :udp, transport_module: ExICE.Priv.Transport.UDP, type: :srflx, base_address: {192, 168, 82, 181}, base_port: 50576, ...>}
[debug] Gathering state change: gathering -> complete
[debug] Ignoring unknown message: {:ex_webrtc, #PID<0.7470.0>, {:ice_gathering_state_change, :complete}}
[debug] Stopping DTLSTransport with reason: {{:case_clause, {:retransmit, <<22, 254, 253, 0, 0, 0, 0, 0, 0, 0, 9, 0, 82, 2, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 70, 254, 253, 29, 40, 178, 102, 78, 242, 174, 177, 70, 161, 182, 240, 195, 7, 32, 106, 149, 165, ...>>, 1999}}, [{ExWebRTC.DTLSTransport, :handle_info, 2, [file: ~c"lib/ex_webrtc/dtls_transport.ex", line: 261]}, {:gen_server, :try_handle_info, 3, [file: ~c"gen_server.erl", line: 1095]}, {:gen_server, :handle_msg, 6, [file: ~c"gen_server.erl", line: 1183]}, {:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 241]}]}
[error] GenServer #PID<0.7378.0> terminating
** (CaseClauseError) no case clause matching: {:retransmit, <<22, 254, 253, 0, 0, 0, 0, 0, 0, 0, 9, 0, 82, 2, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 70, 254, 253, 29, 40, 178, 102, 78, 242, 174, 177, 70, 161, 182, 240, 195, 7, 32, 106, 149, 165, 36, 51, 40, ...>>, 1999}
    (ex_webrtc 0.3.0) lib/ex_webrtc/dtls_transport.ex:261: ExWebRTC.DTLSTransport.handle_info/2
    (stdlib 5.2.3) gen_server.erl:1095: :gen_server.try_handle_info/3
    (stdlib 5.2.3) gen_server.erl:1183: :gen_server.handle_msg/6
    (stdlib 5.2.3) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
Last message: :dtls_timeout
State: %{owner: #PID<0.7376.0>, mode: :passive, cert: <<48, 130, 2, 213, 48, 130, 1, 189, 2, 4, 9, 212, 24, 12, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 5, 5, 0, 48, 47, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 80, 76, 49, 15, 48, ...>>, fingerprint: <<76, 244, 167, 123, 30, 85, 54, 183, 118, 95, 135, 205, 0, 12, 26, 243, 172, 56, 154, 141, 36, 72, 14, 60, 147, 202, 1, 6, 52, 169, 210, 97>>, ice_transport: ExWebRTC.DefaultICETransport, ice_pid: #PID<0.7377.0>, dtls_state: :connecting, peer_fingerprint: "DC:6B:CD:42:AF:D2:69:3D:6F:1F:2E:98:2E:35:C1:DE:4E:0F:1C:6E:FB:9A:6C:EC:F2:0C:EA:F5:82:6E:48:CF", dtls: #Reference<0.3594876167.946733059.134071>, pkey: <<48, 130, 4, 163, 2, 1, 0, 2, 130, 1, 1, 0, 198, 117, 4, 140, 245, 128, 59, 136, 183, 135, 247, 32, 25, 171, 163, 202, 115, 209, 154, 132, 61, 67, 147, 249, 120, 170, 205, 243, ...>>, buffered_remote_packets: nil, ice_connected: false, buffered_local_packets: <<22, 254, 253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 2, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 70, 254, 253, 29, 40, 178, 102, 78, 242, 174, 177, 70, 161, ...>>, base64_cert: "MIIC1TCCAb0CBAnUGAwwDQYJKoZIhvcNAQEFBQAwLzELMAkGA1UEBhMCUEwxDzANBgNVBAoMBkV4RFRMUzEPMA0GA1UEAwwGRXhEVExTMB4XDTIzMDcxNzE0MzgyOVoXDTI1MDcxNjE0MzgyOVowLzELMAkGA1UEBhMCUEwxDzANBgNVBAoMBkV4RFRMUzEPMA0GA1UEAwwGRXhEVExTMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxnUEjPWAO4i3h/cgGaujynPRmoQ9Q5P5eKrN80iezriK4cJ5QrUh6sHIQ7Mcp4g75zLA2BGObZqar4aLYxuNPF6rN7WTwKWj16o+sau/k7+wfNpgq6TCjsRBv6c5+XPkvgjqaiwAY5YsuATYOsk5ZfGGR8gu4LbmspGuPEIkTUyHuhReDn7/C5VyEOD1jKKtNrwM1HtSShV7ioKucofaveOm4Kv4P0Ukp6jZB2pd4q0q2qHe9IBRbEwrMI1OkonKpJwAqN5E/VAr9ux/XdmnIo0x+sJybUEcxs6G/QTcOi1JNUypz2hB5HXCnftTV1ur2auKCCCuAjJlI3uAdawKOQIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQA6OpDdfdtl/hssZVo0IjsgbsgvzR4QjZPrAKbKKhnZlnmbWvQfGIPXj0HHwLbTR42LCgmZJ/aX3sBPqaM+mAn3u3bP6nDv6+VINB5zhFyxxnLYzeNLUo2ffoy7CHzqnpo6G1PvNZxO/JMpimxMs4qv29FAwNvfeAYuudzl5GXmHSHacUIC06olbQj30BEOM/slJWzpABT/ir8UKCI20+0jQKXB3Q9urLQyMoD3QlEf3knCo94cA4hYwOLrTp77Ud8/JMnBppOvPX/ZbZo0mFOTtpbA/9ULdX6btSm3IkHUuusrhjFFfp+/DnS7yhfeoUFEBp+STEf2qCe2+UHWshbQ", remote_fingerprint: nil, remote_base64_cert: nil, out_srtp: {ExLibSRTP, #Reference<0.3594876167.945946629.80851>}, in_srtp: {ExLibSRTP, #Reference<0.3594876167.945946629.80850>}, remote_cert: nil}
[info] Peer 349b9691a9 down with reason {{:case_clause, {:retransmit, <<22, 254, 253, 0, 0, 0, 0, 0, 0, 0, 9, 0, 82, 2, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 70, 254, 253, 29, 40, 178, 102, 78, 242, 174, 177, 70, 161, 182, 240, 195, 7, 32, 106, 149, 165, ...>>, 1999}}, [{ExWebRTC.DTLSTransport, :handle_info, 2, [file: ~c"lib/ex_webrtc/dtls_transport.ex", line: 261]}, {:gen_server, :try_handle_info, 3, [file: ~c"gen_server.erl", line: 1095]}, {:gen_server, :handle_msg, 6, [file: ~c"gen_server.erl", line: 1183]}, {:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 241]}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant