Skip to content

Conversation

@chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jan 7, 2026

When running WebNN conformance tests, we sometimes
encounter the flaky error "Failed to execute 'createContext' on
'ML': WebNN service connection error."[1].

This is caused by a previous test case's context lost failure,
which is handled by killing the GPU process. However, if the
GPU process hasn't restarted in time, calling another
createContext immediately will trigger the WebNN context
provider's disconnect handler[2].

To resolve this issue, this CL waits 3 seconds for the GPU
process to restart and then retries calling createContext.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/ml/ml.cc;l=124
[2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/ml/ml.cc;l=140

Bug: 472168103
Change-Id: Id4808a01c8e617bf38a8225c016f3eb616a1d936
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7349171
Reviewed-by: Reilly Grant <[email protected]>
Commit-Queue: Xu, Mingming1 <[email protected]>
Reviewed-by: Hu, Ningxin <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1567611}

When running WebNN conformance tests, we sometimes
encounter the flaky error "Failed to execute 'createContext' on
'ML': WebNN service connection error."[1].

This is caused by a previous test case's context lost failure,
which is handled by killing the GPU process. However, if the
GPU process hasn't restarted in time, calling another
`createContext` immediately will trigger the WebNN context
provider's disconnect handler[2].

To resolve this issue, this CL waits 3 seconds for the GPU
process to restart and then retries calling `createContext`.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/ml/ml.cc;l=124
[2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/ml/ml.cc;l=140

Bug: 472168103
Change-Id: Id4808a01c8e617bf38a8225c016f3eb616a1d936
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7349171
Reviewed-by: Reilly Grant <[email protected]>
Commit-Queue: Xu, Mingming1 <[email protected]>
Reviewed-by: Hu, Ningxin <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1567611}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit dd5de06 into master Jan 12, 2026
27 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-7349171 branch January 12, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants