Crash in mozilla::MediaManager::GetBackend

RESOLVED FIXED in Firefox 65

Status

()

defect
P2
critical
Rank:
15
RESOLVED FIXED
4 months ago
4 months ago

People

(Reporter: philipp, Assigned: pehrsons)

Tracking

({crash, regression})

64 Branch
mozilla66
Points:
---

Firefox Tracking Flags

(firefox-esr60 unaffected, firefox64 wontfix, firefox65 fixed, firefox66 fixed)

Details

(crash signature)

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

4 months ago
This bug was filed from the Socorro interface and is
report bp-ba6fe475-33f6-4e21-bd89-880a80181221.
=============================================================

Top 10 frames of crashing thread:

0 xul.dll class mozilla::MediaEngine* mozilla::MediaManager::GetBackend dom/media/MediaManager.cpp:3516
1 xul.dll nsresult mozilla::media::LambdaTask<`lambda at z:/build/build/src/dom/media/MediaManager.cpp:3569:38'>::Run dom/media/systemservices/MediaTaskUtils.h:37
2 xul.dll bool MessageLoop::DeferOrRunPendingTask ipc/chromium/src/base/message_loop.cc:459
3 xul.dll MessageLoop::DoWork ipc/chromium/src/base/message_loop.cc:534
4 xul.dll mozilla::ipc::MessagePumpForNonMainUIThreads::DoRunLoop ipc/glue/MessagePump.cpp:403
5 xul.dll base::MessagePumpWin::Run ipc/chromium/src/base/message_pump_win.h:80
6 xul.dll MessageLoop::RunHandler ipc/chromium/src/base/message_loop.cc:318
7 xul.dll base::Thread::ThreadMain ipc/chromium/src/base/thread.cc:198
8 xul.dll static unsigned long `anonymous namespace'::ThreadFunc ipc/chromium/src/base/platform_thread_win.cc:30
9 kernel32.dll BaseThreadInitThunk 

=============================================================

crash reports during shutdown with this signature and MOZ_RELEASE_ASSERT(!sHasShutdown) are appearing cross-platform in desktop versions of firefox 64.

Updated

4 months ago
Rank: 15
Priority: -- → P2
(Assignee)

Comment 1

4 months ago
It seems to me like OnNavigation has started occurring *after* shutdown occasionally, sometime in 64.

We should detect this in OnNavigation and avoid trying to clean up more things after shutdown has occurred.
Assignee: nobody → apehrson
Status: NEW → ASSIGNED
(Assignee)

Comment 4

4 months ago
There's no guarantee a backend exists when a MediaManager does, and
crash-stats shows that shutdown can occur between posting a task and running
it, making it illegal to create a backend anew.

We're safer off avoiding creating a new backend. The cleanup step we're trying
to do is only effective if a backend already exists anyway.
Attachment #9033908 - Attachment is obsolete: true

Comment 5

4 months ago
Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/ef22d23a09a8
Remove aWindowId arg from MediaManager::GetBackend. r=jib
https://hg.mozilla.org/integration/autoland/rev/3de35d7cda2d
Don't create a backend as part of cleanup. r=jib

Comment 6

4 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/ef22d23a09a8
https://hg.mozilla.org/mozilla-central/rev/3de35d7cda2d
Status: ASSIGNED → RESOLVED
Last Resolved: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
(Assignee)

Comment 7

4 months ago
Comment on attachment 9034095 [details]
Bug 1515873 - Don't create a backend as part of cleanup. r?jib

[Beta/Release Uplift Approval Request]

Feature/Bug causing the regression: unclear

User impact if declined: Potential shutdown crash

Is this code covered by automated tests?: No

Has the fix been verified in Nightly?: No

Needs manual test from QE?: No

If yes, steps to reproduce: 

List of other uplifts needed: None

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): Trivial

String changes made/needed: None
Attachment #9034095 - Flags: approval-mozilla-beta?
Comment on attachment 9034095 [details]
Bug 1515873 - Don't create a backend as part of cleanup. r?jib

[Triage Comment]
Minor fix to avoid a shutdown crash introduced in Fx64. Approved for 65.0b9. Given the frequency, we may want to keep this on the radar for possible dot release inclusion also.
Attachment #9034095 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.