Closed Bug 1880005 Opened 1 year ago Closed 1 year ago

[WebGPU] with dx12-no-readback enabled, browser hangs, flashes white and falls back to sw-wr on https://codepen.io/search/pens?q=webgpu

Categories

(Core :: Graphics: WebGPU, defect)

defect

Tracking

()

VERIFIED FIXED
125 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox122 --- disabled
firefox123 --- disabled
firefox124 --- disabled
firefox125 --- fixed

People

(Reporter: mayankleoboy1, Assigned: sotaro)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(4 files)

  1. Use latest Nightly (enable webgpu and the dx12-no-readback thingy)
  2. Login to codepen
  3. Go to https://codepen.io/search/pens?q=webgpu
  4. Wait for the page to load completely. Codepen should load the assets of all the 6 demos in the background.
    At this stage the tab would use 1GB+ memory
    3.5 Maybe try hovering mouse over one of the demos so that it starts playing.
  5. Try clicking on one of the dropdowns - "sort by" or "search depth" , or try clicking on UI element of the browser

AR: The browser freezes. It eventually flashes white and falls back to sw-wr
ER: Not so

This may just be a case of too many webgpu things in a single tab.

"Good" log.
dx-12-no-readback thingy is disabled.
Page behaves as expected with no hang/crash.

"Bad" log.
dx12-no-readback is ENABLED.
Page froze, the whole browser froze for some time. Then it flashed whit, and fallback to sw-wr.

Flags: needinfo?(sotaro.ikeda.g)
Attachment #9379854 - Attachment mime type: application/octet-stream → application/text
Attachment #9379855 - Attachment mime type: application/octet-stream → application/text

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

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

I dont think there is anything special about the page https://codepen.io/search/pens?q=webgpu ....
If you open a simple demo like https://webgpu.github.io/webgpu-samples/samples/helloTriangle on 6 different tabs, you get similar bug.

When the problem happened, Renderer thread was blocked at Renderer11::flush(Context11 *context11) that was called under Renderer::draw_frame()

CanvasRender thread was blocked at device->CreateTexture2D() in ExternalTextureD3D11::GetSnapshot() or ExternalTextureD3D11::Create().

Further, there was a case that when Renderer thread was blocked at Renderer11::flush(Context11 *context11), CanvasRender thread was not blocked.

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

context4->Wait(fence, mFenceValue) in FenceD3D11::Wait() seemed to trigger the hang at ID3D11DeviceContext::Flush()

FenceHandle handling in WebGPUParent was wrong. The FenceHandle exists for each device.

Pushed by sikeda.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/66928be3e7e7 Fix FenceHandle handling in WebGPUParent r=lsalzman
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch

This is fixed in the latest Nightly.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-125b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: