Closed Bug 1727225 Opened 3 years ago Closed 3 years ago

Intermittent SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/widget/gtk/nsWindow.cpp:5980:11 in nsWindow::IsWaitingForCompositorResume()

Categories

(Core :: Widget: Gtk, defect, P5)

defect

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

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

References

(Blocks 1 open bug)

Details

(Keywords: csectype-race, intermittent-failure)

Attachments

(1 file)

Filed by: ncsoregi [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=349337795&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/asQSz64HRL6PSt6-8PJuiw/runs/0/artifacts/public/logs/live_backing.log


[task 2021-08-24T01:30:38.612Z] 01:30:38     INFO - TEST-START | browser/components/preferences/tests/siteData/browser_siteData.js
[task 2021-08-24T01:30:38.635Z] 01:30:38     INFO - TEST-SKIP | browser/components/preferences/tests/siteData/browser_siteData.js | bound  
[task 2021-08-24T01:30:38.635Z] 01:30:38  WARNING - Skipping test bound 
[task 2021-08-24T01:31:00.845Z] 01:31:00     INFO - GECKO(1976) | ==================
[task 2021-08-24T01:31:00.855Z] 01:31:00     INFO - GECKO(1976) | WARNING: ThreadSanitizer: data race (pid=1976)
[task 2021-08-24T01:31:00.855Z] 01:31:00     INFO - GECKO(1976) |   Read of size 1 at 0x7b60006779a9 by thread T37:
[task 2021-08-24T01:31:00.855Z] 01:31:00     INFO - GECKO(1976) |     #0 nsWindow::IsWaitingForCompositorResume() /builds/worker/checkouts/gecko/widget/gtk/nsWindow.cpp:5980:11 (libxul.so+0x4cd9219)
[task 2021-08-24T01:31:00.855Z] 01:31:00     INFO - GECKO(1976) |     #1 mozilla::widget::GtkCompositorWidget::RemoteLayoutSizeUpdated(mozilla::gfx::RectTyped<mozilla::LayoutDevicePixel, float> const&) /builds/worker/checkouts/gecko/widget/gtk/GtkCompositorWidget.cpp:93:29 (libxul.so+0x4cf3b71)
[task 2021-08-24T01:31:00.856Z] 01:31:00     INFO - GECKO(1976) |     #2 mozilla::layers::WebRenderBridgeParent::SetDisplayList(mozilla::gfx::RectTyped<mozilla::LayoutDevicePixel, float> const&, mozilla::ipc::ByteBuf&&, mozilla::ipc::ByteBuf&&, mozilla::wr::BuiltDisplayListDescriptor const&, nsTArray<mozilla::layers::OpUpdateResource> const&, nsTArray<mozilla::layers::RefCountedShmem> const&, nsTArray<mozilla::ipc::Shmem> const&, mozilla::TimeStamp const&, mozilla::wr::TransactionBuilder&, mozilla::wr::Epoch, bool) /builds/worker/checkouts/gecko/gfx/layers/wr/WebRenderBridgeParent.cpp:1121:25 (libxul.so+0x2032165)
[task 2021-08-24T01:31:00.856Z] 01:31:00     INFO - GECKO(1976) |     #3 mozilla::layers::WebRenderBridgeParent::ProcessDisplayListData(mozilla::layers::DisplayListData&, mozilla::wr::Epoch, mozilla::TimeStamp const&, bool, bool) /builds/worker/checkouts/gecko/gfx/layers/wr/WebRenderBridgeParent.cpp:1179:8 (libxul.so+0x2032775)
[task 2021-08-24T01:31:00.856Z] 01:31:00     INFO - GECKO(1976) |     #4 mozilla::layers::WebRenderBridgeParent::RecvSetDisplayList(mozilla::layers::DisplayListData&&, nsTArray<mozilla::layers::OpDestroy>&&, unsigned long const&, mozilla::layers::BaseTransactionId<mozilla::layers::TransactionIdType> const&, bool const&, mozilla::layers::BaseTransactionId<mozilla::VsyncIdType> const&, mozilla::TimeStamp const&, mozilla::TimeStamp const&, mozilla::TimeStamp const&, nsTString<char> const&, mozilla::TimeStamp const&, nsTArray<mozilla::layers::CompositionPayload>&&) /builds/worker/checkouts/gecko/gfx/layers/wr/WebRenderBridgeParent.cpp:1229:8 (libxul.so+0x2033617)
[task 2021-08-24T01:31:00.860Z] 01:31:00     INFO - GECKO(1976) |     #5 mozilla::layers::PWebRenderBridgeParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PWebRenderBridgeParent.cpp:403:28 (libxul.so+0x19df461)
[task 2021-08-24T01:31:00.861Z] 01:31:00     INFO - GECKO(1976) |     #6 mozilla::layers::PCompositorManagerParent::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PCompositorManagerParent.cpp:200:32 (libxul.so+0x169f892)
[task 2021-08-24T01:31:00.861Z] 01:31:00     INFO - GECKO(1976) |     #7 mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /builds/worker/checkouts/gecko/ipc/glue/MessageChannel.cpp:2051:25 (libxul.so+0x15a67f1)
[task 2021-08-24T01:31:00.861Z] 01:31:00     INFO - GECKO(1976) |     #8 mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) /builds/worker/checkouts/gecko/ipc/glue/MessageChannel.cpp:1978:9 (libxul.so+0x15a4d65)
[task 2021-08-24T01:31:00.861Z] 01:31:00     INFO - GECKO(1976) |     #9 mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) /builds/worker/checkouts/gecko/ipc/glue/MessageChannel.cpp:1826:3 (libxul.so+0x15a595a)
[task 2021-08-24T01:31:00.861Z] 01:31:00     INFO - GECKO(1976) |     #10 mozilla::ipc::MessageChannel::MessageTask::Run() /builds/worker/checkouts/gecko/ipc/glue/MessageChannel.cpp:1857:13 (libxul.so+0x15a5f61)
[task 2021-08-24T01:31:00.861Z] 01:31:00     INFO - GECKO(1976) |     #11 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1142:16 (libxul.so+0xc9364a)
[task 2021-08-24T01:31:00.862Z] 01:31:00     INFO - GECKO(1976) |     #12 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:466:10 (libxul.so+0xc9a3a2)
[task 2021-08-24T01:31:00.862Z] 01:31:00     INFO - GECKO(1976) |     #13 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:300:20 (libxul.so+0x15ab28e)
[task 2021-08-24T01:31:00.862Z] 01:31:00     INFO - GECKO(1976) |     #14 RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:331:10 (libxul.so+0x15248cc)
[task 2021-08-24T01:31:00.862Z] 01:31:00     INFO - GECKO(1976) |     #15 RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:324:3 (libxul.so+0x15248cc)
[task 2021-08-24T01:31:00.862Z] 01:31:00     INFO - GECKO(1976) |     #16 MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:306:3 (libxul.so+0x15248cc)
[task 2021-08-24T01:31:00.862Z] 01:31:00     INFO - GECKO(1976) |     #17 nsThread::ThreadFunc(void*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:390:10 (libxul.so+0xc8fd98)
[task 2021-08-24T01:31:00.863Z] 01:31:00     INFO - GECKO(1976) |     #18 _pt_root /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201:5 (libnspr4.so+0x44cd6)
[..]
[task 2021-08-24T01:31:00.999Z] 01:31:00     INFO - GECKO(1976) |   Thread T37 'Compositor' (tid=2028, running) created by main thread at:
[task 2021-08-24T01:31:00.999Z] 01:31:00     INFO - GECKO(1976) |     #0 pthread_create /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:965:3 (firefox+0x577eb)
[task 2021-08-24T01:31:01.000Z] 01:31:01     INFO - GECKO(1976) |     #1 _PR_CreateThread /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:458:14 (libnspr4.so+0x3be33)
[task 2021-08-24T01:31:01.000Z] 01:31:01     INFO - GECKO(1976) |     #2 PR_CreateThread /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:533:12 (libnspr4.so+0x30915)
[task 2021-08-24T01:31:01.000Z] 01:31:01     INFO - GECKO(1976) |     #3 nsThread::Init(nsTSubstring<char> const&) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:602:18 (libxul.so+0xc91102)
[task 2021-08-24T01:31:01.001Z] 01:31:01     INFO - GECKO(1976) |     #4 nsThreadManager::NewNamedThread(nsTSubstring<char> const&, unsigned int, nsIThread**) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadManager.cpp:574:12 (libxul.so+0xc9926a)
[task 2021-08-24T01:31:01.002Z] 01:31:01     INFO - GECKO(1976) |     #5 NS_NewNamedThread(nsTSubstring<char> const&, nsIThread**, already_AddRefed<nsIRunnable>, unsigned int) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:162:57 (libxul.so+0xca10e4)
[task 2021-08-24T01:31:01.002Z] 01:31:01     INFO - GECKO(1976) |     #6 NS_NewNamedThread<11> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:74:10 (libxul.so+0x219e28e)
[task 2021-08-24T01:31:01.003Z] 01:31:01     INFO - GECKO(1976) |     #7 mozilla::layers::CompositorThreadHolder::CreateCompositorThread() /builds/worker/checkouts/gecko/gfx/layers/ipc/CompositorThread.cpp:62:17 (libxul.so+0x219e28e)
[task 2021-08-24T01:31:01.003Z] 01:31:01     INFO - GECKO(1976) |     #8 CompositorThreadHolder /builds/worker/checkouts/gecko/gfx/layers/ipc/CompositorThread.cpp:39:25 (libxul.so+0x219e4da)
[task 2021-08-24T01:31:01.004Z] 01:31:01     INFO - GECKO(1976) |     #9 mozilla::layers::CompositorThreadHolder::Start() /builds/worker/checkouts/gecko/gfx/layers/ipc/CompositorThread.cpp:103:33 (libxul.so+0x219e4da)
[task 2021-08-24T01:31:01.004Z] 01:31:01     INFO - GECKO(1976) |     #10 InitLayersIPC /builds/worker/checkouts/gecko/gfx/thebes/gfxPlatform.cpp:1316:5 (libxul.so+0x21e8732)
[task 2021-08-24T01:31:01.005Z] 01:31:01     INFO - GECKO(1976) |     #11 gfxPlatform::Init() /builds/worker/checkouts/gecko/gfx/thebes/gfxPlatform.cpp:962:3 (libxul.so+0x21e8732)
[task 2021-08-24T01:31:01.005Z] 01:31:01     INFO - GECKO(1976) |     #12 gfxPlatform::GetPlatform() /builds/worker/checkouts/gecko/gfx/thebes/gfxPlatform.cpp:477:5 (libxul.so+0x21e7710)
[task 2021-08-24T01:31:01.006Z] 01:31:01     INFO - GECKO(1976) |     #13 mozilla::widget::GfxInfoBase::GetContentBackend(nsTSubstring<char16_t>&) /builds/worker/checkouts/gecko/widget/GfxInfoBase.cpp:1824:25 (libxul.so+0x4c557e7)
[task 2021-08-24T01:31:01.006Z] 01:31:01     INFO - GECKO(1976) |     #14 NS_InvokeByIndex /builds/worker/checkouts/gecko/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.S:101 (libxul.so+0xcbfa25)
[task 2021-08-24T01:31:01.007Z] 01:31:01     INFO - GECKO(1976) |     #15 GetAttribute /builds/worker/checkouts/gecko/js/xpconnect/src/xpcprivate.h:1468:12 (libxul.so+0x1bb7a0f)
[task 2021-08-24T01:31:01.007Z] 01:31:01     INFO - GECKO(1976) |     #16 XPC_WN_GetterSetter(JSContext*, unsigned int, JS::Value*) /builds/worker/checkouts/gecko/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:961:10 (libxul.so+0x1bb7a0f)
[task 2021-08-24T01:31:01.008Z] 01:31:01     INFO - GECKO(1976) |     #17 CallJSNative /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:401:13 (libxul.so+0x6befea4)
[task 2021-08-24T01:31:01.008Z] 01:31:01     INFO - GECKO(1976) |     #18 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:488:12 (libxul.so+0x6befea4)
[task 2021-08-24T01:31:01.011Z] 01:31:01     INFO - GECKO(1976) |     #19 InternalCall /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:548:10 (libxul.so+0x6bf1193)
[task 2021-08-24T01:31:01.011Z] 01:31:01     INFO - GECKO(1976) |     #20 js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:565:8 (libxul.so+0x6bf1193)
[task 2021-08-24T01:31:01.011Z] 01:31:01     INFO - GECKO(1976) |     #21 js::CallGetter(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:690:10 (libxul.so+0x6bf21f5)
[task 2021-08-24T01:31:01.011Z] 01:31:01     INFO - GECKO(1976) |     #22 CallGetter /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:2030:12 (libxul.so+0x6eaafd3)
[task 2021-08-24T01:31:01.012Z] 01:31:01     INFO - GECKO(1976) |     #23 GetExistingProperty<js::CanGC> /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:2058:12 (libxul.so+0x6eaafd3)
[task 2021-08-24T01:31:01.012Z] 01:31:01     INFO - GECKO(1976) |     #24 NativeGetPropertyInline<js::CanGC> /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:2204:14 (libxul.so+0x6eaafd3)
[task 2021-08-24T01:31:01.012Z] 01:31:01     INFO - GECKO(1976) |     #25 js::NativeGetProperty(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/NativeObject.cpp:2235:10 (libxul.so+0x6eaafd3)
[task 2021-08-24T01:31:01.012Z] 01:31:01     INFO - GECKO(1976) |     #26 GetProperty /builds/worker/checkouts/gecko/js/src/vm/ObjectOperations-inl.h:115:10 (libxul.so+0x6be44d9)
[task 2021-08-24T01:31:01.012Z] 01:31:01     INFO - GECKO(1976) |     #27 GetObjectElementOperation /builds/worker/checkouts/gecko/js/src/vm/Interpreter-inl.h:418:10 (libxul.so+0x6be44d9)
[task 2021-08-24T01:31:01.012Z] 01:31:01     INFO - GECKO(1976) |     #28 GetElementOperationWithStackIndex /builds/worker/checkouts/gecko/js/src/vm/Interpreter-inl.h:502:10 (libxul.so+0x6be44d9)
[task 2021-08-24T01:31:01.012Z] 01:31:01     INFO - GECKO(1976) |     #29 Interpret(JSContext*, js::RunState&) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:3052:12 (libxul.so+0x6be44d9)
[task 2021-08-24T01:31:01.013Z] 01:31:01     INFO - GECKO(1976) |     #30 js::RunScript(JSContext*, js::RunState&) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:370:13 (libxul.so+0x6bd9426)
[task 2021-08-24T01:31:01.013Z] 01:31:01     INFO - GECKO(1976) |     #31 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:520:13 (libxul.so+0x6bf0701)
[task 2021-08-24T01:31:01.013Z] 01:31:01     INFO - GECKO(1976) |     #32 InternalCall /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:548:10 (libxul.so+0x6bf1193)
[task 2021-08-24T01:31:01.014Z] 01:31:01     INFO - GECKO(1976) |     #33 js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:565:8 (libxul.so+0x6bf1193)
[task 2021-08-24T01:31:01.014Z] 01:31:01     INFO - GECKO(1976) |     #34 JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/CallAndConstruct.cpp:53:10 (libxul.so+0x6d2d1a9)
[task 2021-08-24T01:31:01.015Z] 01:31:01     INFO - GECKO(1976) |     #35 nsXPCWrappedJS::CallMethod(unsigned short, nsXPTMethodInfo const*, nsXPTCMiniVariant*) /builds/worker/checkouts/gecko/js/xpconnect/src/XPCWrappedJSClass.cpp:973:17 (libxul.so+0x1bae1b9)
[task 2021-08-24T01:31:01.015Z] 01:31:01     INFO - GECKO(1976) |     #36 PrepareAndDispatch /builds/worker/checkouts/gecko/xpcom/reflect/xptcall/md/unix/xptcstubs_x86_64_linux.cpp:115:37 (libxul.so+0xcc0a01)
[task 2021-08-24T01:31:01.015Z] 01:31:01     INFO - GECKO(1976) |     #37 SharedStub <null> (libxul.so+0xcbfd62)
[task 2021-08-24T01:31:01.016Z] 01:31:01     INFO - GECKO(1976) |     #38 nsXREDirProvider::DoStartup() /builds/worker/checkouts/gecko/toolkit/xre/nsXREDirProvider.cpp:976:11 (libxul.so+0x6ac1aee)
[task 2021-08-24T01:31:01.016Z] 01:31:01     INFO - GECKO(1976) |     #39 XREMain::XRE_mainRun() /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5027:18 (libxul.so+0x6ab04bf)
[task 2021-08-24T01:31:01.017Z] 01:31:01     INFO - GECKO(1976) |     #40 XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5475:8 (libxul.so+0x6ab1827)
[task 2021-08-24T01:31:01.017Z] 01:31:01     INFO - GECKO(1976) |     #41 XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/nsAppRunner.cpp:5534:21 (libxul.so+0x6ab1dc4)
[task 2021-08-24T01:31:01.018Z] 01:31:01     INFO - GECKO(1976) |     #42 mozilla::BootstrapImpl::XRE_main(int, char**, mozilla::BootstrapConfig const&) /builds/worker/checkouts/gecko/toolkit/xre/Bootstrap.cpp:45:12 (libxul.so+0x6abc402)
[task 2021-08-24T01:31:01.018Z] 01:31:01     INFO - GECKO(1976) |     #43 do_main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:225:22 (firefox+0xca340)
[task 2021-08-24T01:31:01.018Z] 01:31:01     INFO - GECKO(1976) |     #44 main /builds/worker/checkouts/gecko/browser/app/nsBrowserApp.cpp:378:16 (firefox+0xca340)
[task 2021-08-24T01:31:01.019Z] 01:31:01     INFO - GECKO(1976) | SUMMARY: ThreadSanitizer: data race /builds/worker/checkouts/gecko/widget/gtk/nsWindow.cpp:5980:11 in nsWindow::IsWaitingForCompositorResume()
[task 2021-08-24T01:31:01.019Z] 01:31:01     INFO - GECKO(1976) | ==================

Yes, this is expected. It's very unlikely that nsWindow::IsWaitingForCompositorResume() will return true (the underlying variable it used by Wayland scale change code). When there race condition happens it results to small performance penalty only - we post resume runnable event to main thread and it will be canceled there.

I'm going to fix that when IsWaitingForCompositorResume() is used by more code - resize events for instance.

Blocks: tsan
Group: core-security → gfx-core-security
Group: gfx-core-security
Assignee: nobody → stransky
Status: NEW → ASSIGNED
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/95137e1417fc [Linux] Make mCompositorState atomic, r=emilio
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: