Closed Bug 1978143 Opened 5 months ago Closed 27 days ago

Crash in [@ mozilla::StaticPrefs::privacy_trackingprotection_annotate_channels]

Categories

(Core :: Privacy: Anti-Tracking, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mccr8, Unassigned)

Details

(Keywords: crash)

Crash Data

Crash report: https://crash-stats.mozilla.org/report/index/757a1489-b5de-411d-b904-98c120250717

MOZ_CRASH Reason:

MOZ_DIAGNOSTIC_ASSERT(IsAtomic<bool>::value || NS_IsMainThread()) (Non-atomic static pref 'privacy.trackingprotection.annotate_channels' being accessed on background thread by getter)

Top 10 frames:

0  XUL  MOZ_CrashSequence(void*, long)  mfbt/Assertions.h:253
0  XUL  mozilla::StaticPrefs::privacy_trackingprotection_annotate_channels()  modules/libpref/init/StaticPrefList_privacy.h:73
0  XUL  mozilla::dom::TimeoutManager::TimeoutManager(nsIGlobalObject&, unsigned int, ...  dom/base/TimeoutManager.cpp:428
1  XUL  mozilla::MakeUnique<mozilla::dom::TimeoutManager, mozilla::dom::WorkerGlobalS...  mfbt/UniquePtr.h:184
1  XUL  mozilla::dom::WorkerGlobalScopeBase::WorkerGlobalScopeBase(mozilla::dom::Work...  dom/workers/WorkerScope.cpp:272
2  XUL  mozilla::dom::WorkerGlobalScope::WorkerGlobalScopeBase(mozilla::dom::WorkerPr...  dom/workers/WorkerScope.h:294
2  XUL  mozilla::dom::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(mozilla::dom...  dom/workers/WorkerScope.cpp:1273
3  XUL  mozilla::dom::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(mozilla::dom...  dom/workers/WorkerScope.cpp:1281
3  XUL  mozilla::dom::WorkerPrivate::GetOrCreateGlobalScope(JSContext*)  dom/workers/WorkerPrivate.cpp:6307
4  XUL  mozilla::dom::(anonymous namespace)::CompileScriptRunnable::WorkerRun(JSConte...  dom/workers/WorkerPrivate.cpp:382

This is kind of a weird one. TimeoutManager checks the value of this pref, potentially from a worker thread, but only when a certain MOZ_LOG is enabled.

Would making the pref atomic for nightly (and beta? do we enable diagnostic assertion in beta) work? I honestly don't know anything about this pref.

I think it would have to be enabled on all channels, as I think you can do MOZ_LOG everywhere. I'm not sure.

I guess that assertion is only in early release or whatever. Still not great for it to potentially race in other channels. But maybe it doesn't matter.

Severity: -- → S3
Priority: -- → P3

Closing because no crashes reported for 12 weeks.

Status: NEW → RESOLVED
Closed: 27 days ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.