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

Close unhandled rtcp simulcast streams #2826

Merged
merged 1 commit into from
Jul 23, 2024
Merged

Conversation

edaniels
Copy link
Member

handleIncomingSSRC will call streamsForSSRC which opens rtp/rtcp streams that if unhandled can be leaked resources. Now we will proactively open them before calling handleIncomingSSRC and close then later. In the future it would be better to do this inside handleIncomingSSRC to protect other callers.

Copy link

codecov bot commented Jul 22, 2024

Codecov Report

Attention: Patch coverage is 47.05882% with 9 lines in your changes missing coverage. Please review.

Project coverage is 78.91%. Comparing base (c85269b) to head (a0ba327).

Files Patch % Lines
peerconnection.go 30.76% 7 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2826      +/-   ##
==========================================
- Coverage   79.01%   78.91%   -0.11%     
==========================================
  Files          89       89              
  Lines        8292     8303      +11     
==========================================
  Hits         6552     6552              
- Misses       1267     1275       +8     
- Partials      473      476       +3     
Flag Coverage Δ
go 80.50% <47.05%> (-0.12%) ⬇️
wasm 64.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@edaniels edaniels marked this pull request as ready for review July 22, 2024 22:22
@edaniels edaniels requested review from Sean-Der and cnderrauber July 22, 2024 22:22
@edaniels
Copy link
Member Author

I noticed the srtcp leaking packetio.buffer's when I added a goroutine to them in pion/transport#304

continue
}

pc.dtlsTransport.storeSimulcastStream(srtpReadStream, srtcpReadStream)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an observation while working on this: we hang onto these for the lifetime of the PC which could increase memory over time. It would be better to know that these are strictly 1. not valid when expecting simulcast and 2. not valid ssrcs when we are non-simulcast

handleIncomingSSRC will call streamsForSSRC which
opens rtp/rtcp streams that if unhandled can be
leaked resources. Now we will proactively open
them before calling handleIncomingSSRC and close
then later. In the future it would be better to
do this inside handleIncomingSSRC to protect other
callers.
Copy link
Member

@cnderrauber cnderrauber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@edaniels edaniels merged commit 05cafb3 into pion:master Jul 23, 2024
16 of 17 checks passed
@edaniels edaniels deleted the close_un_srtcp branch July 23, 2024 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants