Closed Bug 1600032 Opened 5 years ago Closed 5 years ago

IPC crashes with fatal error msg: Error deserializing 'textureParent' (PTexture) member of 'TimedTexture'

Categories

(Core Graveyard :: Plug-ins, defect, P1)

72 Branch
All
Windows
defect

Tracking

(Root Cause:Coding: Runtime Error, firefox-esr68 unaffected, firefox70 unaffected, firefox71 unaffected, firefox72blocking fixed, firefox73+ fixed)

RESOLVED FIXED
mozilla73
Tracking Status
firefox-esr68 --- unaffected
firefox70 --- unaffected
firefox71 --- unaffected
firefox72 blocking fixed
firefox73 + fixed

People

(Reporter: philipp, Assigned: handyman)

References

(Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(2 files, 2 obsolete files)

This bug is for crash report bp-cf8567ea-bb52-42c2-9b20-a86e90191128.

Top 10 frames of crashing thread:

0 xul.dll mozilla::ipc::FatalError ipc/glue/ProtocolUtils.cpp:165
1 xul.dll mozilla::ipc::IProtocol::HandleFatalError ipc/glue/ProtocolUtils.cpp:404
2 xul.dll static bool mozilla::ipc::IPDLParamTraits<mozilla::layers::TimedTexture>::Read ipc/ipdl/LayersMessages.cpp
3 xul.dll static bool mozilla::ipc::IPDLParamTraits<nsTArray<mozilla::layers::TimedTexture> >::Read ipc/glue/IPDLParamTraits.h:189
4 xul.dll static bool mozilla::ipc::IPDLParamTraits<mozilla::layers::OpUseTexture>::Read ipc/ipdl/LayersMessages.cpp:12990
5 xul.dll static bool mozilla::ipc::IPDLParamTraits<mozilla::layers::CompositableOperationDetail>::Read ipc/ipdl/LayersMessages.cpp:13878
6 xul.dll mozilla::ipc::IPDLParamTraits<mozilla::layers::CompositableOperation>::Read ipc/ipdl/LayersMessages.cpp:13969
7 xul.dll mozilla::ipc::IPDLParamTraits<nsTArray<mozilla::layers::CompositableOperation> >::Read ipc/glue/IPDLParamTraits.h:189
8 xul.dll mozilla::layers::PImageBridgeParent::OnMessageReceived ipc/ipdl/PImageBridgeParent.cpp:349
9 xul.dll void mozilla::ipc::MessageChannel::DispatchMessage ipc/glue/MessageChannel.cpp:2130

these crash reports are spiking up in nightly 72.0a1 since build 20191121214422 on windows.

the crash signature is covering multiple different issues - i'm filing this report just for the crashes containing IPCFatalErrorMsg Error deserializing 'textureParent' (PTexture) member of 'TimedTexture': https://crash-stats.mozilla.com/search/?ipc_fatal_error_msg=%3DError%20deserializing%20%27textureParent%27%20%28PTexture%29%20member%20of%20%27TimedTexture%27&build_id=%3E%3D20191121214422&product=Firefox&date=%3E%3D2019-11-01#crash-reports

those crashes all come with moz crash reason MOZ_CRASH(IPC FatalError in the parent process!) too.
a potential regression range based on the first affected buildid is https://mzl.la/2XRUFOU.
url correlations show that urls most prone to crashing in this fashion are various different gaming sites.

Sotaro, does this sound like something you are able to look into? (Judging by ImageBridge)

Flags: needinfo?(sotaro.ikeda.g)
Priority: -- → P1

OK, I take a look.

Flags: needinfo?(sotaro.ikeda.g)
Assignee: nobody → sotaro.ikeda.g

|[G0][GFX1-]: TextureHost creation failure type=12

Majority of reports have the above GraphicsCriticalError. type=12 means TSurfaceDescriptorGPUVideo.

(In reply to Sotaro Ikeda [:sotaro] from comment #3)

|[G0][GFX1-]: TextureHost creation failure type=12

The log was added in Bug 1564667 for Bug 1562616 . Bug 1562616 is similar to this bug.

Bug 1562616 made GPUVideoTextureHost not to fail to create. But Bug 1577336 made that GPUVideoTextureHost creation could fail.

From comment 5, crash that has "TextureHost creation failure type=12" error log seems to be caused by Bug 1577336.

Regressed by: 1577336
Assignee: sotaro.ikeda.g → nobody

:handyman, Bug 1577336 seems to cause the crash of comment 4. Can you take the bug?

Flags: needinfo?(davidp99)

Yes, this must be the lookup of a TextureHostD3D11 variant of GPUVideoTextureHost failing in the plugin case here [1]. I need to make that infallible.

[1] https://searchfox.org/mozilla-central/rev/d69bff9bdb2dcf1788eec6232b21eb3eec342799/gfx/layers/composite/TextureHost.cpp#337

Assignee: nobody → davidp99
Flags: needinfo?(davidp99)
Component: Graphics: Layers → Plug-ins

Would backing out bug 1577336 be an option at least for 72?

I have a simple patch that creates a "NullPluginTextureHost" when the lookup fails. This makes the behavior adjacent to the GPUVideoTextureHost infallible, but I can't find a way to reproduce the failure locally so I'm unsure of it. I'm still playing with various situations to try to repro.

I think the crash is rare enough (for one, it requires Flash use) and we are close enough to a fix that its best to leave the original async rendering patch. My NullPluginTextureHost is currently "minimal" but I think I can make it duplicate all of the degenerate behavior in GPUVideoTextureHost, which would give more assurance that it would behave at least as well as that class. This is easy to do but might be needless clutter in NullPluginTextureHost. But that's a small price to pay.

I'll post a patch that does this today but it won't get approved and landed before the merge. I'm expecting to uplift it.

(In reply to David Parks (dparks) [:handyman] from comment #10)

I think the crash is rare enough (for one, it requires Flash use) and we are close enough to a fix that its best to leave the original async rendering patch.

the issue is accounting for 25% of reported browser crashes on 72.0b at the moment, so based on volume it's certainly a top crasher.

If the D3D11TextureData backing the plugin variant of a GPUVideoTextureHost is requested, but the ImageBridge has already released or lost it then, instead of null, we now return a NullPluginTextureHost in order to avoid IPDL serialization failure down the line. This mirrors the degenerate case of RemoteVideoDecoder behavior, indroduced to fix the same issue with that variant of GPUVideoTextureHost, in bug 1562616.

FYI, it seems the reason I couldn't reproduce this is that the issue in bug 1600595 was always happening first -- this issue seems to follow almost every time. I've now been able to see this crash by fixing that bug. I've since tested with both this patch and the one from 1600595, and it seems to fix the crash as hoped.

Attached patch 1577336-backout.patch (obsolete) (deleted) — Splinter Review

For some reason the crash volume for both this and bug 1600595 has dropped considerably on nightly this week. Beta is badly affected though, even with a partial rollout, and I'm holding off on the full rollout because of this crash.
Attaching a backout patch against beta in case the fix doesn't make it in time for the next build (Monday at 04:00 UTC).

Attached patch 1577336-backout.patch (deleted) — Splinter Review
Attachment #9114115 - Attachment is obsolete: true
Attachment #9113538 - Attachment is obsolete: true
Attachment #9113538 - Attachment is obsolete: false
Pushed by daparks@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1644a92ede46 Make GPUVideoTextureHost plugin lookup infallible r=mattwoodrow

Trying again with fix for updated virtual function.

Flags: needinfo?(davidp99)
Pushed by daparks@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/05a0c8c33bc4 Make GPUVideoTextureHost plugin lookup infallible r=mattwoodrow
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73

Use the new utility function, introduced in Part 3, to implement async plugin surface's read to CPU texture.

Depends on D57563

Comment on attachment 9116564 [details]
Bug 1600032: Part 5 - Make RecvReadbackAsyncPluginSurface use ReadbackTexture r=mattwoodrow!

Revision D57564 was moved to bug 1600595. Setting attachment 9116564 [details] to obsolete.

Attachment #9116564 - Attachment is obsolete: true

Please specify a root cause for this bug. See :tmaity for more information.

Root Cause: --- → ?
Root Cause: ? → Coding: Runtime Error
Has Regression Range: --- → yes
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: