Closed Bug 1898108 Opened 10 months ago Closed 10 months ago

Intermittent SUMMARY: ThreadSanitizer: data race /builds/worker/workspace/obj-build/dist/include/nsTArray.h:2694:23 in AppendElementInternal<nsTArrayInfallibleAllocator, mozilla::dom::WorkerRunnable *const &>

Categories

(Core :: DOM: Workers, defect)

defect

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox126 --- unaffected
firefox127 --- unaffected
firefox128 --- fixed

People

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

References

Details

(Keywords: csectype-race, intermittent-failure, sec-moderate)

Attachments

(2 files)

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


TEST-START | devtools/client/webconsole/test/browser/browser_console_webconsole_private_browsing.js
...
GECKO(18176) | WARNING: ThreadSanitizer: data race (pid=18176)
GECKO(18176) |   Write of size 4 at 0x726c0024a860 by main thread (mutexes: write M0):
GECKO(18176) |     #0 AppendElementInternal<nsTArrayInfallibleAllocator, mozilla::dom::WorkerRunnable *const &> /builds/worker/workspace/obj-build/dist/include/nsTArray.h:2694:23 (libxul.so+0x7737c3c) (BuildId: d66feaf756a054140232f420cf187b11369c938e)
GECKO(18176) |     #1 AppendElement<mozilla::dom::WorkerRunnable *const &> /builds/worker/workspace/obj-build/dist/include/nsTArray.h:2832:24 (libxul.so+0x7737c3c)
GECKO(18176) |     #2 Push /builds/worker/workspace/obj-build/dist/include/mozilla/dom/workerinternals/Queue.h:37:14 (libxul.so+0x7737c3c)
GECKO(18176) |     #3 Push /builds/worker/workspace/obj-build/dist/include/mozilla/dom/workerinternals/Queue.h:116:5 (libxul.so+0x7737c3c)
GECKO(18176) |     #4 mozilla::dom::WorkerPrivate::DispatchDebuggerRunnable(already_AddRefed<mozilla::dom::WorkerRunnable>) /builds/worker/checkouts/gecko/dom/workers/WorkerPrivate.cpp:1770:18 (libxul.so+0x7737c3c)
...
GECKO(18176) |   Previous read of size 4 at 0x726c0024a860 by thread T398:
GECKO(18176) |     #0 Length /builds/worker/workspace/obj-build/dist/include/nsTArray.h:397:43 (libxul.so+0x774645d) (BuildId: d66feaf756a054140232f420cf187b11369c938e)
GECKO(18176) |     #1 IsEmpty /builds/worker/workspace/obj-build/dist/include/nsTArray.h:400:33 (libxul.so+0x774645d)
GECKO(18176) |     #2 IsEmpty /builds/worker/workspace/obj-build/dist/include/mozilla/dom/workerinternals/Queue.h:33:23 (libxul.so+0x774645d)
GECKO(18176) |     #3 IsEmpty /builds/worker/workspace/obj-build/dist/include/mozilla/dom/workerinternals/Queue.h:111:47 (libxul.so+0x774645d)
GECKO(18176) |     #4 mozilla::dom::WorkerPrivate::InterruptCallback(JSContext*) /builds/worker/checkouts/gecko/dom/workers/WorkerPrivate.cpp:3976:34 (libxul.so+0x774645d)
GECKO(18176) |     #5 mozilla::dom::workerinternals::(anonymous namespace)::InterruptCallback(JSContext*) /builds/worker/checkouts/gecko/dom/workers/RuntimeService.cpp:473:33 (libxul.so+0x772879c) (BuildId: d66feaf756a054140232f420cf187b11369c938e)
Attached file full TSan report

Here's the full TSan log. It looks like this is a race on WorkerPrivate::mDebuggerQueue.

Group: core-security → dom-core-security
Component: Layout → DOM: Workers

This looks at least in the ballpark of bug 1821250, which landed recently.

Flags: needinfo?(poirot.alex)

This is about:

versus

Should we simply guard the isEmpty call behind mMutex?

Flags: needinfo?(poirot.alex)
Flags: needinfo?(echuang)
Flags: needinfo?(echuang)
Assignee: nobody → echuang
Attachment #9403222 - Attachment description: WIP: Bug 1898108 - Making WorkerPrivate::mDebuggerQueue accesses protected by WorkerPrivate::mMutex. r=#dom-worker-reviewers → Bug 1898108 - Making WorkerPrivate::mDebuggerQueue accesses protected by WorkerPrivate::mMutex. r=#dom-worker-reviewers
Status: NEW → ASSIGNED
Pushed by echuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/06aacf2f4ea6 Making WorkerPrivate::mDebuggerQueue accesses protected by WorkerPrivate::mMutex. r=dom-worker-reviewers,asuth
Group: dom-core-security → core-security-release
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
QA Whiteboard: [post-critsmash-triage]
Flags: qe-verify-
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: