Closed Bug 1715524 Opened 4 years ago Closed 4 years ago

ThreadSanitizer: data race /builds/worker/checkouts/gecko/gfx/2d/FilterNodeSoftware.cpp:1776:10 in mozilla::gfx::FilterNodeComponentTransferSoftware::GenerateLookupTable(long, unsigned char (*) [256], bool)

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The following is not thread safe, and when we rasterize blob recordings on WR worker threads, we can conflict:

https://searchfox.org/mozilla-central/rev/79d73b4aff88dd4a0f06dd3789e1148c49b0de60/gfx/2d/FilterNodeSoftware.cpp#1774

This trips tsan failures although since all the threads are writing the same thing, it should be reasonably safe. We need to fix this to green the tree.

Blocks: wr-test-triage-blocking
No longer blocks: wr-test-triage
Blocks: tsan

Do you have any opinions on how this should be fixed? Mutex? (jrmuizel suggested you)

Flags: needinfo?(mstange.moz)

Mutex sounds good, yes. Or maybe it should just be written out in its entirety, it's only 256 values. Then it can be put into static storage and doesn't need to be initialized manually.
This is some silly code, really.

Flags: needinfo?(mstange.moz)

Oh good point. We already reserved the static store memory. I'll prep the table in advance. Thanks!

Assignee: nobody → aosmond
Status: NEW → ASSIGNED
Attachment #9226543 - Attachment description: Bug 1715524 - Make FilterNodeComponentTransferSoftware::GenerateLookupTable identify table a constant. → Bug 1715524 - Make FilterNodeComponentTransferSoftware::GenerateLookupTable identify table dynamic.
Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a9e81cc4ad25 Make FilterNodeComponentTransferSoftware::GenerateLookupTable identify table dynamic. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: