Closed Bug 1754608 Opened 3 years ago Closed 2 years ago

Intermittent SUMMARY: ThreadSanitizer: data race on ConfirmationContext::TaskAddr / mTask.get()

Categories

(Core :: Networking: DNS, defect, P3)

defect

Tracking

()

RESOLVED FIXED
99 Branch

People

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

References

(Blocks 2 open bugs)

Details

(Keywords: csectype-race, intermittent-failure, sec-moderate, Whiteboard: [necko-triaged])

Attachments

(1 file)

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


[task 2022-02-09T23:27:01.739Z] 23:27:01     INFO -  TEST-PASS | security/manager/ssl/tests/unit/test_validity.js | took 2984ms
[task 2022-02-09T23:27:01.742Z] 23:27:01     INFO -  Retrying tests that failed when run in parallel.
[task 2022-02-09T23:27:01.744Z] 23:27:01     INFO -  TEST-START | netwerk/test/unit/test_trr.js
[task 2022-02-09T23:27:31.916Z] 23:27:31  WARNING -  TEST-UNEXPECTED-FAIL | netwerk/test/unit/test_trr.js | xpcshell return code: -6
[task 2022-02-09T23:27:31.916Z] 23:27:31     INFO -  TEST-INFO took 30171ms
[task 2022-02-09T23:27:31.916Z] 23:27:31     INFO -  >>>>>>>
[task 2022-02-09T23:27:31.918Z] 23:27:31     INFO -  PID 22240 | start!
[task 2022-02-09T23:27:31.918Z] 23:27:31     INFO -  TEST-PASS | netwerk/test/unit/test_trr.js | setup - [setup : 10] "33846" != null
Attached file tsan-log.txt

Drive-by comment, extracting the tsan log from the treeherder file (which is bound to expire eventually)

The stack seems to point to TRRService::Observe and TRRService::ConfirmationContext.

Component: DOM: Workers → Networking: DNS
Blocks: tsan
Keywords: csectype-race

From the line numbers, it looks like a race on TRRService::ConfirmationContext::mTask.

Valentin, can you take a look?

Flags: needinfo?(valentin.gosu)

This is indeed a race on mTask caused by us using the address of the task object to check if we should trigger a new confirmation.
We should either lock mTask or figure out a better way of doing this that doesn't rely on mTask at all. Either way, I don't see any ways this could turn into a vulnerability.

Blocks: doh
Flags: needinfo?(valentin.gosu)
Priority: P5 → P3
Summary: Intermittent SUMMARY: ThreadSanitizer: data race /builds/worker/workspace/obj-build/dist/include/mozilla/RefPtr.h:286:27 in get → Intermittent SUMMARY: ThreadSanitizer: data race on ConfirmationContext::TaskAddr / mTask.get()
Group: core-security → network-core-security
Whiteboard: [necko-triaged]

This bug seems to be fixed by bug 1755877.
I think we can close this one.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Assignee: nobody → kershaw
Group: network-core-security → core-security-release
Depends on: 1755877
Target Milestone: --- → 99 Branch
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: