Closed
Bug 1755877
Opened 3 years ago
Closed 3 years ago
ThreadSanitizer: data race /builds/worker/workspace/obj-build/dist/include/mozilla/RefPtr.h:286:27 in get
Categories
(Core :: Networking: DNS, defect, P2)
Core
Networking: DNS
Tracking
()
RESOLVED
FIXED
99 Branch
Tracking | Status | |
---|---|---|
firefox99 | --- | fixed |
People
(Reporter: kershaw, Assigned: kershaw)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
Noticed this on this try run.
It seems that we only read TaskAddr on main thread, not deference it, so we don't need to hide this bug.
[task 2022-02-14T11:49:52.084Z] 11:49:52 INFO - PID 16403 | ==================
[task 2022-02-14T11:49:52.084Z] 11:49:52 INFO - PID 16403 | WARNING: ThreadSanitizer: data race (pid=16403)
[task 2022-02-14T11:49:52.085Z] 11:49:52 INFO - PID 16403 | Read of size 8 at 0x7b58000391d8 by main thread:
[task 2022-02-14T11:49:52.085Z] 11:49:52 INFO - PID 16403 | #0 get /builds/worker/workspace/obj-build/dist/include/mozilla/RefPtr.h:286:27 (libxul.so+0x1249aa1)
[task 2022-02-14T11:49:52.085Z] 11:49:52 INFO - PID 16403 | #1 TaskAddr /builds/worker/checkouts/gecko/netwerk/dns/TRRService.h:260:51 (libxul.so+0x1249aa1)
[task 2022-02-14T11:49:52.085Z] 11:49:52 INFO - PID 16403 | #2 TaskAddr /builds/worker/checkouts/gecko/netwerk/dns/TRRService.h:322:49 (libxul.so+0x1249aa1)
[task 2022-02-14T11:49:52.085Z] 11:49:52 INFO - PID 16403 | #3 mozilla::net::TRRService::Observe(nsISupports*, char const*, char16_t const*) /builds/worker/checkouts/gecko/netwerk/dns/TRRService.cpp:527:35 (libxul.so+0x1249aa1)
[task 2022-02-14T11:49:52.085Z] 11:49:52 INFO - PID 16403 | #4 non-virtual thunk to mozilla::net::TRRService::Observe(nsISupports*, char const*, char16_t const*) /builds/worker/checkouts/gecko/netwerk/dns/TRRService.cpp (libxul.so+0x124a488)
[task 2022-02-14T11:49:52.085Z] 11:49:52 INFO - PID 16403 | #5 nsPrefBranch::NotifyObserver(char const*, void*) /builds/worker/checkouts/gecko/modules/libpref/Preferences.cpp:2702:13 (libxul.so+0xff8feb)
[task 2022-02-14T11:49:52.085Z] 11:49:52 INFO - PID 16403 | #6 NotifyCallbacks(nsTString<char> const&, PrefWrapper const*) /builds/worker/checkouts/gecko/modules/libpref/Preferences.cpp:1698:9 (libxul.so+0x101599d)
[task 2022-02-14T11:49:52.085Z] 11:49:52 INFO - PID 16403 | #7 NotifyCallbacks /builds/worker/checkouts/gecko/modules/libpref/Preferences.cpp:1453:3 (libxul.so+0x1057151)
[task 2022-02-14T11:49:52.085Z] 11:49:52 INFO - PID 16403 | #8 pref_SetPref(nsTString<char> const&, mozilla::PrefType, mozilla::PrefValueKind, PrefValue, bool, bool, bool) /builds/worker/checkouts/gecko/modules/libpref/Preferences.cpp:1656:5 (libxul.so+0x1057151)
[task 2022-02-14T11:49:52.085Z] 11:49:52 INFO - PID 16403 | #9 mozilla::Preferences::SetCString(char const*, nsTSubstring<char> const&, mozilla::PrefValueKind) /builds/worker/checkouts/gecko/modules/libpref/Preferences.cpp:4877:10 (libxul.so+0xff45a4)
[task 2022-02-14T11:49:52.085Z] 11:49:52 INFO - PID 16403 | #10 SetCharPrefNoLengthCheck /builds/worker/checkouts/gecko/modules/libpref/Preferences.cpp:2162:10 (libxul.so+0xff445d)
[task 2022-02-14T11:49:52.104Z] 11:49:52 INFO - PID 16403 | Previous write of size 8 at 0x7b58000391d8 by thread T10 (mutexes: write M270351595529801920):
[task 2022-02-14T11:49:52.104Z] 11:49:52 INFO - PID 16403 | #0 assign_assuming_AddRef /builds/worker/workspace/obj-build/dist/include/mozilla/RefPtr.h:67:13 (libxul.so+0x124a8fa)
[task 2022-02-14T11:49:52.105Z] 11:49:52 INFO - PID 16403 | #1 operator= /builds/worker/workspace/obj-build/dist/include/mozilla/RefPtr.h:168:5 (libxul.so+0x124a8fa)
[task 2022-02-14T11:49:52.105Z] 11:49:52 INFO - PID 16403 | #2 mozilla::net::TRRService::ConfirmationContext::HandleEvent(mozilla::net::TRRService::ConfirmationEvent, mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /builds/worker/checkouts/gecko/netwerk/dns/TRRService.cpp:789:13 (libxul.so+0x124a8fa)
[task 2022-02-14T11:49:52.106Z] 11:49:52 INFO - PID 16403 | #3 mozilla::net::TRRService::ConfirmationContext::CompleteConfirmation(nsresult, mozilla::net::TRR*) /builds/worker/checkouts/gecko/netwerk/dns/TRRService.cpp (libxul.so+0x124dcfd)
[task 2022-02-14T11:49:52.106Z] 11:49:52 INFO - PID 16403 | #4 CompleteConfirmation /builds/worker/checkouts/gecko/netwerk/dns/TRRService.h:303:21 (libxul.so+0x124df10)
[task 2022-02-14T11:49:52.107Z] 11:49:52 INFO - PID 16403 | #5 mozilla::net::TRRService::CompleteLookup(nsHostRecord*, nsresult, mozilla::net::AddrInfo*, bool, nsTSubstring<char> const&, mozilla::net::TRRSkippedReason, mozilla::net::TRR*) /builds/worker/checkouts/gecko/netwerk/dns/TRRService.cpp:1263:19 (libxul.so+0x124df10)
[task 2022-02-14T11:49:52.107Z] 11:49:52 INFO - PID 16403 | #6 non-virtual thunk to mozilla::net::TRRService::CompleteLookup(nsHostRecord*, nsresult, mozilla::net::AddrInfo*, bool, nsTSubstring<char> const&, mozilla::net::TRRSkippedReason, mozilla::net::TRR*) /builds/worker/checkouts/gecko/netwerk/dns/TRRService.cpp (libxul.so+0x124e109)
[task 2022-02-14T11:49:52.108Z] 11:49:52 INFO - PID 16403 | #7 mozilla::net::TRR::ReturnData(nsIChannel*) /builds/worker/checkouts/gecko/netwerk/dns/TRR.cpp:749:26 (libxul.so+0x1240c07)
[task 2022-02-14T11:49:52.108Z] 11:49:52 INFO - PID 16403 | #8 mozilla::net::TRR::On200Response(nsIChannel*) /builds/worker/checkouts/gecko/netwerk/dns/TRR.cpp:871:5 (libxul.so+0x1241943)
[task 2022-02-14T11:49:52.109Z] 11:49:52 INFO - PID 16403 | #9 mozilla::net::TRR::OnStopRequest(nsIRequest*, nsresult) /builds/worker/checkouts/gecko/netwerk/dns/TRR.cpp:977:12 (libxul.so+0x1241f61)
[task 2022-02-14T11:49:52.109Z] 11:49:52 INFO - PID 16403 | #10 non-virtual thunk to mozilla::net::TRR::OnStopRequest(nsIRequest*, nsresult) /builds/worker/checkouts/gecko/netwerk/dns/TRR.cpp (libxul.so+0x1242648)
[task 2022-02-14T11:49:52.110Z] 11:49:52 INFO - PID 16403 | #11 mozilla::net::TRRServiceChannel::OnStopRequest(nsIRequest*, nsresult) /builds/worker/checkouts/gecko/netwerk/protocol/http/TRRServiceChannel.cpp:1198:16 (libxul.so+0x168928a)
[task 2022-02-14T11:49:52.110Z] 11:49:52 INFO - PID 16403 | #12 non-virtual thunk to mozilla::net::TRRServiceChannel::OnStopRequest(nsIRequest*, nsresult) /builds/worker/checkouts/gecko/netwerk/protocol/http/TRRServiceChannel.cpp (libxul.so+0x168946b)
Assignee | ||
Comment 1•3 years ago
|
||
Since TRRService::MaybeSetPrivateURI() is the only case that can triggers a new confirmation when TRRService::ReadPrefs() is called, making ConfirmationContext::Handle() returns a boolean value should be enough for this case.
Pushed by kjang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8bee7f199f21
Fix the race on mConfirmation.TaskAddr(), r=necko-reviewers,valentin
Comment 3•3 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 3 years ago
status-firefox99:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•