New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 840373 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac , Fuchsia
Pri: 1
Type: Bug


Participants' hotlists:
Audio-Service


Sign in to add a comment

Look into failures when running audio service with output streams out of process

Project Member Reported by maxmorin@chromium.org, May 7 2018

Issue description

https://chromium-review.googlesource.com/c/chromium/src/+/1046599

on Mac:
[ RUN      ] MediaEngagementBrowserTest.MultipleElements
[8211:3075:0507/063644.956227:WARNING:notification_platform_bridge_mac.mm(509)] AlertNotificationService: XPC connection invalidated.
2018-05-07 06:36:45.040 browser_tests[8211:128071] *** Owner supplied to -[NSTrackingArea initWithRect:options:owner:userInfo:] referenced a deallocating object. Tracking area behavior is undefined. Break on NSTrackingAreaDeallocatingOwnerError to debug.
[8216:775:0507/063645.075357:WARNING:vt_video_decode_accelerator_mac.cc(178)] Failed to create VTDecompressionSession: Error Domain=NSOSStatusErrorDomain Code=-8973 "codecOpenErr" (-8973)
[8216:775:0507/063645.075681:WARNING:vt_video_decode_accelerator_mac.cc(200)] Hardware decoding with VideoToolbox is not supported
[8216:775:0507/063645.096207:ERROR:vt_video_encode_accelerator_mac.cc(516)]  VTCompressionSessionCreate failed: -12908
[8211:775:0507/063645.252555:WARNING:gaia_auth_fetcher.cc(902)] Could not reach Google Accounts servers: errno -11
[8211:33795:0507/063645.472948:WARNING:simple_synchronous_entry.cc(1255)] Could not open platform files for entry.
[8211:24835:0507/063645.534471:WARNING:http_cache_transaction.cc(2897)] Failed to revalidate partial entry
[8211:15363:0507/063645.587384:WARNING:embedded_test_server.cc(229)] Request not handled. Returning 404: /favicon.ico
[8219:775:0507/063645.638956:ERROR:audio_manager_mac.cc(230)] Error getting default AudioDevice.
[8219:775:0507/063645.639121:ERROR:audio_manager_mac.cc(829)] Invalid output device
[8219:775:0507/063645.639338:ERROR:audio_manager_mac.cc(729)] Failed to open output device:
[8219:775:0507/063645.639399:ERROR:audio_output_resampler.cc(385)] Unable to open audio device in high latency mode.  Falling back to fake audio output.
[8219:43267:0507/063645.640459:FATAL:owning_audio_manager_accessor.cc(64)] Check failed: task_runner_->BelongsToCurrentThread().
0   Chromium Framework                  0x00000001185e454c base::debug::StackTrace::StackTrace(unsigned long) + 28
1   Chromium Framework                  0x00000001184fe65f logging::LogMessage::~LogMessage() + 223
2   Chromium Framework                  0x000000011671c26a audio::(anonymous namespace)::MainThread::GetWorkerTaskRunner() + 170
3   Chromium Framework                  0x00000001155b4371 media::FakeAudioOutputStream::CallOnMoreData() + 33
4   Chromium Framework                  0x00000001155f05f6 media::FakeAudioWorker::Worker::DoRead() + 214
5   Chromium Framework                  0x00000001155f09fe base::internal::Invoker<base::internal::BindState<void (media::FakeAudioWorker::Worker::*)(), scoped_refptr<media::FakeAudioWorker::Worker> >, void ()>::Run(base::internal::BindStateBase*) + 126
6   Chromium Framework                  0x00000001155b81bf void base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> >::ForwardRepeating<>() + 95
7   Chromium Framework                  0x00000001155b8287 base::internal::Invoker<base::internal::BindState<void (base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> >::*)(), base::WeakPtr<base::internal::CancelableCallbackImpl<base::RepeatingCallback<void ()> > > >, void ()>::Run(base::internal::BindStateBase*) + 183
8   Chromium Framework                  0x00000001155f04fe media::FakeAudioWorker::Worker::DoStart() + 750
9   Chromium Framework                  0x00000001155f09fe base::internal::Invoker<base::internal::BindState<void (media::FakeAudioWorker::Worker::*)(), scoped_refptr<media::FakeAudioWorker::Worker> >, void ()>::Run(base::internal::BindStateBase*) + 126
10  Chromium Framework                  0x00000001184e2973 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 323
11  Chromium Framework                  0x00000001185172d9 base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) + 121
12  Chromium Framework                  0x000000011851afe7 base::MessageLoop::RunTask(base::PendingTask*) + 599
13  Chromium Framework                  0x000000011851b3aa base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) + 186
14  Chromium Framework                  0x000000011851b61c base::MessageLoop::DoWork() + 572
15  Chromium Framework                  0x000000011851e1c8 base::MessagePumpDefault::Run(base::MessagePump::Delegate*) + 216
16  Chromium Framework                  0x000000011851a9c4 base::MessageLoop::Run(bool) + 132
17  Chromium Framework                  0x0000000118555a39 base::RunLoop::Run() + 249
18  Chromium Framework                  0x00000001185a016e base::Thread::Run(base::RunLoop*) + 206
19  Chromium Framework                  0x00000001185a06ae base::Thread::ThreadMain() + 782
20  Chromium Framework                  0x00000001185f325f base::(anonymous namespace)::ThreadFunc(void*) + 95
21  libsystem_pthread.dylib             0x00007fff56f2f6c1 _pthread_body + 340
22  libsystem_pthread.dylib             0x00007fff56f2f56d _pthread_body + 0
23  libsystem_pthread.dylib             0x00007fff56f2ec5d thread_start + 13

Similar messages on other platforms.

Here's a video capture race on Linux TSan:

[ RUN      ] UsingRealWebcam/WebRtcImageCaptureSucceedsBrowserTest.ManipulateZoom/0
Xlib:  extension "RANDR" missing on display ":99".
DevTools listening on ws://127.0.0.1:40998/devtools/browser/76eabbc0-c676-4153-a838-431cc3bad394
[4350:4350:0507/063256.113217:ERROR:runtime_enabled_features.cc(1602)] RuntimeEnabledFeature not recognized: GetUserMedia
==================
WARNING: ThreadSanitizer: data race (pid=4310)
  Read of size 8 at 0x7b2000034838 by thread T2:
    #0 empty buildtools/third_party/libc++/trunk/include/list:590:42 (content_browsertests+0x7d25716)
    #1 clear buildtools/third_party/libc++/trunk/include/list:722 (content_browsertests+0x7d25716)
    #2 ~__list_imp buildtools/third_party/libc++/trunk/include/list:712 (content_browsertests+0x7d25716)
    #3 media::VideoCaptureSystemImpl::~VideoCaptureSystemImpl() media/capture/video/video_capture_system_impl.cc:69 (content_browsertests+0x7d25716)
    #4 media::VideoCaptureSystemImpl::~VideoCaptureSystemImpl() media/capture/video/video_capture_system_impl.cc:69:49 (content_browsertests+0x7d258b9)
    #5 operator() buildtools/third_party/libc++/trunk/include/memory:2321:5 (content_browsertests+0x507ae97)
    #6 reset buildtools/third_party/libc++/trunk/include/memory:2634 (content_browsertests+0x507ae97)
    #7 ~unique_ptr buildtools/third_party/libc++/trunk/include/memory:2588 (content_browsertests+0x507ae97)
    #8 content::InProcessVideoCaptureProvider::~InProcessVideoCaptureProvider() content/browser/renderer_host/media/in_process_video_capture_provider.cc:23 (content_browsertests+0x507ae97)
    #9 content::InProcessVideoCaptureProvider::~InProcessVideoCaptureProvider() content/browser/renderer_host/media/in_process_video_capture_provider.cc:21:65 (content_browsertests+0x507aed9)
    #10 operator() buildtools/third_party/libc++/trunk/include/memory:2321:5 (content_browsertests+0x50d42d5)
    #11 reset buildtools/third_party/libc++/trunk/include/memory:2634 (content_browsertests+0x50d42d5)
    #12 ~unique_ptr buildtools/third_party/libc++/trunk/include/memory:2588 (content_browsertests+0x50d42d5)
    #13 content::VideoCaptureManager::~VideoCaptureManager() content/browser/renderer_host/media/video_capture_manager.cc:90 (content_browsertests+0x50d42d5)
    #14 content::VideoCaptureManager::~VideoCaptureManager() content/browser/renderer_host/media/video_capture_manager.cc:87:45 (content_browsertests+0x50d4659)
    #15 DeleteInternal<content::MediaStreamProvider> base/memory/ref_counted.h:398:5 (content_browsertests+0x5087b36)
    #16 Destruct base/memory/ref_counted.h:351 (content_browsertests+0x5087b36)
    #17 Release base/memory/ref_counted.h:387 (content_browsertests+0x5087b36)
    #18 Release base/memory/scoped_refptr.h:280 (content_browsertests+0x5087b36)
    #19 ~scoped_refptr base/memory/scoped_refptr.h:208 (content_browsertests+0x5087b36)
    #20 content::MediaDevicesManager::~MediaDevicesManager() content/browser/renderer_host/media/media_devices_manager.cc:294 (content_browsertests+0x5087b36)
    #21 content::MediaDevicesManager::~MediaDevicesManager() content/browser/renderer_host/media/media_devices_manager.cc:292:45 (content_browsertests+0x5087cf9)
    #22 operator() buildtools/third_party/libc++/trunk/include/memory:2321:5 (content_browsertests+0x50a5cf2)
    #23 reset buildtools/third_party/libc++/trunk/include/memory:2634 (content_browsertests+0x50a5cf2)
    #24 operator= buildtools/third_party/libc++/trunk/include/memory:2592 (content_browsertests+0x50a5cf2)
    #25 content::MediaStreamManager::WillDestroyCurrentMessageLoop() content/browser/renderer_host/media/media_stream_manager.cc:1682 (content_browsertests+0x50a5cf2)
    #26 non-virtual thunk to content::MediaStreamManager::WillDestroyCurrentMessageLoop() content/browser/renderer_host/media/media_stream_manager.cc (content_browsertests+0x50a5e5d)
    #27 base::MessageLoop::~MessageLoop() base/message_loop/message_loop.cc:92:14 (content_browsertests+0x5dd3ccf)
    #28 base::MessageLoop::~MessageLoop() base/message_loop/message_loop.cc:51:29 (content_browsertests+0x5dd16b9)
    #29 operator() buildtools/third_party/libc++/trunk/include/memory:2321:5 (content_browsertests+0x5e5f442)
    #30 reset buildtools/third_party/libc++/trunk/include/memory:2634 (content_browsertests+0x5e5f442)
    #31 ~unique_ptr buildtools/third_party/libc++/trunk/include/memory:2588 (content_browsertests+0x5e5f442)
    #32 base::Thread::ThreadMain() base/threading/thread.cc:362 (content_browsertests+0x5e5f442)
    #33 base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:76:13 (content_browsertests+0x5ed0f08)
  Previous write of size 8 at 0x7b2000034838 by thread T15:
    #0 pop_front buildtools/third_party/libc++/trunk/include/list:1702:5 (content_browsertests+0x7d262d8)
    #1 media::VideoCaptureSystemImpl::DeviceInfosReady(std::__1::unique_ptr<std::__1::vector<media::VideoCaptureDeviceDescriptor, std::__1::allocator<media::VideoCaptureDeviceDescriptor> >, std::__1::default_delete<std::__1::vector<media::VideoCaptureDeviceDescriptor, std::__1::allocator<media::VideoCaptureDeviceDescriptor> > > >) media/capture/video/video_capture_system_impl.cc:149 (content_browsertests+0x7d262d8)
    #2 media::VideoCaptureSystemImpl::ProcessDeviceInfoRequest() media/capture/video/video_capture_system_impl.cc:97:3 (content_browsertests+0x7d25a8e)
    #3 media::VideoCaptureSystemImpl::GetDeviceInfosAsync(base::OnceCallback<void (std::__1::vector<media::VideoCaptureDeviceInfo, std::__1::allocator<media::VideoCaptureDeviceInfo> > const&)>) media/capture/video/video_capture_system_impl.cc:77:5 (content_browsertests+0x7d259dc)
    #4 Invoke<void (media::VideoCaptureSystem::*)(base::OnceCallback<void (const std::__1::vector<media::VideoCaptureDeviceInfo, std::__1::allocator<media::VideoCaptureDeviceInfo> > &)>), media::VideoCaptureSystem *, base::OnceCallback<void (const std::__1::vector<media::VideoCaptureDeviceInfo, std::__1::allocator<media::VideoCaptureDeviceInfo> > &)> > base/bind_internal.h:447:12 (content_browsertests+0x507b7a6)
    #5 MakeItSo<void (media::VideoCaptureSystem::*)(base::OnceCallback<void (const std::__1::vector<media::VideoCaptureDeviceInfo, std::__1::allocator<media::VideoCaptureDeviceInfo> > &)>), media::VideoCaptureSystem *, base::OnceCallback<void (const std::__1::vector<media::VideoCaptureDeviceInfo, std::__1::allocator<media::VideoCaptureDeviceInfo> > &)> > base/bind_internal.h:547 (content_browsertests+0x507b7a6)
    #6 RunImpl<void (media::VideoCaptureSystem::*)(base::OnceCallback<void (const std::__1::vector<media::VideoCaptureDeviceInfo, std::__1::allocator<media::VideoCaptureDeviceInfo> > &)>), std::__1::tuple<base::internal::UnretainedWrapper<media::VideoCaptureSystem>, base::OnceCallback<void (const std::__1::vector<media::VideoCaptureDeviceInfo, std::__1::allocator<media::VideoCaptureDeviceInfo> > &)> >, 0, 1> base/bind_internal.h:621 (content_browsertests+0x507b7a6)
    #7 base::internal::Invoker<base::internal::BindState<void (media::VideoCaptureSystem::*)(base::OnceCallback<void (std::__1::vector<media::VideoCaptureDeviceInfo, std::__1::allocator<media::VideoCaptureDeviceInfo> > const&)>), base::internal::UnretainedWrapper<media::VideoCaptureSystem>, base::OnceCallback<void (std::__1::vector<media::VideoCaptureDeviceInfo, std::__1::allocator<media::VideoCaptureDeviceInfo> > const&)> >, void ()>::RunOnce(base::internal::BindStateBase*) base/bind_internal.h:589 (content_browsertests+0x507b7a6)
    #8 Run base/callback.h:96:12 (content_browsertests+0x5d96c5b)
    #9 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:101 (content_browsertests+0x5d96c5b)
    #10 base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:124:19 (content_browsertests+0x5dd569e)
    #11 base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:319:25 (content_browsertests+0x5dd2be3)
    #12 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:329:5 (content_browsertests+0x5dd30cc)
    #13 base::MessageLoop::DoWork() base/message_loop/message_loop.cc:373:16 (content_browsertests+0x5dd3465)
    #14 base::MessagePumpDefault::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_default.cc:37:31 (content_browsertests+0x5dda886)
    #15 base::MessageLoop::Run(bool) base/message_loop/message_loop.cc:271:12 (content_browsertests+0x5dd22d7)
    #16 non-virtual thunk to base::MessageLoop::Run(bool) base/message_loop/message_loop.cc (content_browsertests+0x5dd23c4)
    #17 base::RunLoop::Run() base/run_loop.cc:131:14 (content_browsertests+0x5e1167f)
    #18 base::Thread::Run(base::RunLoop*) base/threading/thread.cc:255:13 (content_browsertests+0x5e5edcb)
    #19 base::Thread::ThreadMain() base/threading/thread.cc:337:3 (content_browsertests+0x5e5f3ab)
    #20 base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:76:13 (content_browsertests+0x5ed0f08)
  Location is heap block of size 128 at 0x7b2000034800 allocated by main thread:
    #0 operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_new_delete.cc:57:3 (content_browsertests+0x1b58819)
    #1 make_unique<media::VideoCaptureSystemImpl, std::__1::unique_ptr<media::VideoCaptureDeviceFactory, std::__1::default_delete<media::VideoCaptureDeviceFactory> > > buildtools/third_party/libc++/trunk/include/memory:3114:28 (content_browsertests+0x509946c)
    #2 content::MediaStreamManager::MediaStreamManager(media::AudioSystem*, scoped_refptr<base::SingleThreadTaskRunner>, std::__1::unique_ptr<content::VideoCaptureProvider, std::__1::default_delete<content::VideoCaptureProvider> >) content/browser/renderer_host/media/media_stream_manager.cc:507 (content_browsertests+0x509946c)
    #3 content::MediaStreamManager::MediaStreamManager(media::AudioSystem*, scoped_refptr<base::SingleThreadTaskRunner>) content/browser/renderer_host/media/media_stream_manager.cc:465:7 (content_browsertests+0x5098f17)
    #4 content::BrowserMainLoop::BrowserThreadsStarted() content/browser/browser_main_loop.cc:1332:37 (content_browsertests+0x4b816a5)
    #5 Invoke<int (content::BrowserMainLoop::*)(), content::BrowserMainLoop *> base/bind_internal.h:447:12 (content_browsertests+0x4b85878)
    #6 MakeItSo<int (content::BrowserMainLoop::*const &)(), content::BrowserMainLoop *> base/bind_internal.h:547 (content_browsertests+0x4b85878)
    #7 RunImpl<int (content::BrowserMainLoop::*const &)(), const std::__1::tuple<base::internal::UnretainedWrapper<content::BrowserMainLoop> > &, 0> base/bind_internal.h:621 (content_browsertests+0x4b85878)
    #8 base::internal::Invoker<base::internal::BindState<int (content::BrowserMainLoop::*)(), base::internal::UnretainedWrapper<content::BrowserMainLoop> >, int ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:603 (content_browsertests+0x4b85878)
    #9 Run base/callback.h:125:12 (content_browsertests+0x52ee6fa)
    #10 content::StartupTaskRunner::RunAllTasksNow() content/browser/startup_task_runner.cc:44 (content_browsertests+0x52ee6fa)
    #11 content::BrowserMainLoop::CreateStartupTasks() content/browser/browser_main_loop.cc:872:25 (content_browsertests+0x4b805b3)
    #12 content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&) content/browser/browser_main_runner.cc:139:17 (content_browsertests+0x4b85e0a)
    #13 ShellBrowserMain(content::MainFunctionParams const&, std::__1::unique_ptr<content::BrowserMainRunner, std::__1::default_delete<content::BrowserMainRunner> > const&) content/shell/browser/shell_browser_main.cc:22:32 (content_browsertests+0x58d1d6a)
    #14 content::ShellMainDelegate::RunProcess(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, content::MainFunctionParams const&) content/shell/app/shell_main_delegate.cc:333:16 (content_browsertests+0x585dc62)
    #15 content::RunNamedProcessTypeMain(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, content::MainFunctionParams const&, content::ContentMainDelegate*) content/app/content_main_runner.cc:627:35 (content_browsertests+0x49ebe32)
    #16 content::ContentMainRunnerImpl::Run() content/app/content_main_runner.cc:943:12 (content_browsertests+0x49ed76b)
    #17 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() content/app/content_service_manager_main_delegate.cc:51:32 (content_browsertests+0x35ad4df)
    #18 service_manager::Main(service_manager::MainParams const&) services/service_manager/embedder/main.cc:452:29 (content_browsertests+0x7edd367)
    #19 content::ContentMain(content::ContentMainParams const&) content/app/content_main.cc:19:10 (content_browsertests+0x35adcde)
    #20 content::BrowserTestBase::SetUp() content/public/test/browser_test_base.cc:321:3 (content_browsertests+0x57d8483)
    #21 content::ContentBrowserTest::SetUp() content/public/test/content_browser_test.cc:100:20 (content_browsertests+0x57c76bb)
    #22 content::UsingRealWebcam_WebRtcWebcamBrowserTest::SetUp() content/browser/webrtc/webrtc_webcam_browsertest.cc:64:23 (content_browsertests+0x2386b21)
    #23 content::WebRtcImageCaptureBrowserTestBase::SetUp() content/browser/webrtc/webrtc_image_capture_browsertest.cc:98:46 (content_browsertests+0x2359cdd)
    #24 testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc (content_browsertests+0x304507b)
    #25 testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2667:11 (content_browsertests+0x304625c)
    #26 testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2785:28 (content_browsertests+0x3046ad6)
    #27 testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5047:43 (content_browsertests+0x3057076)
    #28 testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc (content_browsertests+0x305697b)
    #29 RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2327:46 (content_browsertests+0x582d866)
    #30 base::TestSuite::Run() base/test/test_suite.cc:275 (content_browsertests+0x582d866)
    #31 content::ContentTestLauncherDelegate::RunTestSuite(int, char**) content/test/content_test_launcher.cc:108:48 (content_browsertests+0x57cd39b)
    #32 content::LaunchTests(content::TestLauncherDelegate*, unsigned long, int, char**) content/public/test/test_launcher.cc:625:31 (content_browsertests+0x5806179)
    #33 main content/test/content_test_launcher.cc:138:10 (content_browsertests+0x57cd32d)
  Thread T2 'Chrome_IOThread' (tid=4328, running) created by main thread at:
    #0 pthread_create /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:965:3 (content_browsertests+0x1aef165)
    #1 base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:115:13 (content_browsertests+0x5ed09b6)
    #2 base::PlatformThread::CreateWithPriority(unsigned long, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:200:10 (content_browsertests+0x5ed0875)
    #3 base::Thread::StartWithOptions(base::Thread::Options const&) base/threading/thread.cc:112:15 (content_browsertests+0x5e5e515)
    #4 content::BrowserMainLoop::InitializeIOThread() content/browser/browser_main_loop.cc:1505:20 (content_browsertests+0x4b7faf6)
    #5 content::BrowserMainLoop::PostMainMessageLoopStart() content/browser/browser_main_loop.cc:661:5 (content_browsertests+0x4b7ec9f)
    #6 content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&) content/browser/browser_main_runner.cc:128:19 (content_browsertests+0x4b86259)
    #7 ShellBrowserMain(content::MainFunctionParams const&, std::__1::unique_ptr<content::BrowserMainRunner, std::__1::default_delete<content::BrowserMainRunner> > const&) content/shell/browser/shell_browser_main.cc:22:32 (content_browsertests+0x58d1d6a)
    #8 content::ShellMainDelegate::RunProcess(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, content::MainFunctionParams const&) content/shell/app/shell_main_delegate.cc:333:16 (content_browsertests+0x585dc62)
    #9 content::RunNamedProcessTypeMain(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, content::MainFunctionParams const&, content::ContentMainDelegate*) content/app/content_main_runner.cc:627:35 (content_browsertests+0x49ebe32)
    #10 content::ContentMainRunnerImpl::Run() content/app/content_main_runner.cc:943:12 (content_browsertests+0x49ed76b)
    #11 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() content/app/content_service_manager_main_delegate.cc:51:32 (content_browsertests+0x35ad4df)
    #12 service_manager::Main(service_manager::MainParams const&) services/service_manager/embedder/main.cc:452:29 (content_browsertests+0x7edd367)
    #13 content::ContentMain(content::ContentMainParams const&) content/app/content_main.cc:19:10 (content_browsertests+0x35adcde)
    #14 content::BrowserTestBase::SetUp() content/public/test/browser_test_base.cc:321:3 (content_browsertests+0x57d8483)
    #15 content::ContentBrowserTest::SetUp() content/public/test/content_browser_test.cc:100:20 (content_browsertests+0x57c76bb)
    #16 content::UsingRealWebcam_WebRtcWebcamBrowserTest::SetUp() content/browser/webrtc/webrtc_webcam_browsertest.cc:64:23 (content_browsertests+0x2386b21)
    #17 content::WebRtcImageCaptureBrowserTestBase::SetUp() content/browser/webrtc/webrtc_image_capture_browsertest.cc:98:46 (content_browsertests+0x2359cdd)
    #18 testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc (content_browsertests+0x304507b)
    #19 testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2667:11 (content_browsertests+0x304625c)
    #20 testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2785:28 (content_browsertests+0x3046ad6)
    #21 testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5047:43 (content_browsertests+0x3057076)
    #22 testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc (content_browsertests+0x305697b)
    #23 RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2327:46 (content_browsertests+0x582d866)
    #24 base::TestSuite::Run() base/test/test_suite.cc:275 (content_browsertests+0x582d866)
    #25 content::ContentTestLauncherDelegate::RunTestSuite(int, char**) content/test/content_test_launcher.cc:108:48 (content_browsertests+0x57cd39b)
    #26 content::LaunchTests(content::TestLauncherDelegate*, unsigned long, int, char**) content/public/test/test_launcher.cc:625:31 (content_browsertests+0x5806179)
    #27 main content/test/content_test_launcher.cc:138:10 (content_browsertests+0x57cd32d)
  Thread T15 'AudioThread' (tid=4343, running) created by main thread at:
    #0 pthread_create /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:965:3 (content_browsertests+0x1aef165)
    #1 base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:115:13 (content_browsertests+0x5ed09b6)
    #2 base::PlatformThread::CreateWithPriority(unsigned long, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:200:10 (content_browsertests+0x5ed0875)
    #3 base::Thread::StartWithOptions(base::Thread::Options const&) base/threading/thread.cc:112:15 (content_browsertests+0x5e5e515)
    #4 base::Thread::Start() base/threading/thread.cc:75:10 (content_browsertests+0x5e5e18a)
    #5 media::AudioThreadImpl::AudioThreadImpl() media/audio/audio_thread_impl.cc:15:3 (content_browsertests+0x2c03bd2)
    #6 make_unique<media::AudioThreadImpl> buildtools/third_party/libc++/trunk/include/memory:3114:32 (content_browsertests+0x4b8468d)
    #7 content::BrowserMainLoop::CreateAudioManager() content/browser/browser_main_loop.cc:1619 (content_browsertests+0x4b8468d)
    #8 content::BrowserMainLoop::BrowserThreadsStarted() content/browser/browser_main_loop.cc:1277:5 (content_browsertests+0x4b81255)
    #9 Invoke<int (content::BrowserMainLoop::*)(), content::BrowserMainLoop *> base/bind_internal.h:447:12 (content_browsertests+0x4b85878)
    #10 MakeItSo<int (content::BrowserMainLoop::*const &)(), content::BrowserMainLoop *> base/bind_internal.h:547 (content_browsertests+0x4b85878)
    #11 RunImpl<int (content::BrowserMainLoop::*const &)(), const std::__1::tuple<base::internal::UnretainedWrapper<content::BrowserMainLoop> > &, 0> base/bind_internal.h:621 (content_browsertests+0x4b85878)
    #12 base::internal::Invoker<base::internal::BindState<int (content::BrowserMainLoop::*)(), base::internal::UnretainedWrapper<content::BrowserMainLoop> >, int ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:603 (content_browsertests+0x4b85878)
    #13 Run base/callback.h:125:12 (content_browsertests+0x52ee6fa)
    #14 content::StartupTaskRunner::RunAllTasksNow() content/browser/startup_task_runner.cc:44 (content_browsertests+0x52ee6fa)
    #15 content::BrowserMainLoop::CreateStartupTasks() content/browser/browser_main_loop.cc:872:25 (content_browsertests+0x4b805b3)
    #16 content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&) content/browser/browser_main_runner.cc:139:17 (content_browsertests+0x4b85e0a)
    #17 ShellBrowserMain(content::MainFunctionParams const&, std::__1::unique_ptr<content::BrowserMainRunner, std::__1::default_delete<content::BrowserMainRunner> > const&) content/shell/browser/shell_browser_main.cc:22:32 (content_browsertests+0x58d1d6a)
    #18 content::ShellMainDelegate::RunProcess(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, content::MainFunctionParams const&) content/shell/app/shell_main_delegate.cc:333:16 (content_browsertests+0x585dc62)
    #19 content::RunNamedProcessTypeMain(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, content::MainFunctionParams const&, content::ContentMainDelegate*) content/app/content_main_runner.cc:627:35 (content_browsertests+0x49ebe32)
    #20 content::ContentMainRunnerImpl::Run() content/app/content_main_runner.cc:943:12 (content_browsertests+0x49ed76b)
    #21 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() content/app/content_service_manager_main_delegate.cc:51:32 (content_browsertests+0x35ad4df)
    #22 service_manager::Main(service_manager::MainParams const&) services/service_manager/embedder/main.cc:452:29 (content_browsertests+0x7edd367)
    #23 content::ContentMain(content::ContentMainParams const&) content/app/content_main.cc:19:10 (content_browsertests+0x35adcde)
    #24 content::BrowserTestBase::SetUp() content/public/test/browser_test_base.cc:321:3 (content_browsertests+0x57d8483)
    #25 content::ContentBrowserTest::SetUp() content/public/test/content_browser_test.cc:100:20 (content_browsertests+0x57c76bb)
    #26 content::UsingRealWebcam_WebRtcWebcamBrowserTest::SetUp() content/browser/webrtc/webrtc_webcam_browsertest.cc:64:23 (content_browsertests+0x2386b21)
    #27 content::WebRtcImageCaptureBrowserTestBase::SetUp() content/browser/webrtc/webrtc_image_capture_browsertest.cc:98:46 (content_browsertests+0x2359cdd)
    #28 testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc (content_browsertests+0x304507b)
    #29 testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2667:11 (content_browsertests+0x304625c)
    #30 testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2785:28 (content_browsertests+0x3046ad6)
    #31 testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5047:43 (content_browsertests+0x3057076)
    #32 testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc (content_browsertests+0x305697b)
    #33 RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2327:46 (content_browsertests+0x582d866)
    #34 base::TestSuite::Run() base/test/test_suite.cc:275 (content_browsertests+0x582d866)
    #35 content::ContentTestLauncherDelegate::RunTestSuite(int, char**) content/test/content_test_launcher.cc:108:48 (content_browsertests+0x57cd39b)
    #36 content::LaunchTests(content::TestLauncherDelegate*, unsigned long, int, char**) content/public/test/test_launcher.cc:625:31 (content_browsertests+0x5806179)
    #37 main content/test/content_test_launcher.cc:138:10 (content_browsertests+0x57cd32d)
SUMMARY: ThreadSanitizer: data race buildtools/third_party/libc++/trunk/include/list:590:42 in empty
==================

Various failures due to issue 840345 (fix in review).

Android is failing in many ways. Later maybe?

I suggest anyone with the spare cycles claims one of the stack traces and takes care of it.
 
Oh, I got the fakeaudiooutputstream one. Will send a CL.
The video capture one is because the in process audio thread outlives the IO thread, I think.
Project Member

Comment 4 by bugdroid1@chromium.org, May 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/158ac70fe7e8f46635a2cc38b265d1832acae35a

commit 158ac70fe7e8f46635a2cc38b265d1832acae35a
Author: Max Morin <maxmorin@chromium.org>
Date: Mon May 07 19:02:25 2018

Fix thread checking logic in GetWorkerThread.

GetWorkerThread() is sometimes called from the worker thread itself for
DCHECKS.

Bug:  840373 
Change-Id: Ia823d3802941ff91f7c81c7d997c2e68281558ba
Reviewed-on: https://chromium-review.googlesource.com/1047266
Commit-Queue: Olga Sharonova <olka@chromium.org>
Reviewed-by: Olga Sharonova <olka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556517}
[modify] https://crrev.com/158ac70fe7e8f46635a2cc38b265d1832acae35a/services/audio/owning_audio_manager_accessor.cc

Cc: -maxmorin@chromium.org
Owner: maxmorin@chromium.org
Status: Started (was: Available)
Hmm, right. The audio thread does actually outlive the IO thread, as it's supposed to do. I'll take care of this (I'm currently in the "How did this ever work" phase).
Suspicious use of Unretained: https://cs.chromium.org/chromium/src/content/browser/renderer_host/media/in_process_video_capture_provider.cc?type=cs&l=61.

As far as I can tell, the callback being executed is this one: https://cs.chromium.org/chromium/src/content/browser/renderer_host/media/video_capture_manager.cc?type=cs&l=129. It does take a ref to VideoCaptureManager which owns InProcessVideoCaptureProvider which owns VideoCaptureSystemImpl, so that looks safe, but the callback is destroyed at
https://cs.chromium.org/chromium/src/media/capture/video/video_capture_system_impl.cc?type=cs&l=146, so the VideoCaptureSystemImpl may be destroyed for the rest of that function. Sending a CL.
Project Member

Comment 7 by bugdroid1@chromium.org, May 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/97dc37d3d797279633095ebbc09556ae273288cc

commit 97dc37d3d797279633095ebbc09556ae273288cc
Author: Max Morin <maxmorin@chromium.org>
Date: Tue May 08 22:51:35 2018

Fix VideoCaptureSystemImpl UAF.

This was found when testing the audio service out of process.
Probably something with audio device enumerations were preventing it
from showing up before.

Bug:  840373 
Change-Id: Ia3af9366a2a57fad92b8bfb077bbbb786ccd5693
Reviewed-on: https://chromium-review.googlesource.com/1049652
Commit-Queue: Christian Fremerey <chfremer@chromium.org>
Reviewed-by: Christian Fremerey <chfremer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556994}
[modify] https://crrev.com/97dc37d3d797279633095ebbc09556ae273288cc/media/capture/video/video_capture_system_impl.cc

Labels: -OS-Android -OS-Chrome
Status: Fixed (was: Started)
Currently failing:
LocalNTPVoiceJavascriptTest.SpeechTests (might be fixed by moving speech to audio service?)
CastStreamingApiTestWithPixelOutput.EndToEnd (expected, but I expected more cast/tab capture tests to be failing)
KioskVirtualKeyboardTest.RestrictFeatures (Chrome OS only, not a concern, but I expected more Chrome OS-specific failures as well)

I'll close this, and we can file a separate bug for SpeechTests if it's still failing later.
[bulk-edit: disregard if N/A] Can the owner please set milestone to this bug if applicable?

Sign in to add a comment