Closed Bug 1633239 Opened 4 years ago Closed 3 years ago

Intermittent SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/netwerk/cache2/CacheStorageService.cpp:1273:41 in mozilla::net::CacheStorageService::OnMemoryConsumptionChange(mozilla::net::CacheMemoryConsumer*, unsigned int)

Categories

(Core :: Networking: Cache, defect, P5)

defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

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

References

(Blocks 1 open bug)

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

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


[task 2020-04-26T07:09:20.617Z] 07:09:20 INFO - TEST-START | layout/style/test/test_css_cross_domain.html
[task 2020-04-26T07:09:26.469Z] 07:09:26 INFO - GECKO(1247) | ==================
[task 2020-04-26T07:09:26.470Z] 07:09:26 INFO - GECKO(1247) | WARNING: ThreadSanitizer: data race (pid=1247)
[task 2020-04-26T07:09:26.470Z] 07:09:26 INFO - GECKO(1247) | Write of size 4 at 0x7b38002b74c8 by main thread (mutexes: write M298499007304260776):
[task 2020-04-26T07:09:26.470Z] 07:09:26 INFO - GECKO(1247) | #0 mozilla::net::CacheStorageService::OnMemoryConsumptionChange(mozilla::net::CacheMemoryConsumer*, unsigned int) /builds/worker/checkouts/gecko/netwerk/cache2/CacheStorageService.cpp:1273:41 (libxul.so+0xfb4377)
[task 2020-04-26T07:09:26.470Z] 07:09:26 INFO - GECKO(1247) | #1 mozilla::net::CacheMemoryConsumer::DoMemoryReport(unsigned int) /builds/worker/checkouts/gecko/netwerk/cache2/CacheStorageService.cpp:71:34 (libxul.so+0xfb42d0)
[task 2020-04-26T07:09:26.470Z] 07:09:26 INFO - GECKO(1247) | #2 EnsureBuffer /builds/worker/checkouts/gecko/netwerk/cache2/CacheFileMetadata.cpp:1011:5 (libxul.so+0xf65961)
[task 2020-04-26T07:09:26.470Z] 07:09:26 INFO - GECKO(1247) | #3 mozilla::net::CacheFileMetadata::SetElement(char const*, char const*) /builds/worker/checkouts/gecko/netwerk/cache2/CacheFileMetadata.cpp:455:10 (libxul.so+0xf65961)
[task 2020-04-26T07:09:26.470Z] 07:09:26 INFO - GECKO(1247) | #4 mozilla::net::CacheFile::SetElement(char const*, char const*) /builds/worker/checkouts/gecko/netwerk/cache2/CacheFile.cpp:1116:21 (libxul.so+0xf5b348)
[task 2020-04-26T07:09:26.470Z] 07:09:26 INFO - GECKO(1247) | #5 SetMetaDataElement /builds/worker/checkouts/gecko/netwerk/cache2/CacheEntry.cpp:1419:17 (libxul.so+0xfaa8e7)
[task 2020-04-26T07:09:26.470Z] 07:09:26 INFO - GECKO(1247) | #6 mozilla::net::CacheEntryHandle::SetMetaDataElement(char const*, char const*) /builds/worker/checkouts/gecko/netwerk/cache2/CacheEntry.h:500:20 (libxul.so+0xfaa8e7)
[task 2020-04-26T07:09:26.473Z] 07:09:26 INFO - GECKO(1247) | #7 mozilla::net::DoAddCacheEntryHeaders(mozilla::net::nsHttpChannel*, nsICacheEntry*, mozilla::net::nsHttpRequestHead*, mozilla::net::nsHttpResponseHead*, nsISupports*) /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:5671:15 (libxul.so+0x112d244)
[task 2020-04-26T07:09:26.475Z] 07:09:26 INFO - GECKO(1247) | #8 AddCacheEntryHeaders /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:5685:10 (libxul.so+0x1120d3e)[task 2020-04-26T07:09:26.476Z] 07:09:26 INFO - GECKO(1247) | #9 mozilla::net::nsHttpChannel::InitCacheEntry() /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:5524:8 (libxul.so+0x1120d3e)
[task 2020-04-26T07:09:26.477Z] 07:09:26 INFO - GECKO(1247) | #10 mozilla::net::nsHttpChannel::ContinueProcessNormal(nsresult) /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:3087:10 (libxul.so+0x11210c7)
[task 2020-04-26T07:09:26.477Z] 07:09:26 INFO - GECKO(1247) | #11 mozilla::net::nsHttpChannel::ProcessNormal() /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:3054:10 (libxul.so+0x111e7d4)
[task 2020-04-26T07:09:26.477Z] 07:09:26 INFO - GECKO(1247) | #12 mozilla::net::nsHttpChannel::ContinueProcessResponse3(nsresult) /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp (libxul.so+0x111df07)
[task 2020-04-26T07:09:26.482Z] 07:09:26 INFO - GECKO(1247) | #13 mozilla::net::nsHttpChannel::ContinueProcessResponse2(nsresult) /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:2707:10 (libxul.so+0x111d8af)
[task 2020-04-26T07:09:26.482Z] 07:09:26 INFO - GECKO(1247) | #14 mozilla::net::nsHttpChannel::ContinueProcessResponse1() /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:2680:10 (libxul.so+0x111c144)
[task 2020-04-26T07:09:26.482Z] 07:09:26 INFO - GECKO(1247) | #15 mozilla::net::nsHttpChannel::ProcessResponse() /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:2573:10 (libxul.so+0x111bd20)
[task 2020-04-26T07:09:26.483Z] 07:09:26 INFO - GECKO(1247) | #16 mozilla::net::nsHttpChannel::OnStartRequest(nsIRequest*) /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:7791:31 (libxul.so+0x1139908)
[task 2020-04-26T07:09:26.483Z] 07:09:26 INFO - GECKO(1247) | #17 non-virtual thunk to mozilla::net::nsHttpChannel::OnStartRequest(nsIRequest*) /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp (libxul.so+0x113a045)
[task 2020-04-26T07:09:26.483Z] 07:09:26 INFO - GECKO(1247) | #18 nsInputStreamPump::OnStateStart() /builds/worker/checkouts/gecko/netwerk/base/nsInputStreamPump.cpp:518:21 (libxul.so+0xc31af4)
[task 2020-04-26T07:09:26.484Z] 07:09:26 INFO - GECKO(1247) | #19 nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*) /builds/worker/checkouts/gecko/netwerk/base/nsInputStreamPump.cpp:427:21 (libxul.so+0xc31695)
[task 2020-04-26T07:09:26.485Z] 07:09:26 INFO - GECKO(1247) | #20 non-virtual thunk to nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*) /builds/worker/checkouts/gecko/netwerk/base/nsInputStreamPump.cpp (libxul.so+0xc32829)
[task 2020-04-26T07:09:26.485Z] 07:09:26 INFO - GECKO(1247) | #21 nsInputStreamReadyEvent::Run() /builds/worker/checkouts/gecko/xpcom/io/nsStreamUtils.cpp:94:20 (libxul.so+0xa9cf0c)
[task 2020-04-26T07:09:26.485Z] 07:09:26 INFO - GECKO(1247) | #22 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1200:14 (libxul.so+0xadecbf)
[task 2020-04-26T07:09:26.486Z] 07:09:26 INFO - GECKO(1247) | #23 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xae3612)
[task 2020-04-26T07:09:26.486Z] 07:09:26 INFO - GECKO(1247) | #24 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x13775a9)
[task 2020-04-26T07:09:26.486Z] 07:09:26 INFO - GECKO(1247) | #25 RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x1307fac)
[task 2020-04-26T07:09:26.487Z] 07:09:26 INFO - GECKO(1247) | #26 RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x1307fac)
[task 2020-04-26T07:09:26.487Z] 07:09:26 INFO - GECKO(1247) | #27 MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x1307fac)
[task 2020-04-26T07:09:26.488Z] 07:09:26 INFO - GECKO(1247) | #28 nsBaseAppShell::Run() /builds/worker/checkouts/gecko/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x4795c93)
[task 2020-04-26T07:09:26.488Z] 07:09:26 INFO - GECKO(1247) | #29 nsAppStartup::Run() /builds/worker/checkouts/gecko/toolkit/components/startup/nsAppStartup.cpp:271:30 (libxul.so+0x6270425)
[task 2020-04-26T07:09:26.489Z] 07:09:26 INFO - GECKO(1247) | #30 XREMain::XRE_mainRun() /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4608:22 (libxul.so+0x637cd5a)[task 2020-04-26T07:09:26.489Z] 07:09:26 INFO - GECKO(1247) | #31 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4743:8 (libxul.so+0x637d943)
[task 2020-04-26T07:09:26.490Z] 07:09:26 INFO - GECKO(1247) | #32 XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4797:21 (libxul.so+0x637dca4)
[task 2020-04-26T07:09:26.490Z] 07:09:26 INFO - GECKO(1247) | #33 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0x63887e2)
[task 2020-04-26T07:09:26.491Z] 07:09:26 INFO - GECKO(1247) | #34 do_main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:217:22 (firefox+0xc93e3)
[task 2020-04-26T07:09:26.491Z] 07:09:26 INFO - GECKO(1247) | #35 main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:331:16 (firefox+0xc93e3)
[task 2020-04-26T07:09:26.492Z] 07:09:26 INFO - GECKO(1247) | Previous read of size 4 at 0x7b38002b74c8 by thread T16:
[task 2020-04-26T07:09:26.493Z] 07:09:26 INFO - GECKO(1247) | [failed to restore the stack]
[task 2020-04-26T07:09:26.494Z] 07:09:26 INFO - GECKO(1247) | Location is heap block of size 216 at 0x7b38002b74c0 allocated by main thread:
[task 2020-04-26T07:09:26.496Z] 07:09:26 INFO - GECKO(1247) | #0 malloc /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:650:5 (firefox+0x55bb4)
[task 2020-04-26T07:09:26.497Z] 07:09:26 INFO - GECKO(1247) | #1 moz_xmalloc /builds/worker/checkouts/gecko/memory/mozalloc/mozalloc.cpp:52:15 (firefox+0xca6e8)
[task 2020-04-26T07:09:26.497Z] 07:09:26 INFO - GECKO(1247) | #2 operator new /builds/worker/workspace/obj-build/dist/include/mozilla/cxxalloc.h:33:10 (libxul.so+0xf53ae3)
[task 2020-04-26T07:09:26.498Z] 07:09:26 INFO - GECKO(1247) | #3 mozilla::net::CacheFile::Init(nsTSubstring<char> const&, bool, bool, bool, bool, bool, mozilla::net::CacheFileListener*) /builds/worker/checkouts/gecko/netwerk/cache2/CacheFile.cpp:237:19 (libxul.so+0xf53ae3)
[task 2020-04-26T07:09:26.500Z] 07:09:26 INFO - GECKO(1247) | #4 mozilla::net::CacheEntry::Load(bool, bool) /builds/worker/checkouts/gecko/netwerk/cache2/CacheEntry.cpp:433:19 (libxul.so+0xf526a1)
[task 2020-04-26T07:09:26.501Z] 07:09:26 INFO - GECKO(1247) | #5 Open /builds/worker/checkouts/gecko/netwerk/cache2/CacheEntry.cpp:334:7 (libxul.so+0xf51288)[task 2020-04-26T07:09:26.502Z] 07:09:26 INFO - GECKO(1247) | #6 mozilla::net::CacheEntry::AsyncOpen(nsICacheEntryOpenCallback*, unsigned int) /builds/worker/checkouts/gecko/netwerk/cache2/CacheEntry.cpp:314:8 (libxul.so+0xf51288)
[task 2020-04-26T07:09:26.504Z] 07:09:26 INFO - GECKO(1247) | #7 mozilla::net::CacheStorage::AsyncOpenURI(nsIURI*, nsTSubstring<char> const&, unsigned int, nsICacheEntryOpenCallback*) /builds/worker/checkouts/gecko/netwerk/cache2/CacheStorage.cpp:104:19 (libxul.so+0xf4e995)
[task 2020-04-26T07:09:26.504Z] 07:09:26 INFO - GECKO(1247) | #8 mozilla::net::nsHttpChannel::OpenCacheEntryInternal(bool, nsIApplicationCache*, bool) /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:4194:24 (libxul.so+0x1126ef3)
[task 2020-04-26T07:09:26.507Z] 07:09:26 INFO - GECKO(1247) | #9 mozilla::net::nsHttpChannel::OpenCacheEntry(bool) /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:3997:10 (libxul.so+0x1110a73)
[task 2020-04-26T07:09:26.508Z] 07:09:26 INFO - GECKO(1247) | #10 mozilla::net::nsHttpChannel::ConnectOnTailUnblock() /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:791:8 (libxul.so+0x11102f8)
[task 2020-04-26T07:09:26.509Z] 07:09:26 INFO - GECKO(1247) | #11 mozilla::net::nsHttpChannel::Connect() /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:779:10 (libxul.so+0x110f609)
[task 2020-04-26T07:09:26.510Z] 07:09:26 INFO - GECKO(1247) | #12 mozilla::net::nsHttpChannel::ContinueOnBeforeConnect(bool, nsresult) /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:728:10 (libxul.so+0x110ea85)
[task 2020-04-26T07:09:26.510Z] 07:09:26 INFO - GECKO(1247) | #13 mozilla::net::nsHttpChannel::OnBeforeConnect() /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:652:10 (libxul.so+0x110d167)
[task 2020-04-26T07:09:26.511Z] 07:09:26 INFO - GECKO(1247) | #14 mozilla::net::nsHttpChannel::PrepareToConnect() /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:515:10 (libxul.so+0x110c9dc)
[task 2020-04-26T07:09:26.512Z] 07:09:26 INFO - GECKO(1247) | #15 mozilla::net::nsHttpChannel::ContinueBeginConnectWithResult() /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:7135:10 (libxul.so+0x113607e)
[task 2020-04-26T07:09:26.513Z] 07:09:26 INFO - GECKO(1247) | #16 mozilla::net::nsHttpChannel::BeginConnect() /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:6917:8 (libxul.so+0x1133b75)
[task 2020-04-26T07:09:26.513Z] 07:09:26 INFO - GECKO(1247) | #17 mozilla::net::nsHttpChannel::OnProxyAvailable(nsICancelable*, nsIChannel*, nsIProxyInfo*, nsresult) /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:7233:10 (libxul.so+0x1137995)
[task 2020-04-26T07:09:26.515Z] 07:09:26 INFO - GECKO(1247) | #18 non-virtual thunk to mozilla::net::nsHttpChannel::OnProxyAvailable(nsICancelable*, nsIChannel*, nsIProxyInfo*, nsresult) /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp (libxul.so+0x1137b0b)
[task 2020-04-26T07:09:26.515Z] 07:09:26 INFO - GECKO(1247) | #19 mozilla::net::nsAsyncResolveRequest::DoCallback()::'lambda'(mozilla::net::nsAsyncResolveRequest*, nsIProxyInfo*, bool)::operator()(mozilla::net::nsAsyncResolveRequest*, nsIProxyInfo*, bool) const /builds/worker/checkouts/gecko/netwerk/base/nsProtocolProxyService.cpp:364:26 (libxul.so+0xc97a7d)
[task 2020-04-26T07:09:26.516Z] 07:09:26 INFO - GECKO(1247) | #20 std::_Function_handler<nsresult (mozilla::net::nsAsyncResolveRequest*, nsIProxyInfo*, bool), mozilla::net::nsAsyncResolveRequest::DoCallback()::'lambda'(mozilla::net::nsAsyncResolveRequest*, nsIProxyInfo*, bool)>::_M_invoke(std::_Any_data const&, mozilla::net::nsAsyncResolveRequest*&&, nsIProxyInfo*&&, bool&&) /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:301:9 (libxul.so+0xc97bce)
[task 2020-04-26T07:09:26.517Z] 07:09:26 INFO - GECKO(1247) | #21 operator() /builds/worker/fetches/clang/bin/../lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/std_function.h:706:14 (libxul.so+0xc55ead)
[task 2020-04-26T07:09:26.517Z] 07:09:26 INFO - GECKO(1247) | #22 mozilla::net::nsAsyncResolveRequest::AsyncApplyFilters::Finish() /builds/worker/checkouts/gecko/netwerk/base/nsProtocolProxyService.cpp:598:10 (libxul.so+0xc55ead)
[task 2020-04-26T07:09:26.518Z] 07:09:26 INFO - GECKO(1247) | #23 mozilla::net::nsAsyncResolveRequest::AsyncApplyFilters::ProcessNextFilter() /builds/worker/checkouts/gecko/netwerk/base/nsProtocolProxyService.cpp:508:14 (libxul.so+0xc55ad2)
[task 2020-04-26T07:09:26.518Z] 07:09:26 INFO - GECKO(1247) | #24 mozilla::net::nsAsyncResolveRequest::AsyncApplyFilters::AsyncProcess(mozilla::net::nsAsyncResolveRequest*) /builds/worker/checkouts/gecko/netwerk/base/nsProtocolProxyService.cpp:484:19 (libxul.so+0xc556c8)
[task 2020-04-26T07:09:26.519Z] 07:09:26 INFO - GECKO(1247) | #25 mozilla::net::nsAsyncResolveRequest::DoCallback() /builds/worker/checkouts/gecko/netwerk/base/nsProtocolProxyService.cpp:373:30 (libxul.so+0xc97514)
[task 2020-04-26T07:09:26.520Z] 07:09:26 INFO - GECKO(1247) | #26 OnQueryComplete /builds/worker/checkouts/gecko/netwerk/base/nsProtocolProxyService.cpp:319:5 (libxul.so+0xc9267f)
[task 2020-04-26T07:09:26.520Z] 07:09:26 INFO - GECKO(1247) | #27 non-virtual thunk to mozilla::net::nsAsyncResolveRequest::OnQueryComplete(nsresult, nsTSubstring<char> const&, nsTSubstring<char> const&) /builds/worker/checkouts/gecko/netwerk/base/nsProtocolProxyService.cpp (libxul.so+0xc9267f)
[task 2020-04-26T07:09:26.521Z] 07:09:26 INFO - GECKO(1247) | #28 mozilla::net::ExecuteCallback::Run() /builds/worker/checkouts/gecko/netwerk/base/nsPACMan.cpp:123:16 (libxul.so+0xc4fe04)
[task 2020-04-26T07:09:26.521Z] 07:09:26 INFO - GECKO(1247) | #29 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1200:14 (libxul.so+0xadecbf)
[task 2020-04-26T07:09:26.522Z] 07:09:26 INFO - GECKO(1247) | #30 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:481:10 (libxul.so+0xae3612)
[task 2020-04-26T07:09:26.523Z] 07:09:26 INFO - GECKO(1247) | #31 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:87:21 (libxul.so+0x13775a9)
[task 2020-04-26T07:09:26.524Z] 07:09:26 INFO - GECKO(1247) | #32 RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:315:10 (libxul.so+0x1307fac)
[task 2020-04-26T07:09:26.524Z] 07:09:26 INFO - GECKO(1247) | #33 RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:308:3 (libxul.so+0x1307fac)
[task 2020-04-26T07:09:26.524Z] 07:09:26 INFO - GECKO(1247) | #34 MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:290:3 (libxul.so+0x1307fac)
[task 2020-04-26T07:09:26.525Z] 07:09:26 INFO - GECKO(1247) | #35 nsBaseAppShell::Run() /builds/worker/checkouts/gecko/widget/nsBaseAppShell.cpp:137:27 (libxul.so+0x4795c93)[task 2020-04-26T07:09:26.526Z] 07:09:26 INFO - GECKO(1247) | #36 nsAppStartup::Run() /builds/worker/checkouts/gecko/toolkit/components/startup/nsAppStartup.cpp:271:30 (libxul.so+0x6270425)
[task 2020-04-26T07:09:26.527Z] 07:09:26 INFO - GECKO(1247) | #37 XREMain::XRE_mainRun() /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4608:22 (libxul.so+0x637cd5a)
[task 2020-04-26T07:09:26.527Z] 07:09:26 INFO - GECKO(1247) | #38 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4743:8 (libxul.so+0x637d943)
[task 2020-04-26T07:09:26.527Z] 07:09:26 INFO - GECKO(1247) | #39 XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4797:21 (libxul.so+0x637dca4)
[task 2020-04-26T07:09:26.528Z] 07:09:26 INFO - GECKO(1247) | #40 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0x63887e2)
[task 2020-04-26T07:09:26.529Z] 07:09:26 INFO - GECKO(1247) | #41 do_main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:217:22 (firefox+0xc93e3)
[task 2020-04-26T07:09:26.530Z] 07:09:26 INFO - GECKO(1247) | #42 main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:331:16 (firefox+0xc93e3)
[task 2020-04-26T07:09:26.530Z] 07:09:26 INFO - GECKO(1247) | Mutex M298499007304260776 is already destroyed.
[task 2020-04-26T07:09:26.530Z] 07:09:26 INFO - GECKO(1247) | Thread T16 'Cache2 I/O' (tid=1275, running) created by main thread at:
[task 2020-04-26T07:09:26.531Z] 07:09:26 INFO - GECKO(1247) | #0 pthread_create /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:967:3 (firefox+0x5749b)
[task 2020-04-26T07:09:26.532Z] 07:09:26 INFO - GECKO(1247) | #1 _PR_CreateThread /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:458:14 (libnspr4.so+0x3c383)
[task 2020-04-26T07:09:26.533Z] 07:09:26 INFO - GECKO(1247) | #2 PR_CreateThread /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:533:12 (libnspr4.so+0x308c2)
[task 2020-04-26T07:09:26.533Z] 07:09:26 INFO - GECKO(1247) | #3 Init /builds/worker/checkouts/gecko/netwerk/cache2/CacheIOThread.cpp:252:7 (libxul.so+0xf79af0)
[task 2020-04-26T07:09:26.534Z] 07:09:26 INFO - GECKO(1247) | #4 mozilla::net::CacheFileIOManager::InitInternal() /builds/worker/checkouts/gecko/netwerk/cache2/CacheFileIOManager.cpp:1144:19 (libxul.so+0xf79af0)
[task 2020-04-26T07:09:26.534Z] 07:09:26 INFO - GECKO(1247) | #5 mozilla::net::CacheFileIOManager::Init() /builds/worker/checkouts/gecko/netwerk/cache2/CacheFileIOManager.cpp:1132:24 (libxul.so+0xf7963f)
[task 2020-04-26T07:09:26.535Z] 07:09:26 INFO - GECKO(1247) | #6 mozilla::net::CacheObserver::Observe(nsISupports*, char const*, char16_t const*) /builds/worker/checkouts/gecko/netwerk/cache2/CacheObserver.cpp:301:5 (libxul.so+0xfa9ca4)
[task 2020-04-26T07:09:26.535Z] 07:09:26 INFO - GECKO(1247) | #7 nsObserverList::NotifyObservers(nsISupports*, char const*, char16_t const*) /builds/worker/checkouts/gecko/xpcom/ds/nsObserverList.cpp:65:19 (libxul.so+0xa49913)
[task 2020-04-26T07:09:26.537Z] 07:09:26 INFO - GECKO(1247) | #8 nsObserverService::NotifyObservers(nsISupports*, char const*, char16_t const*) /builds/worker/checkouts/gecko/xpcom/ds/nsObserverService.cpp:292:19 (libxul.so+0xa4c76c)
[task 2020-04-26T07:09:26.537Z] 07:09:26 INFO - GECKO(1247) | #9 nsXREDirProvider::DoStartup() /builds/worker/checkouts/gecko/toolkit/xre/nsXREDirProvider.cpp:930:13 (libxul.so+0x638bcb0)
[task 2020-04-26T07:09:26.537Z] 07:09:26 INFO - GECKO(1247) | #10 XREMain::XRE_mainRun() /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4395:16 (libxul.so+0x637c712)
[task 2020-04-26T07:09:26.538Z] 07:09:26 INFO - GECKO(1247) | #11 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4743:8 (libxul.so+0x637d943)
[task 2020-04-26T07:09:26.538Z] 07:09:26 INFO - GECKO(1247) | #12 XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:4797:21 (libxul.so+0x637dca4)
[task 2020-04-26T07:09:26.539Z] 07:09:26 INFO - GECKO(1247) | #13 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0x63887e2)
[task 2020-04-26T07:09:26.540Z] 07:09:26 INFO - GECKO(1247) | #14 do_main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:217:22 (firefox+0xc93e3)
[task 2020-04-26T07:09:26.541Z] 07:09:26 INFO - GECKO(1247) | #15 main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:331:16 (firefox+0xc93e3)
[task 2020-04-26T07:09:26.541Z] 07:09:26 INFO - GECKO(1247) | SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/netwerk/cache2/CacheStorageService.cpp:1273:41 in mozilla::net::CacheStorageService::OnMemoryConsumptionChange(mozilla::net::CacheMemoryConsumer*, unsigned int)

Summary: Intermittent GECKO(1247) | SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/netwerk/cache2/CacheStorageService.cpp:1273:41 in mozilla::net::CacheStorageService::OnMemoryConsumptionChange(mozilla::net::CacheMemoryConsumer*, unsigned int) → Intermittent SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/netwerk/cache2/CacheStorageService.cpp:1273:41 in mozilla::net::CacheStorageService::OnMemoryConsumptionChange(mozilla::net::CacheMemoryConsumer*, unsigned int)

Michal, could you take a look?
Thanks.

Flags: needinfo?(michal.novotny)
Blocks: tsan
Flags: needinfo?(michal.novotny)

With the second stack missing I'm not 100% sure, but I have a sneaking suspicion that this is the two bitfields aliasing causing DoMemoryReport's read of mFlags to alias OnMemoryConsumptionChanged's write to mReportedMemoryConsumption. (I'm guessing OnMemoryConsumptionChanged only runs on the main thread and therefore can't race with itself.)

Since mFlags is only set in the constructor this should be a totally benign race, but it should also be easy to fix with MOZ_ATOMIC_BITFIELDS.

Assignee: nobody → a.beingessner

this is only a hypothetical fix to the underlying issue since we don't have a clean trace.

Pushed by abeingessner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5a119d4f281b
make the bitfields on CacheStorageService atomic. r=valentin,necko-reviewers
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: