Closed Bug 1943776 Opened 9 months ago Closed 7 months ago

Some worker tests in WebGPU CTS time out with `DataCloneError: Function object could not be cloned`

Categories

(Core :: Graphics: WebGPU, defect, P1)

defect

Tracking

()

RESOLVED FIXED
138 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox134 --- unaffected
firefox135 --- unaffected
firefox136 --- verified
firefox137 --- wontfix
firefox138 --- fixed

People

(Reporter: ErichDonGubler, Assigned: ErichDonGubler)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

This is reproducible both in the standalone runner hosted by the GPU Web Working Group, and in Firefox's CI, which checks the same CTS tests as WPT tests.

This happens because the postMessage call inside the reportTestResults function in test_worker-worker.js in WebGPU CTS loads data from an object called result. result.logs is an array with entries that get converted into a form more amenable form for a message via toRawData (source permalink). This conversion does not strip the extra field of one or more logs entries is populated and preserved, containing function objects as members.

Steps to reproduce

  1. Run a WebGPU CTS test where:

    1. The test runs in a worker context, requiring test results to be sent back to the runner with a postMessage object.

    In the standalone runner, In Firefox's CI, these are testing/web-platform/mozilla/tests/webgpu/…/{shared,dedicated}.https.html files.

    1. Additional test debug info is enabled.

      For the standalone runner, the debug=1 query parameter is provided by the user agent to enable this. For Firefox's CI, this is enabled unconditionally.

    2. The test fails such that it attempts to send methods in the extra field of one or more result.logs entries in reportTestResults.

      Many tests provide a "nice" rendering of expected and actual test failures. These tend to be populated into the extra object as methods.

    An example link that currently fulfills all of the above conditions on Firefox using the standalone runner: https://gpuweb.github.io/cts/standalone/?worker=shared&debug=1&q=webgpu:web_platform,copyToTexture,canvas:copy_contents_from_bitmaprenderer_context_canvas:*

    An example CLI invocation that currently reproduces in a checkout of mozilla-central: mach build && mach wpt '/_mozilla/webgpu/cts/webgpu/web_platform/copyToTexture/canvas/shared.https.html?worker=shared&q=webgpu:web_platform,copyToTexture,canvas:copy_contents_from_bitmaprenderer_context_canvas:*'.

  2. Observe that the test(s) time out, with the console log for the worker containing an entry stating DataCloneError: Function object could not be cloned.

See Also: → 1943861
Priority: -- → P1

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

:smolnar: The frequency of this problem should be reduced to near zero with patches for bug 1942886 landing. Let's see how numbers pan out over the next week or so? 🤞🏻

Upstream issue: gpuweb/cts#4172

Summary: Worker tests in WebGPU CTS time out when failing with `DataCloneError: Function object could not be cloned` → Some worker tests in WebGPU CTS time out with `DataCloneError: Function object could not be cloned`

Just filed an upstream PR to fix this: gpuweb/cts#4287

The only change this patch brings is the consumption of a PR I authored
to work around runtime errors when a failure incorrectly tries to return
an error object with methods inside its extra field to the content
context.

See gpuweb/cts#4287 for more details.

CTS upstream has merged gpuweb/cts#4287! 🙌🏻 They've also changed the configuration for WPT tests to avoid extra debug information, by default, so any of (1) the patch I just filed or (2) a CTS revendor from bug 1863146. Woot, progress!

Attachment #9471163 - Attachment description: WIP: Bug 1943776 - test(webgpu): update CTS to 593e7c8526f220f76e0f047670ba2854cb5bee8b r=#webgpu-reviewers! → Bug 1943776 - test(webgpu): update CTS to 593e7c8526f220f76e0f047670ba2854cb5bee8b r=#webgpu-reviewers!
Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7b255671587e test(webgpu): update CTS to 593e7c8526f220f76e0f047670ba2854cb5bee8b r=webgpu-reviewers,nical
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch

Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: