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

prevent ICETransport start/stop deadlock #2897

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

edaniels
Copy link
Member

@edaniels edaniels commented Sep 4, 2024

No description provided.

@edaniels edaniels force-pushed the icetransportdeadlock branch from d89c94f to 53c8eee Compare September 4, 2024 16:40
@benjirewis benjirewis self-requested a review September 4, 2024 16:41
if t.mux != nil {
var closeErrs []error
if shouldGracefullyClose && t.gatherer != nil {
Copy link
Member Author

Choose a reason for hiding this comment

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

I looked at these closes and they should be safe to call concurrently. If they aren't, we'll see some other problems crop up quickly. But I haven't found those to happen in any concurrent PC close test runs.

@@ -157,6 +157,10 @@ func (t *ICETransport) Start(gatherer *ICEGatherer, params ICEParameters, role *
return err

Choose a reason for hiding this comment

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

Can't comment on the line but it looks like you're Locking the t.lock above and never unlocking; is that on purpose?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah there's a defer unlock above. not sure how i feel about that pattern!

Choose a reason for hiding this comment

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

I don't like it haha, but since it was pre-existing and I have basically no context here will approve.

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.89%. Comparing base (4ef00e6) to head (53c8eee).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2897      +/-   ##
==========================================
- Coverage   79.03%   78.89%   -0.15%     
==========================================
  Files          89       89              
  Lines        8477     8481       +4     
==========================================
- Hits         6700     6691       -9     
- Misses       1293     1302       +9     
- Partials      484      488       +4     
Flag Coverage Δ
go 80.44% <100.00%> (-0.16%) ⬇️
wasm 65.11% <ø> (ø)

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.

@@ -157,6 +157,10 @@ func (t *ICETransport) Start(gatherer *ICEGatherer, params ICEParameters, role *
return err

Choose a reason for hiding this comment

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

I don't like it haha, but since it was pre-existing and I have basically no context here will approve.

@edaniels edaniels merged commit 9a71f69 into pion:master Sep 4, 2024
17 checks passed
@edaniels edaniels deleted the icetransportdeadlock branch September 4, 2024 17:21
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