Closed Bug 1896816 Opened 18 days ago Closed 17 days ago

Crash in [@ mozilla::StaticPrefs::accessibility_uia_enable] caused by JAWS access from wrong thread

Categories

(Core :: Disability Access APIs, defect)

Unspecified
Windows 11
defect

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox126 --- fixed
firefox127 --- fixed
firefox128 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(3 files)

Spun off bug 1871989 comment 9 onwards.

Crash report: https://crash-stats.mozilla.org/report/index/e3d014c6-4960-4b7d-905f-4fb810240429

MOZ_CRASH Reason: MOZ_DIAGNOSTIC_ASSERT(IsAtomic<bool>::value || NS_IsMainThread()) (Non-atomic static pref 'accessibility.uia.enable' being accessed on background thread by getter)

Top 10 frames:

0  xul.dll  mozilla::StaticPrefs::accessibility_uia_enable()  modules/libpref/init/StaticPrefList_accessibility.h:45
1  xul.dll  mozilla::a11y::MsaaAccessible::QueryInterface(_GUID const&, void**)  accessible/windows/msaa/MsaaAccessible.cpp:526
2  oleacc.dll  oleacc.dll@0x68ab
3  oleacc.dll  oleacc.dll@0xadf1
4  oleacc.dll  oleacc.dll@0xae7e
5  oleacc.dll  oleacc.dll@0x5992
6  xul.dll  mozilla::a11y::MsaaAccessible::QueryInterface(_GUID const&, void**)  accessible/windows/msaa/MsaaAccessible.cpp:522
7  oleacc.dll  oleacc.dll@0xa7b5
8  FSDomNodeIAText.DLL  FSDomNodeIAText.DLL@0x24176
9  oleacc.dll  oleacc.dll@0x664f

A client is never supposed to access Gecko UI from any thread other than the main thread. However, it looks like we bring up file picker dialogs in a background thread, and then JAWS (for some strange and unknown reason) tries to traverse into the (disabled) Gecko UI. Even if we make the UIA pref work on a background thread, we're going to hit all sorts of other problems if this happens.

Even if it traversed the tree, JAWS shouldn't be directly calling methods on Gecko objects from this thread. It should have used WM_GETOBJECT and ObjectFromLresult one way or another, which means they should be marshaled across threads by the COM marshaler. I can't be absolutely certain but this smells very much like a JAWS bug.

I could try asking Vispero to fix this, but I don't love our chances of a quick fix. In addition, because of the cost of updates, many JAWS users tend to be running old versions, so we'd still be dealing with that problem.

Keywords: regression
Regressed by: 1881190

JAWS apparently does this sometimes.
In particular, this was causing a crash when we tried to check the UIA pref because that pref can only be accessed from the main thread.

Blocks: jaws

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

Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/84c756f39b46
Fail gracefully if a naughty client tries to QueryInterface on an MsaaAccessible from the wrong thread. r=eeejay
Status: NEW → RESOLVED
Closed: 17 days ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch

The patch landed in nightly and beta is affected.
:Jamie, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox127 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(jteh)

:jamie, to add to Comment 11.
I'm wondering about a release uplift too? Though it doesn't seem like this is being hit by users in Fx126 release.

Hmm. I thought this was only being hit by Thunderbird users, but the crash stats show Firefox users are hitting it as well. It probably wouldn't hurt to uplift to release if we spin a dot release for other reasons.

Flags: needinfo?(jteh)

JAWS apparently does this sometimes.
In particular, this was causing a crash when we tried to check the UIA pref because that pref can only be accessed from the main thread.

Original Revision: https://phabricator.services.mozilla.com/D210417

Attachment #9402350 - Flags: approval-mozilla-beta?

Oh, I guess we aren't hitting it on release because it's a MOZ_DIAGNOSTIC_ASSERT, which don't trigger on release. However, that could be hiding problems further down the line... though even with this patch, there might be problems further down the line. It's probably still worth an uplift though.

beta Uplift Approval Request

  • User impact if declined: Crashes in some cases when JAWS screen reader users open file picker dialogs.
  • Code covered by automated testing: no
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: not applicable
  • Risk associated with taking this patch: low
  • Explanation of risk level: Simply adds an early return for a failure case that would otherwise cause a crash.
  • String changes made/needed: none
  • Is Android affected?: no

JAWS apparently does this sometimes.
In particular, this was causing a crash when we tried to check the UIA pref because that pref can only be accessed from the main thread.

Original Revision: https://phabricator.services.mozilla.com/D210417

Attachment #9402352 - Flags: approval-mozilla-release?

release Uplift Approval Request

  • User impact if declined: Crashes in some cases when JAWS screen reader users open file picker dialogs.
  • Code covered by automated testing: no
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: not applicable
  • Risk associated with taking this patch: low
  • Explanation of risk level: Simply adds an early return for a failure case that would otherwise cause a crash.
  • String changes made/needed: none
  • Is Android affected?: no
Attachment #9402350 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9402352 - Flags: approval-mozilla-release? → approval-mozilla-release+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: