Closed Bug 1732416 Opened 3 years ago Closed 2 years ago

Crash in [@ mozilla::PDMFactory::CreatePDMs] from accessing pref media.decoder-doctor.wmf-disabled-is-failure

Categories

(Core :: Audio/Video: Playback, defect, P1)

x86
Windows 7
defect

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox99 --- wontfix
firefox100 --- fixed
firefox101 --- fixed

People

(Reporter: mccr8, Assigned: bryce)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

Maybe Fission related. (DOMFissionEnabled=1)

Crash report: https://crash-stats.mozilla.org/report/index/a4ffbe9e-5486-481c-99a8-1bf8f0210923

MOZ_CRASH Reason: MOZ_DIAGNOSTIC_ASSERT(IsAtomic<bool>::value || NS_IsMainThread()) (Non-atomic static pref 'media.decoder-doctor.wmf-disabled-is-failure' being accessed on background thread by getter)

Top 10 frames of crashing thread:

0 xul.dll mozilla::PDMFactory::CreatePDMs dom/media/platforms/PDMFactory.cpp:440
1 xul.dll mozilla::AllocationWrapper::CreateDecoder::<unnamed-tag>::operator const dom/media/platforms/AllocationPolicy.cpp:215
2 xul.dll static mozilla::MozPromise<RefPtr<mozilla::AllocPolicy::Token>, bool, 1>::InvokeMethod<`lambda at /builds/worker/checkouts/gecko/dom/media/platforms/AllocationPolicy.cpp:141:7', RefPtr<mozilla::MozPromise<RefPtr<mozilla::AllocPolicy::Token>, bool, 1> >  xpcom/threads/MozPromise.h:630
3 xul.dll mozilla::MozPromise<RefPtr<mozilla::AllocPolicy::Token>, bool, 1>::ThenValue<`lambda at /builds/worker/checkouts/gecko/dom/media/platforms/AllocationPolicy.cpp:205:15', `lambda at /builds/worker/checkouts/gecko/dom/media/platforms/AllocationPolicy.cpp:232:15'>::DoResolveOrRejectInternal xpcom/threads/MozPromise.h:846
4 xul.dll mozilla::MozPromise<RefPtr<mozilla::AllocPolicy::Token>, bool, 1>::ThenValueBase::ResolveOrRejectRunnable::Run xpcom/threads/MozPromise.h:487
5 xul.dll mozilla::TaskQueue::Runner::Run xpcom/threads/TaskQueue.cpp:208
6 xul.dll nsThreadPool::Run xpcom/threads/nsThreadPool.cpp:303
7 xul.dll nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:1142
8 xul.dll mozilla::ipc::MessagePumpForNonMainThreads::Run ipc/glue/MessagePump.cpp:300
9 xul.dll MessageLoop::RunHandler ipc/chromium/src/base/message_loop.cc:324

This looks like a thread safety check on a preference getter. There are a few crashes, but all from the same user, so maybe their have some weird prefs set.

Maybe media.decoder-doctor.wmf-disabled-is-failure just needs to be made RelaxedAtomicBool like media.wmf.enabled and the other WMF prefs?

Summary: Crash in [@ mozilla::PDMFactory::CreatePDMs] → Crash in [@ mozilla::PDMFactory::CreatePDMs] from accessing pref media.decoder-doctor.wmf-disabled-is-failure

media.wmf.use-sync-texture and media.wmf.vp9.enabled also aren't threadsafe, FWIW.

Think we missed this due to the auto severity setting causing our triage tools to pass over it. Let's get this sorted.

Assignee: nobody → bvandyk
Priority: -- → P1

(In reply to Andrew McCreight [:mccr8] from comment #2)

media.wmf.use-sync-texture and media.wmf.vp9.enabled also aren't threadsafe, FWIW.

media.wmf.use-sync-texture is only mirrored once, does that still pose a risk being non-atomic? media.wmf.vp9.enabled was fixed in bug 1760804.

Patch incoming to fix DD pref.

Pushed by bvandyk@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2db19214f439
Change media.decoder-doctor.wmf-disabled-is-failure to atomic bool. r=alwu
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch

do you think this is something you want to uplift to beta? if so I would prefer to get this in before early beta finishes.

Flags: needinfo?(bvandyk)

(In reply to Dianna Smith [:diannaS] from comment #8)

do you think this is something you want to uplift to beta? if so I would prefer to get this in before early beta finishes.

It can't hurt. Simple fix that may save us some pain. Will request uplift.

Flags: needinfo?(bvandyk)

Comment on attachment 9271145 [details]
Bug 1732416 - Change media.decoder-doctor.wmf-disabled-is-failure to atomic bool.

Beta/Release Uplift Approval Request

  • User impact if declined: A (diagnostic assert) crash can be triggered within the media pipeline. This crash prevents graceful error handling and leads to a bad user experience.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • 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): Low risk as this is a single line change to make pref atomic.
  • String changes made/needed: None
Attachment #9271145 - Flags: approval-mozilla-beta?

Comment on attachment 9271145 [details]
Bug 1732416 - Change media.decoder-doctor.wmf-disabled-is-failure to atomic bool.

Approved for 100.0b6

Attachment #9271145 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: