Closed Bug 1983168 Opened 1 year ago Closed 1 year ago

WARNING: ThreadSanitizer: data race (pid=22138) | Intermittent toolkit/components/search/tests/xpcshell/test_remove_profile_engine.js | xpcshell return code: -6 | single tracking bug

Categories

(Core :: Graphics: WebGPU, defect)

defect

Tracking

()

RESOLVED FIXED
144 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox-esr140 --- unaffected
firefox142 --- unaffected
firefox143 --- fixed
firefox144 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: jnicol)

References

(Regression)

Details

(Keywords: intermittent-failure, intermittent-testcase, regression, Whiteboard: [collect_confirm_failure])

Attachments

(2 external files)

Filed by: chorotan [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=522432338&repo=mozilla-central
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/KOxDRAdRRh6Qc1Q99L_Paw/runs/0/artifacts/public/logs/live_backing.log


task 2025-08-14T22:05:58.690+00:00] 22:05:58     INFO -  TEST-PASS | xpcshell.toml:toolkit/components/search/tests/xpcshell/test_notifications.js | took 6043ms
[task 2025-08-14T22:05:58.698+00:00] 22:05:58     INFO -  TEST-START | xpcshell.toml:toolkit/components/search/tests/xpcshell/test_remove_profile_engine.js
[task 2025-08-14T22:06:02.205+00:00] 22:06:02  WARNING -  TEST-UNEXPECTED-FAIL | xpcshell.toml:toolkit/components/search/tests/xpcshell/test_remove_profile_engine.js | xpcshell return code: -6
[task 2025-08-14T22:06:02.206+00:00] 22:06:02     INFO -  TEST-INFO took 3508ms
[task 2025-08-14T22:06:02.206+00:00] 22:06:02     INFO -  >>>>>>>
[task 2025-08-14T22:06:02.206+00:00] 22:06:02     INFO -  (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2025-08-14T22:06:02.206+00:00] 22:06:02     INFO -  (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2025-08-14T22:06:02.206+00:00] 22:06:02     INFO -  (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2025-08-14T22:06:02.206+00:00] 22:06:02     INFO -  running event loop
[task 2025-08-14T22:06:02.206+00:00] 22:06:02     INFO -  xpcshell.toml:toolkit/components/search/tests/xpcshell/test_remove_profile_engine.js | Starting setup
[task 2025-08-14T22:06:02.207+00:00] 22:06:02     INFO -  (xpcshell/head.js) | test pending (2)
[task 2025-08-14T22:06:02.207+00:00] 22:06:02     INFO -  (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2025-08-14T22:06:02.207+00:00] 22:06:02     INFO -  (xpcshell/head.js) | test run_next_test 1 pending (2)
[task 2025-08-14T22:06:02.207+00:00] 22:06:02     INFO -  (xpcshell/head.js) | test finished (2)
[task 2025-08-14T22:06:02.207+00:00] 22:06:02     INFO -  xpcshell.toml:toolkit/components/search/tests/xpcshell/test_remove_profile_engine.js | Starting run_test
[task 2025-08-14T22:06:02.207+00:00] 22:06:02     INFO -  (xpcshell/head.js) | test run_test pending (2)

From the logs:

INFO -  PID 22138 | WARNING: ThreadSanitizer: data race (pid=22138)
INFO -  PID 22138 |   Read of size 8 at 0x7fbf1ef11e78 by thread T29:
INFO -  PID 22138 |     #0 get /builds/worker/workspace/obj-build/dist/include/mozilla/StaticPtr.h:45:27 (libxul.so+0x71ab046) (BuildId: 591b174c4d438341d65e124268b7ad4faffba5a4)
INFO -  PID 22138 |     #1 operator mozilla::gfx::gfxVars * /builds/worker/workspace/obj-build/dist/include/mozilla/StaticPtr.h:47:32 (libxul.so+0x71ab046)
INFO -  PID 22138 |     #2 GetAllowWebGPUExternalTextureOrDefault /builds/worker/workspace/obj-build/dist/include/mozilla/gfx/gfxVars.h:259:3 (libxul.so+0x71ab046)
INFO -  PID 22138 |     #3 mozilla::webgpu::Instance::ExternalTextureEnabled(JSContext*, JSObject*) /builds/worker/checkouts/gecko/dom/webgpu/Instance.cpp:61:10 (libxul.so+0x71ab046)
INFO -  PID 22138 |     #4 mozilla::dom::PrefableDisablers::isEnabled(JSContext*, JS::Handle<JSObject*>) const /builds/worker/workspace/obj-build/dist/include/mozilla/dom/DOMJSClass.h:141:25 (libxul.so+0x6cb01f3) (BuildId: 591b174c4d438341d65e124268b7ad4faffba5a4)
INFO -  PID 22138 |     #5 isEnabled /builds/worker/workspace/obj-build/dist/include/mozilla/dom/DOMJSClass.h:173:23 (libxul.so+0x6c91196) (BuildId: 591b174c4d438341d65e124268b7ad4faffba5a4)

mozilla::webgpu::Instance::ExternalTextureEnabled appears to have been added in bug 1982866, so I think this is a regression from that bug.

Severity: S4 → --
Component: Search → Graphics: WebGPU
Keywords: regression
Priority: P5 → --
Product: Firefox → Core
Regressed by: 1982866
Summary: Intermittent toolkit/components/search/tests/xpcshell/test_remove_profile_engine.js | xpcshell return code: -6 | single tracking bug → WARNING: ThreadSanitizer: data race (pid=22138) | Intermittent toolkit/components/search/tests/xpcshell/test_remove_profile_engine.js | xpcshell return code: -6 | single tracking bug
Duplicate of this bug: 1983173

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

:jnicol, since you are the author of the regressor, bug 1982866, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

To determine whether this function is enabled we use the annotation
[Func="mozilla::webgpu::Instance::ExternalTextureEnabled"]. This
function currently checks the value of a gfxVar, which itself is
determined via a combination of a pref and blocklist status.

Unfortuntely using a gfxVar is problematic in certain tests which may
not have initialized gfxPlatform by the time we generate these bindings.

To avoid this, make this function only check the value of the pref
rather than the gfxVar. As a consequence, in cases where the pref is
enabled but the feature is blocklisted, the function will unfortunately
still be enabled. However, the C++ implementation does still check the
gfxVar value and will throw an error if the feature is blocklisted.

Assignee: nobody → jnicol
Status: NEW → ASSIGNED
Pushed by jnicol@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f7a24d24070d https://hg.mozilla.org/integration/autoland/rev/18bfdea19739 Avoid using gfxVars to determine whether Device.importExternalTexture() webidl is enabled. r=webgpu-reviewers,webidl,teoxoy,smaug
Flags: needinfo?(jnicol)
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch

The patch landed in nightly and beta is affected.
:jnicol, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(jnicol)

To determine whether this function is enabled we use the annotation
[Func="mozilla::webgpu::Instance::ExternalTextureEnabled"]. This
function currently checks the value of a gfxVar, which itself is
determined via a combination of a pref and blocklist status.

Unfortuntely using a gfxVar is problematic in certain tests which may
not have initialized gfxPlatform by the time we generate these bindings.

To avoid this, make this function only check the value of the pref
rather than the gfxVar. As a consequence, in cases where the pref is
enabled but the feature is blocklisted, the function will unfortunately
still be enabled. However, the C++ implementation does still check the
gfxVar value and will throw an error if the feature is blocklisted.

Original Revision: https://phabricator.services.mozilla.com/D261704

Attachment #9508775 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: Intermittent test failure on CI. No user impact AFAIK
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: N/A
  • Risk associated with taking this patch: Low
  • Explanation of risk level: Users who explicitly change a pref will now have the importExternalTexture function available, but calling it will just throw an error. previously it was hidden
  • String changes made/needed: N/A
  • Is Android affected?: no
Attachment #9508775 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: needinfo?(jnicol)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: