Closed Bug 1827756 Opened 2 years ago Closed 2 years ago

[Fission Android] Timeout [but not actually: Font face deadlock] in dom/security/test/csp/test_bug1452037.html

Categories

(GeckoView Graveyard :: Sandboxing, defect, P1)

All
Android

Tracking

(firefox112 disabled, firefox113 disabled, firefox114 disabled, firefox115 disabled, firefox116 fixed)

RESOLVED FIXED
116 Branch
Tracking Status
firefox112 --- disabled
firefox113 --- disabled
firefox114 --- disabled
firefox115 --- disabled
firefox116 --- fixed

People

(Reporter: owlish, Assigned: owlish)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [fission:android][geckoview:m116][fxdroid])

Attachments

(1 file)

Debug build.
Push with failure
Log

In the logcat log, I see this immediately after the test_start for the test:

04-12 21:59:49.329 11661 11676 I GeckoDump: ⰲ겿{"action":"test_start","time":1681336789329,"thread":null,"pid":null,"source":"mochitest","test":"/tests/dom/security/test/csp/test_bug1452037.html","js_source":"TestRunner.js"}ⰲ겿
04-12 21:59:49.331 11661 11676 I Gecko   : [Child 11661, Main Thread] WARNING: Potential deadlock detected:
04-12 21:59:49.331 11661 11676 I Gecko   : Cyclical dependency starts at
04-12 21:59:49.331 11661 11676 I Gecko   : Mutex : gfxFontEntry lock
04-12 21:59:49.331 11661 11676 I Gecko   : Next dependency:
04-12 21:59:49.331 11661 11676 I Gecko   : Mutex : SharedFTFace::mLock (currently acquired)
04-12 21:59:49.331 11661 11676 I Gecko   : Cycle completed at
04-12 21:59:49.331 11661 11676 I Gecko   : Mutex : gfxFontEntry lock
04-12 21:59:49.331 11661 11676 I Gecko   : Deadlock may happen for some other execution
04-12 21:59:49.331 11661 11676 I Gecko   : 
04-12 21:59:49.331 11661 11676 I Gecko   : : file /builds/worker/checkouts/gecko/xpcom/threads/BlockingResourceBase.cpp:247
04-12 21:59:49.331 11661 11676 I Gecko   : [Child 11661, Main Thread] WARNING: Potential deadlock detected:
04-12 21:59:49.331 11661 11676 I Gecko   : Cyclical dependency starts at
04-12 21:59:49.331 11661 11676 I Gecko   : Mutex : gfxFontEntry lock
04-12 21:59:49.331 11661 11676 I Gecko   : Next dependency:
04-12 21:59:49.331 11661 11676 I Gecko   : Mutex : SharedFTFace::mLock (currently acquired)
04-12 21:59:49.331 11661 11676 I Gecko   : Cycle completed at
04-12 21:59:49.331 11661 11676 I Gecko   : Mutex : gfxFontEntry lock
04-12 21:59:49.331 11661 11676 I Gecko   : Deadlock may happen for some other execution
04-12 21:59:49.331 11661 11676 I Gecko   : 
04-12 21:59:49.331 11661 11676 I Gecko   : : file /builds/worker/checkouts/gecko/xpcom/threads/BlockingResourceBase.cpp:247
04-12 21:59:49.331 11661 11676 I Gecko   : [Child 11661, Main Thread] WARNING: Potential deadlock detected:
04-12 21:59:49.331 11661 11676 I Gecko   : Cyclical dependency starts at
04-12 21:59:49.331 11661 11676 I Gecko   : Mutex : gfxFontEntry lock
04-12 21:59:49.331 11661 11676 I Gecko   : Next dependency:
04-12 21:59:49.331 11661 11676 I Gecko   : Mutex : SharedFTFace::mLock (currently acquired)
04-12 21:59:49.331 11661 11676 I Gecko   : Cycle completed at
04-12 21:59:49.331 11661 11676 I Gecko   : Mutex : gfxFontEntry lock
04-12 21:59:49.331 11661 11676 I Gecko   : Deadlock may happen for some other execution
04-12 21:59:49.331 11661 11676 I Gecko   : 
04-12 21:59:49.331 11661 11676 I Gecko   : : file /builds/worker/checkouts/gecko/xpcom/threads/BlockingResourceBase.cpp:247
04-12 21:59:49.331 11661 11676 I Gecko   : [Child 11661, Main Thread] WARNING: Potential deadlock detected:
04-12 21:59:49.331 11661 11676 I Gecko   : Cyclical dependency starts at
04-12 21:59:49.331 11661 11676 I Gecko   : Mutex : gfxFontEntry lock
04-12 21:59:49.331 11661 11676 I Gecko   : Next dependency:
04-12 21:59:49.331 11661 11676 I Gecko   : Mutex : SharedFTFace::mLock (currently acquired)
04-12 21:59:49.331 11661 11676 I Gecko   : Cycle completed at
04-12 21:59:49.331 11661 11676 I Gecko   : Mutex : gfxFontEntry lock
04-12 21:59:49.331 11661 11676 I Gecko   : Deadlock may happen for some other execution
04-12 21:59:49.331 11661 11676 I Gecko   : 
04-12 21:59:49.331 11661 11676 I Gecko   : : file /builds/worker/checkouts/gecko/xpcom/threads/BlockingResourceBase.cpp:247

It looks like there's a deadlock issue on android between SharedFTFace::mLock and gfxFontEntry lock, which is leading to timeouts in some geckoview android tests (at least I assume that potential deadlock is likely repsonsible). Leaving a ni? to :emilio to look into it.

Component: Sandboxing → Layout: Text and Fonts
Flags: needinfo?(emilio)
Product: GeckoView → Core
Summary: Fix dom/security/test/csp/test_bug1452037.html for Fission Android → [Fission Android] Font face deadlock in dom/security/test/csp/test_bug1452037.html
Duplicate of this bug: 1827967
Duplicate of this bug: 1828011
Duplicate of this bug: 1827754
Duplicate of this bug: 1827729
Duplicate of this bug: 1827677

Last change in those locks was introduced in bug 1763414... Jonathan, do you have cycles to take a look?

Severity: -- → S2
Type: task → defect
Flags: needinfo?(emilio) → needinfo?(jfkthame)
Keywords: regression
Regressed by: 1763414

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

Blocks: 1827321
Blocks: 1827323
Duplicate of this bug: 1827324
Blocks: 1827325

Jonathan, this bug blocks Android Fission because this font deadlock causes multiple tests to fail in Android Fission mode. As such, the Firefox Android team is eager for this test to be fixed. If you have questions about running Android tests in Fission mode, reach out to :owlish in the #fission channel on Slack or Matrix.

Whiteboard: [fission:android]

Not entirely sure if bug 1804027 is related, but similar font deadlock logging occurs before a test timeout, so linking it as a reference.

See Also: → 1804027

I've been looking into the potential deadlock warnings here, and I don't think this is actually related to the test timeouts. Note that the warnings are of potential deadlock; they do not tell us that a deadlock is in fact happening.

Looking at tests such as test_bug1452037.html, I don't see anything that seems likely to trigger a font-related deadlock, unless there were a deadlock that's liable to happen on pretty much any invocation. But that doesn't happen; the timeouts seem reliably associated with particular tests, while the tests in question are not doing anything "interesting" with fonts.

Moreover, checking logs from other test runs, it appears that these font-related warnings always appear, with or without Fission, and they appear on all runs, not just the ones that end up timing out.

The warning is genuine, inasmuch as that there's a potential locking cycle, and we should fix that; but it won't resolve the test timeout here.

Flags: needinfo?(jfkthame)
Depends on: 1835110

According to this try run, the patch in bug 1835110 will resolve the font-related "potential deadlock" being reported here; but test_bug1452037 will still time out just the same.

Moving this back to GV:Sandboxing for re-examination, instead of Layout:Text & Fonts, as the font-related warnings were not actually relevant to the timeout happening in this test.

Severity: S2 → --
Component: Layout: Text and Fonts → Sandboxing
Product: Core → GeckoView
Summary: [Fission Android] Font face deadlock in dom/security/test/csp/test_bug1452037.html → [Fission Android] Timeout [but not actually: Font face deadlock] in dom/security/test/csp/test_bug1452037.html

(In reply to Jonathan Kew [:jfkthame] from comment #13)

According to this try run, the patch in bug 1835110 will resolve the font-related "potential deadlock" being reported here; but test_bug1452037 will still time out just the same.

Jonathan, thanks for investigating!

Irene, can you please retest this mochitest with Fission? Jonathan fixed the font deadlock warnings with bug 1835110, but it won't fix this test (since these deadlock warnings are logged with or without Fission). So we need a new theory for why this test is timing out.

When originally categorizing the Fission mochitest failures, you suspected this bug is the cause of at least four other mochitest failures. So fixing this bug is a high priority for unblocking other Fission tests.

Severity: -- → S3
Flags: needinfo?(bugzeeeeee)
Priority: -- → P2

The test now passes for me locally. I'll make a try push to see what is going on in automation

Flags: needinfo?(bugzeeeeee)
Assignee: nobody → bugzeeeeee

Ok, this particular test passes in automation as well, and I see some of the other tests pass now also. I will continue retesting to see what else got fixed, including the tests that are blocked on this. I will also enable the tests that are now passing.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Resolution: FIXED → WORKSFORME

Apologies, I am reopening this bug to make a patch to enable this test.

Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Priority: P2 → P1
Whiteboard: [fission:android] → [fission:android][geckoview:m116]
Pushed by istorozhko@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0b3723566862 Enable dom/security/test/csp/test_bug1452037 test for Android Fission builds r=nika
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Blocks: 1849389
Whiteboard: [fission:android][geckoview:m116] → [fission:android][geckoview:m116][fxdroid]
Blocks: 1855511
No longer blocks: 1855511
Product: GeckoView → GeckoView Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: