Closed Bug 1754554 Opened 4 years ago Closed 2 years ago

Intermittent SUMMARY: ThreadSanitizer: data race /builds/worker/workspace/obj-build/dist/include/mozilla/Queue.h:223:9 in ShallowSizeOfExcludingThis

Categories

(Core :: XPCOM, defect, P5)

defect

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

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

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

This looks like a race on the memory reporting in ThreadsReporter::CollectReports().

Component: DMD → XPCOM
Attached file log (obsolete) —
Blocks: tsan

Any chance this is related to bug 1808343?

Flags: needinfo?(continuation)

No. It looks like this race is related to ThreadEventQueue.

If the line numbers haven't changed since the last failure, the memory reporter is on this line:
n += mBaseQueue->SizeOfIncludingThis(aMallocSizeOf);

Bug 1749610 added a lock for mNestedQueues but not mBaseQueue in this function, for whatever reason.

Flags: needinfo?(continuation)
Attachment #9263154 - Attachment is obsolete: true
Attachment #9329962 - Attachment description: TSan report from February 2022 → TSan report from February 2023

Randell, this might be of interest to you if you are looking for more lock annotations to do, though it looks rather rare.

Flags: needinfo?(rjesup)

If the line numbers haven't changed since the last failure, the memory reporter is on this line:
n += mBaseQueue->SizeOfIncludingThis(aMallocSizeOf);

Bug 1749610 added a lock for mNestedQueues but not mBaseQueue in this function, for whatever reason.

It make mBaseQueue a const, so how can there be a data race on it? It's never set outside of the constructor

Flags: needinfo?(rjesup)

It looks more like a race on mHead in Queue.h:233
So the data pointed to by mBaseQueue is getting raced on, not mBaseQueue itself. We can move it inside the lock I think

Assignee: nobody → rjesup
Status: NEW → ASSIGNED
Pushed by rjesup@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ddee226cc4d2 Resolve TSAN issue with mBaseQueue in memory reporting r=mccr8
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: