Closed Bug 1746907 Opened 4 years ago Closed 4 years ago

Fix a number of locking issues in GMP support

Categories

(Core :: Audio/Video: GMP, defect)

defect

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox95 --- wontfix
firefox96 --- wontfix
firefox97 --- fixed

People

(Reporter: jesup, Assigned: jesup)

References

(Blocks 1 open bug)

Details

(Keywords: csectype-race, sec-moderate, Whiteboard: [post-critsmash-triage][adv-main97+r])

Attachments

(1 file)

There are a number of possible locking issues, especially around access to mGMPThread, mShuttingDown, etc.
Also adds an AssertOnGMPThread() method which is most of the changes.

Assignee: nobody → rjesup
Status: NEW → ASSIGNED

Landed: https://hg.mozilla.org/integration/autoland/rev/e2b20899353cd9eb59d68863454eba14efe27720

Backed out: https://hg.mozilla.org/integration/autoland/rev/ba26a5ced2ef60ae3f3a6ce1655f667351d8d1fd
Push with failures: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&resultStatus=retry%2Ctestfailed%2Cbusted%2Cexception%2Cusercancel&revision=e2b20899353cd9eb59d68863454eba14efe27720&selectedTaskRun=bn0NYbVpR4mFSe8JunDuug.0

[task 2021-12-21T18:03:36.423Z] 18:03:36    ERROR -  /builds/worker/checkouts/gecko/dom/media/gmp/GMPService.h:64:48: error: expected ';' at end of declaration list
[task 2021-12-21T18:03:36.424Z] 18:03:36     INFO -    nsresult GetThreadLocked(nsIThread** aThread) REQUIRES(mMutex);
[task 2021-12-21T18:03:36.424Z] 18:03:36     INFO -                                                 ^
[task 2021-12-21T18:03:36.424Z] 18:03:36     INFO -                                                 ;
Flags: needinfo?(rjesup)
Flags: needinfo?(rjesup)
Group: media-core-security → core-security-release
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Regressions: 1747171

(In reply to Randell Jesup [:jesup] (needinfo me) from comment #0)

There are a number of possible locking issues, especially around access to mGMPThread, mShuttingDown, etc.

What was the issue with mShuttingDown?
Where was it accessed off main thread?

Flags: needinfo?(rjesup)

The presumption was that it needed protection, because the comments in GMPServiceParent.h had it right after a "Protected by mMutex from the base class" comment (along with mPlugins). When adding GUARDED_BY(mMutex) (patch to land later, though obviously will now be revised), these spots were flagged by clang's thread-safety analysis.

Flags: needinfo?(rjesup)
Flags: qe-verify-
Whiteboard: [post-critsmash-triage]
Whiteboard: [post-critsmash-triage] → [post-critsmash-triage][adv-main97+r]
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: