Closed Bug 1402739 Opened 7 years ago Closed 7 years ago

Fix mutex handling around async ImageContainer

Categories

(Core :: Graphics: Layers, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- unaffected
firefox58 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file, 2 obsolete files)

It seems that mutex handling around async ImageContainer seems to have a risk of deadlock. And there is a place that mutex is not held correctly.

For example ImageBridgeChild::UpdateTextureFactoryIdentifier() call ImageContainer::DropImageClient() during holding mContainerMapLock. The DropImageClient() holds ImageContainer::mRecursiveMutex. It could cause the dead lock if ImageContainer::EnsureImageClient() is in the middle of calling.

ImageContainer::EnsureImageClient() updates ImageContainer::mNotifyCompositeListener and GetImageContainerListener() returns it without holding mutex.
Assignee: nobody → sotaro.ikeda.g
Attachment #8911623 - Attachment is obsolete: true
Attachment #8911630 - Flags: review?(nical.bugzilla)
Attachment #8911630 - Flags: review?(nical.bugzilla) → review+
Is this something we should consider uplifting to 57?
Flags: needinfo?(sotaro.ikeda.g)
Priority: -- → P3
Whiteboard: [gfx-noted]
(In reply to Milan Sreckovic [:milan] from comment #5)
> Is this something we should consider uplifting to 57?

Main fix of addressing deadlock could happen only when WebRender is enabled. Then it seems not necessary to uplift.
Flags: needinfo?(sotaro.ikeda.g)
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9db1c3303473
Fix mutex handling around async ImageContainer r=nical
https://hg.mozilla.org/mozilla-central/rev/9db1c3303473
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Depends on: 1443671
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: