Closed Bug 1285238 Opened 4 years ago Closed 3 years ago
Sanitizer | leak at mozilla::layers::Buffer Texture Data::Create Internal, mozilla::layers::Buffer Texture Data::Create For YCb Cr, mozilla::layers::Texture Client::Create For YCb Cr, mozilla::layers::YCb Cr Texture Client Allocation Helper::Allocate
This looks like there's a race condition during shutdown causing this leak. Nical, is there anything we can do on our side about this? (See the log's gfxCriticalError)
We already try to mitigate this type of situation by forcing all textures to be destroyed synchronously when shutting down our ipdl protocols. Doing that is not race-free unfortunately, and making that completely race-free is hard, so it can happen that textures fall through the cracks and don't get destroyed syncrhonously with the ImageBridge. The issue here is that the destruction of the texture is happening very late when the ImageBridge thread itself (not just the protocols) is already gone. Papering over this is hard. The most sensible way to fix this is to identify what is releasing the texture so late and make sure it is cleaned up during media or gfx's shutdown. Unfortunately there is no stack for the gfxCriticalError in the log so I my guess would be to start looking at the TextureClientRecycleAllocator that was added recently-ish and may not be dealing with shutdown explicitly.
Sotaro, is there an explicit mechanism to make sure the recycling mechanism for video texture is shut down before the gfx IPDL protocols? In particular I am looking at CompositableClient::mTextureClientRecycler which seems to rely only on reference counting and it is probably not enough to have the recycler reliably cleaned up in time.
(In reply to Nicolas Silva [:nical] from comment #3) > Sotaro, is there an explicit mechanism to make sure the recycling mechanism > for video texture is shut down before the gfx IPDL protocols? There is not explicit mechanism now. I am going to add it.
Assignee: nobody → sotaro.ikeda.g
Attachment #8770784 - Flags: review?(nical.bugzilla)
Attachment #8770784 - Flags: review?(nical.bugzilla) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/0659b2021265 Add TextureClientRecycleAllocator::Destroy() r=nical
You need to log in before you can comment on or make changes to this bug.