Open Bug 1779167 Opened 2 years ago Updated 9 days ago

Deadlock on gfxPlatformFontList lock

Categories

(Core :: Graphics: Text, defect)

defect

Tracking

()

People

(Reporter: alwu, Unassigned)

References

Details

Attachments

(1 file)

Following message happened while I was developing bug 1771011. This was an intermittent error message, so I don't have reproducible steps.

###!!! Deadlock may happen NOW!

: 'Error', file C:/mozilla-source/mozilla-unified/xpcom/threads/BlockingResourceBase.cpp:245
[Child 37708, Main Thread] WARNING: Re-entering RecursiveMutex after acquiring other resources.: file C:/mozilla-source/mozilla-unified/xpcom/threads/BlockingResourceBase.cpp:477
###!!! ERROR: Potential deadlock detected:
=== Cyclical dependency starts at
--- RecursiveMutex : gfxPlatformFontList lock (currently acquired)
 calling context
  [stack trace unavailable]

--- Next dependency:
--- Mutex : gfxFontFamily lock (currently acquired)
 calling context
  [stack trace unavailable]

=== Cycle completed at
--- RecursiveMutex : gfxPlatformFontList lock (currently acquired)
 calling context
  [stack trace unavailable]

Thanks for filing this, we'll need to try and figure out what's happening. (Those [stack trace unavailable] messages are frustrating, though!)

(The most recent change I can think of that might be relevant would be the gfxCharacterMap change in bug 1778711, but I'm not certain yet whether that's what we are encountering here.)

Component: Graphics → Graphics: Text

Any new cases would be whenever a strong reference to gfxCharacterMap is cleared.

Alastor, could you check whether gfx.e10s.font-list.shared is enabled in the profile you're using? (It's true by default, but if you've toggled it that would affect what code paths are possible here.) Thanks!

Flags: needinfo?(alwu)

Triage - I am setting severity to S3, given the first comment says it was encountered while developing new code and only infrequently, I am assuming this is not critically urgent.

Severity: -- → S3

(In reply to Jonathan Kew (:jfkthame) from comment #4)

Alastor, could you check whether gfx.e10s.font-list.shared is enabled in the profile you're using? (It's true by default, but if you've toggled it that would affect what code paths are possible here.) Thanks!

Yes, I didn't change it so that pref is enabled on my profile.

Flags: needinfo?(alwu)

I ~100% repro on my macOS VM. STRs are basically: build a debug ; mach run

Johnathan, it seems I can repro that very easily, this is the default profile after a mach build && mach run, so the pref you mentionned in comment 4 should be at its default value. What kind of debugging can I perform to help fix this ?

Flags: needinfo?(jfkthame)
Attached file stack

I can also repro using :gerard-majax's STR in comment 7 on my M1 Mac.

I think the patch just landing in bug 1824214 may resolve this.

Flags: needinfo?(jfkthame)
See Also: → 1824214
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: