Open Bug 1749963 Opened 2 years ago Updated 2 years ago

ThreadSanitizer: data race [@ webrtc::XServerPixelBuffer::CaptureRect] vs [failed to restore the stack]

Categories

(Core :: WebRTC: Audio/Video, defect)

defect

Tracking

()

People

(Reporter: pehrsons, Unassigned)

References

(Blocks 1 open bug)

Details

Discovered in this try run:

[task 2022-01-13T11:15:58.535Z] 11:15:58 INFO - TEST-START | /screen-capture/getdisplaymedia.https.html
[task 2022-01-13T11:15:58.557Z] 11:15:58 INFO - Closing window 3d3a377e-fa81-4e6b-9ec9-ce53bf5c6c06
[task 2022-01-13T11:16:00.749Z] 11:16:00 INFO - PID 9360 | JavaScript error: resource://gre/modules/URLQueryStrippingListService.jsm, line 89: TypeError: can't access property "removeEventListener", Services.cpmm.sharedData is null
[task 2022-01-13T11:16:22.229Z] 11:16:22 INFO - PID 9360 | LLVMSymbolizer: error reading file: No such file or directory
[task 2022-01-13T11:16:22.229Z] 11:16:22 INFO - PID 9360 | ==================
[task 2022-01-13T11:16:22.231Z] 11:16:22 INFO - PID 9360 | WARNING: ThreadSanitizer: data race (pid=9360)
[task 2022-01-13T11:16:22.232Z] 11:16:22 INFO - PID 9360 | Read of size 8 at 0x7f68721ac400 by thread T97:
[task 2022-01-13T11:16:22.232Z] 11:16:22 INFO - PID 9360 | #0 memcpy /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:827:5 (firefox+0x62dc0)
[task 2022-01-13T11:16:22.233Z] 11:16:22 INFO - PID 9360 | #1 memcpy /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/x86_64-linux-gnu/bits/string3.h:51:10 (libxul.so+0x6a4db7a)
[task 2022-01-13T11:16:22.233Z] 11:16:22 INFO - PID 9360 | #2 FastBlit /builds/worker/checkouts/gecko/third_party/libwebrtc/modules/desktop_capture/linux/x_server_pixel_buffer.cc:82:5 (libxul.so+0x6a4db7a)
[task 2022-01-13T11:16:22.234Z] 11:16:22 INFO - PID 9360 | #3 webrtc::XServerPixelBuffer::CaptureRect(webrtc::DesktopRect const&, webrtc::DesktopFrame*) /builds/worker/checkouts/gecko/third_party/libwebrtc/modules/desktop_capture/linux/x_server_pixel_buffer.cc:368:5 (libxul.so+0x6a4db7a)
[task 2022-01-13T11:16:22.234Z] 11:16:22 INFO - PID 9360 | #4 webrtc::ScreenCapturerX11::CaptureScreen() /builds/worker/checkouts/gecko/third_party/libwebrtc/modules/desktop_capture/linux/screen_capturer_x11.cc:387:33 (libxul.so+0x6a4c547)
[task 2022-01-13T11:16:22.235Z] 11:16:22 INFO - PID 9360 | #5 webrtc::ScreenCapturerX11::CaptureFrame() /builds/worker/checkouts/gecko/third_party/libwebrtc/modules/desktop_capture/linux/screen_capturer_x11.cc:259:42 (libxul.so+0x6a4bf84)
[task 2022-01-13T11:16:22.235Z] 11:16:22 INFO - PID 9360 | #6 webrtc::DesktopAndCursorComposer::CaptureFrame() /builds/worker/checkouts/gecko/third_party/libwebrtc/modules/desktop_capture/desktop_and_cursor_composer.cc:183:22 (libxul.so+0x6a46764)
[task 2022-01-13T11:16:22.236Z] 11:16:22 INFO - PID 9360 | #7 process /builds/worker/checkouts/gecko/dom/media/systemservices/video_engine/desktop_capture_impl.cc:651:40 (libxul.so+0x452d2e8)
[task 2022-01-13T11:16:22.237Z] 11:16:22 INFO - PID 9360 | #8 webrtc::DesktopCaptureImpl::Run(void*) /builds/worker/checkouts/gecko/dom/media/systemservices/video_engine/desktop_capture_impl.h:232:44 (libxul.so+0x452d2e8)
[task 2022-01-13T11:16:22.237Z] 11:16:22 INFO - PID 9360 | #9 rtc::PlatformThread::Run() /builds/worker/checkouts/gecko/third_party/libwebrtc/rtc_base/platform_thread.cc:138:3 (libxul.so+0x699c172)
[task 2022-01-13T11:16:22.237Z] 11:16:22 INFO - PID 9360 | #10 rtc::PlatformThread::StartThread(void*) /builds/worker/checkouts/gecko/third_party/libwebrtc/rtc_base/platform_thread.cc:69:40 (libxul.so+0x699bf5e)
[task 2022-01-13T11:16:22.238Z] 11:16:22 INFO - PID 9360 | Previous write of size 8 at 0x7f68721ac400 by main thread:
[task 2022-01-13T11:16:22.238Z] 11:16:22 INFO - PID 9360 | [failed to restore the stack]
[task 2022-01-13T11:16:22.239Z] 11:16:22 INFO - PID 9360 | Location is global '??' at 0x7f6871fad000 (SYSV00000000 (deleted)+0x0000001ff400)
[task 2022-01-13T11:16:22.239Z] 11:16:22 INFO - PID 9360 | Thread T97 'ScreenC~eThread' (tid=10136, running) created by thread T91 at:
[task 2022-01-13T11:16:22.243Z] 11:16:22 INFO - PID 9360 | #0 pthread_create /builds/worker/fetches/llvm-project/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:977:3 (firefox+0x5919d)
[task 2022-01-13T11:16:22.243Z] 11:16:22 INFO - PID 9360 | #1 rtc::PlatformThread::Start() /builds/worker/checkouts/gecko/third_party/libwebrtc/rtc_base/platform_thread.cc:91:3 (libxul.so+0x699bfc4)
[task 2022-01-13T11:16:22.243Z] 11:16:22 INFO - PID 9360 | #2 webrtc::DesktopCaptureImpl::StartCapture(webrtc::VideoCaptureCapability const&) /builds/worker/checkouts/gecko/dom/media/systemservices/video_engine/desktop_capture_impl.cc:589:21 (libxul.so+0x452d219)
[task 2022-01-13T11:16:22.244Z] 11:16:22 INFO - PID 9360 | #3 non-virtual thunk to webrtc::DesktopCaptureImpl::StartCapture(webrtc::VideoCaptureCapability const&) /builds/worker/checkouts/gecko/dom/media/systemservices/video_engine/desktop_capture_impl.cc (libxul.so+0x452d3a5)
[task 2022-01-13T11:16:22.244Z] 11:16:22 INFO - PID 9360 | #4 operator() /builds/worker/checkouts/gecko/dom/media/systemservices/CamerasParent.cpp:915:41 (libxul.so+0x453a8d2)
[task 2022-01-13T11:16:22.245Z] 11:16:22 INFO - PID 9360 | #5 std::_Function_handler<void (mozilla::camera::VideoEngine::CaptureEntry&), mozilla::camera::CamerasParent::RecvStartCapture(mozilla::camera::CaptureEngine const&, int const&, mozilla::camera::VideoCaptureCapability const&)::$_10::operator()() const::'lambda'(mozilla::camera::VideoEngine::CaptureEntry&)>::_M_invoke(std::_Any_data const&, mozilla::camera::VideoEngine::CaptureEntry&) /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:316:2 (libxul.so+0x453a8d2)
[task 2022-01-13T11:16:22.245Z] 11:16:22 INFO - PID 9360 | #6 operator() /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:706:14 (libxul.so+0x4539d5d)
[task 2022-01-13T11:16:22.245Z] 11:16:22 INFO - PID 9360 | #7 WithEntry /builds/worker/checkouts/gecko/dom/media/systemservices/VideoEngine.cpp:245:3 (libxul.so+0x4539d5d)
[task 2022-01-13T11:16:22.245Z] 11:16:22 INFO - PID 9360 | #8 operator() /builds/worker/checkouts/gecko/dom/media/systemservices/CamerasParent.cpp:834:35 (libxul.so+0x4539d5d)
[task 2022-01-13T11:16:22.246Z] 11:16:22 INFO - PID 9360 | #9 mozilla::media::LambdaRunnable<mozilla::camera::CamerasParent::RecvStartCapture(mozilla::camera::CaptureEngine const&, int const&, mozilla::camera::VideoCaptureCapability const&)::$_10>::Run() /builds/worker/workspace/obj-build/dist/include/mozilla/media/MediaUtils.h:78:27 (libxul.so+0x4539d5d)
[task 2022-01-13T11:16:22.246Z] 11:16:22 INFO - PID 9360 | #10 nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1177:16 (libxul.so+0xf7f563)
[task 2022-01-13T11:16:22.246Z] 11:16:22 INFO - PID 9360 | #11 NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:467:10 (libxul.so+0xf86092)
[task 2022-01-13T11:16:22.247Z] 11:16:22 INFO - PID 9360 | #12 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:300:20 (libxul.so+0x18f857e)
[task 2022-01-13T11:16:22.247Z] 11:16:22 INFO - PID 9360 | #13 RunInternal /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:331:10 (libxul.so+0x1871c9c)
[task 2022-01-13T11:16:22.248Z] 11:16:22 INFO - PID 9360 | #14 RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:324:3 (libxul.so+0x1871c9c)
[task 2022-01-13T11:16:22.248Z] 11:16:22 INFO - PID 9360 | #15 MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:306:3 (libxul.so+0x1871c9c)
[task 2022-01-13T11:16:22.249Z] 11:16:22 INFO - PID 9360 | #16 base::Thread::ThreadMain() /builds/worker/checkouts/gecko/ipc/chromium/src/base/thread.cc:187:16 (libxul.so+0x1883216)
[task 2022-01-13T11:16:22.249Z] 11:16:22 INFO - PID 9360 | #17 ThreadFunc(void*) /builds/worker/checkouts/gecko/ipc/chromium/src/base/platform_thread_posix.cc:40:13 (libxul.so+0x187ce4e)
[task 2022-01-13T11:16:22.250Z] 11:16:22 INFO - PID 9360 | SUMMARY: ThreadSanitizer: data race /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/x86_64-linux-gnu/bits/string3.h:51:10 in memcpy

Severity: -- → S4
Blocks: tsan
You need to log in before you can comment on or make changes to this bug.