Closed Bug 1908801 Opened 7 months ago Closed 7 months ago

Crash in [@ mozilla::StaticPrefs::dom_event_wheel_event_groups_enabled] from APZCTreeManager::MaybeOverrideLayersIdForWheelEvent

Categories

(Core :: Panning and Zooming, defect)

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox128 --- unaffected
firefox129 --- unaffected
firefox130 --- fixed

People

(Reporter: mccr8, Assigned: dlrobertson)

References

(Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/a9b18130-091a-4cc7-89a5-d81bb0240715

MOZ_CRASH Reason: MOZ_DIAGNOSTIC_ASSERT(IsAtomic<bool>::value || NS_IsMainThread()) (Non-atomic static pref 'dom.event.wheel-event-groups.enabled' being accessed on background thread by getter)

Top 10 frames:

0  libxul.so  mozilla::StaticPrefs::dom_event_wheel_event_groups_enabled()  modules/libpref/init/StaticPrefList_dom.h:318
0  libxul.so  mozilla::layers::APZCTreeManager::MaybeOverrideLayersIdForWheelEvent(mozilla:...  gfx/layers/apz/src/APZCTreeManager.cpp:2406
1  libxul.so  mozilla::layers::APZCTreeManager::InputHandlingState::Finish(mozilla::layers:...  gfx/layers/apz/src/APZCTreeManager.cpp:2021
2  libxul.so  mozilla::layers::APZCTreeManager::ReceiveInputEvent(mozilla::InputData&, std:...  gfx/layers/apz/src/APZCTreeManager.cpp:0
3  libxul.so  mozilla::widget::NPZCSupport::HandleScrollEvent(long, int, float, float, floa...  widget/android/nsWindow.cpp:434
4  libxul.so  mozilla::jni::detail::Accessor<mozilla::widget::NPZCSupport>::operator->*<int...  widget/android/jni/Natives.h:660
4  libxul.so  mozilla::jni::NativeStub<mozilla::java::PanZoomController::NativeProvider::Ha...  widget/android/jni/Natives.h:1322
5  base.odex  base.odex@0x283354
6  base.art]  base.art]@0x480f1c
7  libart.so  libart.so@0x3afffc

Looks like APZ is accessing this pref from a thread it shouldn't, which is racey. I think the fix is to make the pref atomic?

Regression from bug 1888946 which added this code.

Keywords: regression
Regressed by: 1888946

Yeah, changing the pref type here from bool to RelaxedAtomicBool should fix this.

Set release status flags based on info from the regressing bug 1888946

:dlrobertson, since you are the author of the regressor, bug 1888946, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

The wheel event groups enabled flag should be an atomic pref, since it may be
checked on a background thread.

Assignee: nobody → drobertson
Status: NEW → ASSIGNED

Posted a patch

Flags: needinfo?(drobertson)
Pushed by drobertson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1697ca4e344e The wheel event groups enabled flag may be checked on a background thread. r=botond
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: