Closed Bug 1645696 Opened 4 years ago Closed 4 years ago

Intermittent SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpHandler.cpp:1975:27 in mozilla::net::nsHttpHandler::PrefsChanged(char const*)

Categories

(Core :: DOM: Device Interfaces, defect, P5)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

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

References

(Blocks 1 open bug)

Details

(Keywords: intermittent-failure)

Attachments

(4 files)

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


[task 2020-06-14T15:26:15.183Z] 15:26:15 INFO - TEST-START | dom/credentialmanagement/tests/mochitest/test_credman_iframes.html
[task 2020-06-14T15:26:18.364Z] 15:26:18 INFO - GECKO(1612) | #39 do_main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:217:22 (firefox+0xca433)
[task 2020-06-14T15:26:18.364Z] 15:26:18 INFO - GECKO(1612) | #40 main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:331:16 (firefox+0xca433)
[task 2020-06-14T15:26:18.365Z] 15:26:18 INFO - GECKO(1612) | SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpHandler.cpp:1975:27 in mozilla::net::nsHttpHandler::PrefsChanged(char const*)
[task 2020-06-14T15:26:18.365Z] 15:26:18 INFO - GECKO(1612) | ==================
[task 2020-06-14T15:26:18.366Z] 15:26:18 INFO - GECKO(1612) | Crash Annotation GraphicsCriticalError: |[C0][GFX1-]: Receive IPC close with reason=AbnormalShutdown (t=11.3857) [GFX1-]: Receive IPC close with reason=AbnormalShutdown
[task 2020-06-14T15:26:18.367Z] 15:26:18 INFO - GECKO(1612) | Exiting due to channel error.
[task 2020-06-14T15:26:18.367Z] 15:26:18 INFO - GECKO(1612) | Crash Annotation GraphicsCriticalError: |[C0][GFX1-]: Receive IPC close with reason=AbnormalShutdown (t=14.1084) [GFX1-]: Receive IPC close with reason=AbnormalShutdown
[task 2020-06-14T15:26:18.367Z] 15:26:18 INFO - GECKO(1612) | Exiting due to channel error.
[task 2020-06-14T15:26:18.368Z] 15:26:18 INFO - GECKO(1612) | Crash Annotation GraphicsCriticalError: |[C0][GFX1-]: Receive IPC close with reason=AbnormalShutdown (t=25.7987) [GFX1-]: Receive IPC close with reason=AbnormalShutdown
[task 2020-06-14T15:26:18.368Z] 15:26:18 INFO - GECKO(1612) | Exiting due to channel error.
[task 2020-06-14T15:26:18.369Z] 15:26:18 INFO - GECKO(1612) | Exiting due to channel error.
[task 2020-06-14T15:26:19.378Z] 15:26:19 INFO - GECKO(1612) | Crash Annotation GraphicsCriticalError: |[C0][GFX1-]: Receive IPC close with reason=AbnormalShutdown (t=24.8695)
[task 2020-06-14T15:26:19.413Z] 15:26:19 INFO - TEST-INFO | Main app process: killed by SIGIOT

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Blocks: tsan
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
This is an automated crash issue comment: Summary: ThreadSanitizer: data race [@ ResponseTimeoutEnabled] vs. [@ mozilla::net::nsHttpHandler::PrefsChanged] Build version: autoland revision c5704e3fc7fa5e48eb3f9edd4319f4ba2c0d6999 For detailed crash information, see attachment.

This is specifically caused by the bool mResponseTimeoutEnabled, which we are reading on the socket thread during nsHTTPConnection::Activate. We're always going to call PrefsChanged on the main thread, so to avoid racing with the socket thread we probably ought to make mResponseTimeoutEnabled atomic or something. I haven't checked to see if anything else being read off that prefs list would have the same issue.

Gonna suppress this as I think Bug 1683730 makes it worse. That said, I think we should also send the naive fix to the netwerk team's desk and see what they think.

Assignee: nobody → a.beingessner
Pushed by abeingessner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9fa81031443b suppress issue that gets worse with full shutdown. r=decoder
Assignee: a.beingessner → nobody

It appears two values are accessed offthread in nsHttpConnection. While it is unlikely that UpdateMirror and nsHttpConnection::Activate would ever overlap, the possibility is nonzero and could potentially lead to a race.

I'm going to go ahead and land this, and continue to leave the bug open until I remove the suppression.

Pushed by kwright@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b9e5e92b6ea9 Make nsHttpHandler prefs that are accessed offthread atomic r=necko-reviewers,dragana
Keywords: leave-open
Pushed by kwright@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2790e5a95539 Remove suppressions for issue. r=decoder
Assignee: nobody → kwright
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: