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

Problems with ForwardTsnChunk #1086

Open
ts-accessio opened this issue Apr 22, 2024 · 0 comments
Open

Problems with ForwardTsnChunk #1086

ts-accessio opened this issue Apr 22, 2024 · 0 comments

Comments

@ts-accessio
Copy link

We are experiencing many connection losses, even with relatively good network connections. Our investigations showed, that those happen after ForwardTsnChunks (all connections losses were after ForwardTsnChunks, but not all ForwardTsnChunks caused connection losses).
The problem here is that aiortc just stops to send data and the client then resets the connection after a timeout.

Log (HTTP Requests is us getting a new frames), after 10 seconds the client triggers a restart

2024-04-11T14:57:13.337880496Z DEBUG:httpx._client:HTTP Request: GET http://administrator:@10.16.5.102/media/cam0/still.jpg?minWidth=480 "HTTP/1.1 200 OK"
2024-04-11T14:57:13.340158998Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) > DataChunk(flags=6, tsn=2020831539, stream_id=0, stream_seq=0)
2024-04-11T14:57:13.340413718Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) - T3 start
2024-04-11T14:57:13.340522570Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) > DataChunk(flags=4, tsn=2020831540, stream_id=0, stream_seq=0)
2024-04-11T14:57:13.340791064Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) > DataChunk(flags=4, tsn=2020831541, stream_id=0, stream_seq=0)
2024-04-11T14:57:13.340840695Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) > DataChunk(flags=4, tsn=2020831542, stream_id=0, stream_seq=0)
2024-04-11T14:57:13.378495678Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) < SackChunk(flags=0, advertised_rwnd=4716192, cumulative_tsn=2020831540, gaps=[])
2024-04-11T14:57:13.378668463Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) - T3 restart
2024-04-11T14:57:13.378799279Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) > DataChunk(flags=4, tsn=2020831543, stream_id=0, stream_seq=0)
2024-04-11T14:57:13.379147759Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) > DataChunk(flags=4, tsn=2020831544, stream_id=0, stream_seq=0)
2024-04-11T14:57:13.379391878Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) > DataChunk(flags=4, tsn=2020831545, stream_id=0, stream_seq=0)
2024-04-11T14:57:13.379650640Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) > DataChunk(flags=4, tsn=2020831546, stream_id=0, stream_seq=0)
2024-04-11T14:57:13.416384790Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) < SackChunk(flags=0, advertised_rwnd=4713792, cumulative_tsn=2020831541, gaps=[(2, 2)])
2024-04-11T14:57:13.416478041Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) - T3 restart
2024-04-11T14:57:13.416699379Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) > DataChunk(flags=4, tsn=2020831547, stream_id=0, stream_seq=0)
2024-04-11T14:57:13.417428017Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) > DataChunk(flags=4, tsn=2020831548, stream_id=0, stream_seq=0)
2024-04-11T14:57:13.417697733Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) > DataChunk(flags=4, tsn=2020831549, stream_id=0, stream_seq=0)
2024-04-11T14:57:13.417925240Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) > DataChunk(flags=5, tsn=2020831550, stream_id=0, stream_seq=0)
2024-04-11T14:57:13.418501304Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) < SackChunk(flags=0, advertised_rwnd=4712592, cumulative_tsn=2020831541, gaps=[(2, 3)])
2024-04-11T14:57:13.418864730Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) < SackChunk(flags=0, advertised_rwnd=4711392, cumulative_tsn=2020831541, gaps=[(2, 4)])
2024-04-11T14:57:13.418940082Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) > ForwardTsnChunk(cumulative_tsn=2020831550, streams=[])
2024-04-11T14:57:13.419457271Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) < SackChunk(flags=0, advertised_rwnd=4710192, cumulative_tsn=2020831541, gaps=[(2, 5)])
2024-04-11T14:57:13.419521328Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) - T3 cancel
2024-04-11T14:57:13.459649796Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) < SackChunk(flags=0, advertised_rwnd=4708992, cumulative_tsn=2020831541, gaps=[(2, 6)])
2024-04-11T14:57:13.459884196Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) < SackChunk(flags=0, advertised_rwnd=4707792, cumulative_tsn=2020831541, gaps=[(2, 7)])
2024-04-11T14:57:13.460173973Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) < SackChunk(flags=0, advertised_rwnd=4707293, cumulative_tsn=2020831541, gaps=[(2, 7), (9, 9)])
2024-04-11T14:57:13.460391638Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) < SackChunk(flags=0, advertised_rwnd=4706093, cumulative_tsn=2020831541, gaps=[(2, 9)])
2024-04-11T14:57:13.661245299Z DEBUG:aiortc.rtcsctptransport:RTCSctpTransport(server) < SackChunk(flags=0, advertised_rwnd=4718592, cumulative_tsn=2020831550, gaps=[])
2024-04-11T14:57:13.724114642Z DEBUG:httpx._client:HTTP Request: GET http://administrator:@10.16.5.102/media/cam0/still.jpg?minWidth=480 "HTTP/1.1 200 OK"
2024-04-11T14:57:14.134197755Z DEBUG:httpx._client:HTTP Request: GET http://administrator:@10.16.5.102/media/cam0/still.jpg?minWidth=480 "HTTP/1.1 200 OK"
2024-04-11T14:57:23.024982230Z DEBUG:aiortc.rtcdtlstransport:RTCDtlsTransport(client) - DTLS shutdown by remote party

Further investigations indicated problems with the congestion control. A hacky "fix" seems to reduce or even solve the problem: https://github.com/ts-accessio/aiortc

Is there a better way to solve our problem?

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

No branches or pull requests

1 participant