Clean up DataChannelShutdown
Categories
(Core :: WebRTC: Networking, task)
Tracking
()
People
(Reporter: bwc, Assigned: bwc)
References
Details
Attachments
(2 files)
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr78+
|
Details | Review |
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr68+
|
Details | Review |
DataChannelShutdown appears to be a workaround to prevent UAF of DataChannelConnection objects, by delaying destruction by 30 seconds. This is kinda hacky, and we really should implement some other way of doing this. It turns out to be easy to re-purpose DataChannelShutdown into a DataChannelRegistry object that allows an opaque handle to be used instead of a void* in usr_sctp (basically, using a weak pointer instead of a strong one). Other simplifications/cleanup can be done in this code also.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
•
|
||
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 5•5 years ago
|
||
Comment 7•5 years ago
|
||
Backed out changeset cc9bea1151d3 for causing failures in netinet/sctp_usrreq.c
Backout link: https://hg.mozilla.org/integration/autoland/rev/7f0b0cbecd946aee526a869853a46a14ee44b1f9
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=306713866&repo=autoland&lineNumber=1895
Assignee | ||
Comment 8•5 years ago
|
||
Looks like there's a race down in libusrsctp's shutdown code. We were avoiding this before because we were deferring shutdown of usrsctp until xpcom shutdown. Let me see what I can do about this.
Assignee | ||
Comment 9•5 years ago
|
||
Have filed bug 1646716 for the race in usrsctp_finish. Trying a workaround now.
Assignee | ||
Comment 10•5 years ago
•
|
||
Assignee | ||
Comment 11•5 years ago
|
||
Ok, it seems that the media tests are never run on TSan; we were tripping over a TSan test outside of the media test suites.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9882ef4994c7524ca5008c4b49f73335bbb97262
I wonder just how terrible we do when run under TSan...
Assignee | ||
Comment 12•5 years ago
|
||
Try looks ok.
Comment 13•5 years ago
|
||
Comment 14•5 years ago
|
||
bugherder |
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 17•5 years ago
|
||
Comment on attachment 9156096 [details]
Bug 1645219: Repurpose DataChannelShutdown into DataChannelRegistry (which gives us some weak-pointer-like semantics) r?ng
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration:
- User impact if declined:
- Fix Landed on Version: 79
- Risk to taking this patch: Medium
- Why is the change risky/not risky? (and alternatives if risky): This code is a bit crufty/fragile already, so any clean-up has some inherent risk.
- String or UUID changes made by this patch: None
Assignee | ||
Comment 18•5 years ago
|
||
Comment on attachment 9156096 [details]
Bug 1645219: Repurpose DataChannelShutdown into DataChannelRegistry (which gives us some weak-pointer-like semantics) r?ng
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration:
- User impact if declined:
- Fix Landed on Version: 79
- Risk to taking this patch: Medium
- Why is the change risky/not risky? (and alternatives if risky):
- String or UUID changes made by this patch:
Comment 19•5 years ago
|
||
Comment on attachment 9156096 [details]
Bug 1645219: Repurpose DataChannelShutdown into DataChannelRegistry (which gives us some weak-pointer-like semantics) r?ng
Hi, this needs a rebased patch for ESR68.
Comment 20•5 years ago
|
||
Comment on attachment 9156096 [details]
Bug 1645219: Repurpose DataChannelShutdown into DataChannelRegistry (which gives us some weak-pointer-like semantics) r?ng
Approved for 78.1esr.
Comment 21•5 years ago
|
||
bugherder uplift |
Assignee | ||
Comment 22•5 years ago
|
||
Comment 23•5 years ago
|
||
Comment on attachment 9161664 [details]
Bug 1645219: (ESR68 backport) Repurpose DataChannelShutdown into DataChannelRegistry (which gives us some weak-pointer-like semantics)
Approved for ESR68, thanks for rebasing.
Comment 24•5 years ago
|
||
bugherder uplift |
Description
•