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

Issue 780996 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: ----
Type: ----



Sign in to add a comment

content_browsertests failing on chromium.memory/Linux TSan Tests

Project Member Reported by s...@chromium.org, Nov 2 2017

Issue description

content_browsertests failing on chromium.memory/Linux TSan Tests

Builders failed on: 
- Linux TSan Tests: 
  https://build.chromium.org/p/chromium.memory/builders/Linux%20TSan%20Tests

Over the last 6 runs, we've had the following failures

      1 DomSerializerTests.SerializeHTMLDOMWithBaseTag
      2 DomSerializerTests.SerializeHTMLDOMWithEntitiesInAttributeValue
      1 DomSerializerTests.SerializeHTMLDOMWithNonStandardEntities
      2 DomSerializerTests.SerializeHTMLDOMWithoutDocType
      2 IndexedDBBrowserTestSingleProcess.RenderThreadShutdownTest
      1 ParallelDownloadTest.ParallelDownloadComplete
      1 RenderProcessHostTest.FetchKeepAliveRendererProcess_Hung
      1 RenderProcessHostTest.KeepAliveRendererProcess
      2 RenderProcessHostTest.KeepAliveRendererProcess_Hung
      1 RenderThreadImplDiscardableMemoryBrowserTest.DiscardableMemoryAddressSpace
      1 RenderThreadImplDiscardableMemoryBrowserTest.LockDiscardableMemory
      1 ResourceFetcherTests.ResourceFetcherDeletedInCallback
      1 ResourceFetcherTests.ResourceFetcherDidFail
      1 ResourceFetcherTests.ResourceFetcherDownload
      1 ResourceFetcherTests.ResourceFetcherSetHeader
      2 ResourceFetcherTests.ResourceFetcherTimeout
      2 SavableResourcesTest.GetSavableResourceLinksWithPageHasInvalidLinks
      2 SavableResourcesTest.GetSavableResourceLinksWithPageHasValidStyleLink

 

Comment 1 by s...@chromium.org, Nov 2 2017

Setup per https://www.chromium.org/developers/testing/threadsanitizer-tsan-v2 , and then unning the following on my desktop, I'm seeing somewhere between 5% and 10% failures.

> out/Tsan/content_browsertests --gtest_filter=SavableResourcesTest.GetSavableResourceLinksWithPageHasInvalidLinks --gtest_repeat=10 --no-sandbox

Findit doesn't seem to work on the tsan builder. There doesn't seem to be any real consistent pattern, just that we're seeing lots of flakes right now for TSAN, see https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=content_browsertests&builder=chromium.memory%3ALinux%20TSan%20Tests

Comment 2 by s...@chromium.org, Nov 2 2017

Cc: robliao@chromium.org
Findit seems to think the culprit was https://chromium-review.googlesource.com/c/chromium/src/+/749629 , +robliao , looking at your CL, I don't think it could be affecting this.

https://findit-for-me.appspot.com/waterfall/build-failure?url=https://build.chromium.org/p/chromium.memory/builders/Linux%20TSan%20Tests/builds/13694

Comment 3 by s...@chromium.org, Nov 2 2017

Labels: Stability-ThreadSanitizer
WARNING: ThreadSanitizer: data race (pid=2271)
  Write of size 1 at 0x7b140002de09 by main thread:
    #0 ui::XVisualManager::OnGPUInfoChanged(bool, unsigned long, unsigned long) ui/base/x/x11_util.cc:1440:29 (content_browsertests+0x54ce949)
    #1 content::internal::GpuDataManagerVisualProxy::OnGpuInfoUpdate() content/browser/browser_main_loop.cc:506:45 (content_browsertests+0x34a4542)
    #2 base::internal::ObserverListThreadSafeBase::Dispatcher<content::GpuDataManagerObserver, void (content::GpuDataManagerObserver::*)()>::Run(void (content::GpuDataManagerObserver::*)(), content::GpuDataManagerObserver*) base/observer_list_threadsafe.h:73:7 (content_browsertests+0x36c5c77)
    #3 Invoke<void (content::GpuDataManagerObserver::*const &)(), content::GpuDataManagerObserver *> base/bind_internal.h:149:12 (content_browsertests+0x36c5ce7)
    #4 MakeItSo<void (*const &)(void (content::GpuDataManagerObserver::*)(), content::GpuDataManagerObserver *), void (content::GpuDataManagerObserver::*const &)(), content::GpuDataManagerObserver *> base/bind_internal.h:277 (content_browsertests+0x36c5ce7)
    #5 RunImpl<void (*const &)(void (content::GpuDataManagerObserver::*)(), content::GpuDataManagerObserver *), const std::__1::tuple<void (content::GpuDataManagerObserver::*)()> &, 0> base/bind_internal.h:349 (content_browsertests+0x36c5ce7)
    #6 base::internal::Invoker<base::internal::BindState<void (*)(void (content::GpuDataManagerObserver::*)(), content::GpuDataManagerObserver*), void (content::GpuDataManagerObserver::*)()>, void (content::GpuDataManagerObserver*)>::Run(base::internal::BindStateBase*, content::GpuDataManagerObserver*&&) base/bind_internal.h:331 (content_browsertests+0x36c5ce7)
    #7 Run base/callback.h:92:12 (content_browsertests+0x36c4790)
    #8 base::ObserverListThreadSafe<content::GpuDataManagerObserver>::NotifyWrapper(content::GpuDataManagerObserver*, base::ObserverListThreadSafe<content::GpuDataManagerObserver>::NotificationData const&) base/observer_list_threadsafe.h:217 (content_browsertests+0x36c4790)
    #9 Invoke<scoped_refptr<base::ObserverListThreadSafe<content::GpuDataManagerObserver> >, content::GpuDataManagerObserver *, base::ObserverListThreadSafe<content::GpuDataManagerObserver>::NotificationData> base/bind_internal.h:194:12 (content_browsertests+0x36c4d53)
    #10 MakeItSo<void (base::ObserverListThreadSafe<content::GpuDataManagerObserver>::*)(content::GpuDataManagerObserver *, const base::ObserverListThreadSafe<content::GpuDataManagerObserver>::NotificationData &), scoped_refptr<base::ObserverListThreadSafe<content::GpuDataManagerObserver> >, content::GpuDataManagerObserver *, base::ObserverListThreadSafe<content::GpuDataManagerObserver>::NotificationData> base/bind_internal.h:277 (content_browsertests+0x36c4d53)
    #11 RunImpl<void (base::ObserverListThreadSafe<content::GpuDataManagerObserver>::*)(content::GpuDataManagerObserver *, const base::ObserverListThreadSafe<content::GpuDataManagerObserver>::NotificationData &), std::__1::tuple<scoped_refptr<base::ObserverListThreadSafe<content::GpuDataManagerObserver> >, content::GpuDataManagerObserver *, base::ObserverListThreadSafe<content::GpuDataManagerObserver>::NotificationData>, 0, 1, 2> base/bind_internal.h:349 (content_browsertests+0x36c4d53)
    #12 base::internal::Invoker<base::internal::BindState<void (base::ObserverListThreadSafe<content::GpuDataManagerObserver>::*)(content::GpuDataManagerObserver*, base::ObserverListThreadSafe<content::GpuDataManagerObserver>::NotificationData const&), scoped_refptr<base::ObserverListThreadSafe<content::GpuDataManagerObserver> >, content::GpuDataManagerObserver*, base::ObserverListThreadSafe<content::GpuDataManagerObserver>::NotificationData>, void ()>::RunOnce(base::internal::BindStateBase*) base/bind_internal.h:318 (content_browsertests+0x36c4d53)
    #13 Run base/callback.h:64:12 (content_browsertests+0x421f726)
    #14 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:57 (content_browsertests+0x421f726)
    #15 base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:130:19 (content_browsertests+0x424ea2b)
    #16 base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:394:25 (content_browsertests+0x424cc07)
    #17 DeferOrRunPendingTask base/message_loop/message_loop.cc:406:5 (content_browsertests+0x424d341)
    #18 base::MessageLoop::DoWork() base/message_loop/message_loop.cc:450 (content_browsertests+0x424d341)
    #19 base::MessagePumpGlib::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_glib.cc:313:49 (content_browsertests+0x42515bb)
    #20 Run base/message_loop/message_loop.cc:345:12 (content_browsertests+0x424c5d0)
    #21 non-virtual thunk to base::MessageLoop::Run(bool) base/message_loop/message_loop.cc (content_browsertests+0x424c5d0)
    #22 Run base/run_loop.cc:114:14 (content_browsertests+0x4281eee)
    #23 base::RunLoop::RunUntilIdle() base/run_loop.cc:127 (content_browsertests+0x4281eee)
    #24 content::ContentBrowserTest::PreRunTestOnMainThread() content/public/test/content_browser_test.cc:127:19 (content_browsertests+0x3d8059e)
    #25 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() content/public/test/browser_test_base.cc:324:5 (content_browsertests+0x3d8fdf3)
    #26 Invoke<content::BrowserTestBase *> base/bind_internal.h:194:12 (content_browsertests+0x3d90f88)
    #27 MakeItSo<void (content::BrowserTestBase::*const &)(), content::BrowserTestBase *> base/bind_internal.h:277 (content_browsertests+0x3d90f88)
    #28 RunImpl<void (content::BrowserTestBase::*const &)(), const std::__1::tuple<base::internal::UnretainedWrapper<content::BrowserTestBase> > &, 0> base/bind_internal.h:349 (content_browsertests+0x3d90f88)
    #29 base::internal::Invoker<base::internal::BindState<void (content::BrowserTestBase::*)(), base::internal::UnretainedWrapper<content::BrowserTestBase> >, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:331 (content_browsertests+0x3d90f88)
    #30 Run base/callback.h:92:12 (content_browsertests+0x3e57d18)
    #31 content::ShellBrowserMainParts::PreMainMessageLoopRun() content/shell/browser/shell_browser_main_parts.cc:181 (content_browsertests+0x3e57d18)
    #32 content::BrowserMainLoop::PreMainMessageLoopRun() content/browser/browser_main_loop.cc:1189:13 (content_browsertests+0x34a0ff0)
    #33 Invoke<content::BrowserMainLoop *> base/bind_internal.h:194:12 (content_browsertests+0x34a46e8)
    #34 MakeItSo<int (content::BrowserMainLoop::*const &)(), content::BrowserMainLoop *> base/bind_internal.h:277 (content_browsertests+0x34a46e8)
    #35 RunImpl<int (content::BrowserMainLoop::*const &)(), const std::__1::tuple<base::internal::UnretainedWrapper<content::BrowserMainLoop> > &, 0> base/bind_internal.h:349 (content_browsertests+0x34a46e8)
    #36 base::internal::Invoker<base::internal::BindState<int (content::BrowserMainLoop::*)(), base::internal::UnretainedWrapper<content::BrowserMainLoop> >, int ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:331 (content_browsertests+0x34a46e8)
    #37 Run base/callback.h:92:12 (content_browsertests+0x3a0d61e)
    #38 content::StartupTaskRunner::RunAllTasksNow() content/browser/startup_task_runner.cc:45 (content_browsertests+0x3a0d61e)
    #39 content::BrowserMainLoop::CreateStartupTasks() content/browser/browser_main_loop.cc:973:25 (content_browsertests+0x349ec08)
    #40 content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&) content/browser/browser_main_runner.cc:119:17 (content_browsertests+0x34a5b78)
    #41 ShellBrowserMain(content::MainFunctionParams const&, std::__1::unique_ptr<content::BrowserMainRunner, std::__1::default_delete<content::BrowserMainRunner> > const&) content/shell/browser/shell_browser_main.cc:23:32 (content_browsertests+0x3e575f7)
    #42 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:322:16 (content_browsertests+0x3dfc0e4)
    #43 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:414:35 (content_browsertests+0x335c481)
    #44 content::ContentMainRunnerImpl::Run() content/app/content_main_runner.cc:705:12 (content_browsertests+0x335d1cd)
    #45 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() content/app/content_service_manager_main_delegate.cc:51:32 (content_browsertests+0x25aecef)
    #46 service_manager::Main(service_manager::MainParams const&) services/service_manager/embedder/main.cc:456:29 (content_browsertests+0x5e13a73)
    #47 content::ContentMain(content::ContentMainParams const&) content/app/content_main.cc:19:10 (content_browsertests+0x25af49b)
    #48 content::BrowserTestBase::SetUp() content/public/test/browser_test_base.cc:290:3 (content_browsertests+0x3d8fa0f)
    #49 content::ContentBrowserTest::SetUp() content/public/test/content_browser_test.cc:92:20 (content_browsertests+0x3d80436)
    #50 testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc (content_browsertests+0x1df00a6)
    #51 testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2654:11 (content_browsertests+0x1df0f1d)
    #52 testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2772:28 (content_browsertests+0x1df1766)
    #53 testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:4677:43 (content_browsertests+0x1dfa6b6)
    #54 testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc (content_browsertests+0x1dfa0b5)
    #55 RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2237:46 (content_browsertests+0x3dd03e6)
    #56 base::TestSuite::Run() base/test/test_suite.cc:270 (content_browsertests+0x3dd03e6)
    #57 content::ContentTestLauncherDelegate::RunTestSuite(int, char**) content/test/content_test_launcher.cc:106:48 (content_browsertests+0x3d85d4b)
    #58 content::LaunchTests(content::TestLauncherDelegate*, unsigned long, int, char**) content/public/test/test_launcher.cc:620:31 (content_browsertests+0x3db1354)
    #59 main content/test/content_test_launcher.cc:136:10 (content_browsertests+0x3d85cdd)
  Previous read of size 1 at 0x7b140002de09 by thread T21:
    #0 ArgbVisualAvailable ui/base/x/x11_util.cc:1451:11 (content_browsertests+0x54ce50d)
    #1 ui::XVisualManager::ChooseVisualForWindow(bool, Visual**, int*, unsigned long*, bool*) ui/base/x/x11_util.cc:1413 (content_browsertests+0x54ce50d)
    #2 ChooseConfig ui/gl/gl_surface_egl.cc:346:40 (content_browsertests+0x40f271b)
    #3 gl::GLSurfaceEGL::GetConfig() ui/gl/gl_surface_egl.cc:551 (content_browsertests+0x40f271b)
    #4 gl::PbufferGLSurfaceEGL::Initialize(gl::GLSurfaceFormat) ui/gl/gl_surface_egl.cc:1385:40 (content_browsertests+0x40f7215)
    #5 gl::InitializeGLSurfaceWithFormat(scoped_refptr<gl::GLSurface>, gl::GLSurfaceFormat) ui/gl/gl_surface.cc:424:17 (content_browsertests+0x40e38b5)
    #6 gl::init::CreateOffscreenGLSurfaceWithFormat(gfx::Size const&, gl::GLSurfaceFormat) ui/gl/init/gl_factory_x11.cc:115:16 (content_browsertests+0x56a9740)
    #7 gl::init::CreateOffscreenGLSurface(gfx::Size const&) ui/gl/init/gl_factory.cc:113:10 (content_browsertests+0x56a8dc5)
    #8 InitializeGLSurface gpu/config/gpu_info_collector.cc:38:7 (content_browsertests+0x21ad357)
    #9 gpu::CollectGraphicsInfoGL(gpu::GPUInfo*) gpu/config/gpu_info_collector.cc:111 (content_browsertests+0x21ad357)
    #10 gpu::CollectContextGraphicsInfo(gpu::GPUInfo*) gpu/config/gpu_info_collector_linux.cc:20:30 (content_browsertests+0x21affa6)
    #11 gpu::GpuInit::InitializeInProcess(base::CommandLine*, gpu::GpuPreferences const&, gpu::GPUInfo const*, gpu::GpuFeatureInfo const*) gpu/ipc/service/gpu_init.cc:307:3 (content_browsertests+0x59137dc)
    #12 content::InProcessGpuThread::Init() content/gpu/in_process_gpu_thread.cc:60:13 (content_browsertests+0x7e910b6)
    #13 base::Thread::ThreadMain() base/threading/thread.cc:327:3 (content_browsertests+0x42c58e9)
    #14 base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:75:13 (content_browsertests+0x42bc93d)
  Location is heap block of size 80 at 0x7b140002ddc0 allocated by main thread:
    #0 operator new(unsigned long) <null> (content_browsertests+0x15d6b69)
    #1 New base/memory/singleton.h:54:12 (content_browsertests+0x54cddcc)
    #2 get base/memory/singleton.h:258 (content_browsertests+0x54cddcc)
    #3 ui::XVisualManager::GetInstance() ui/base/x/x11_util.cc:1361 (content_browsertests+0x54cddcc)
    #4 views::DesktopWindowTreeHostX11::InitX11Window(views::Widget::InitParams const&) ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc:1384:3 (content_browsertests+0x899b292)
    #5 views::DesktopWindowTreeHostX11::Init(aura::Window*, views::Widget::InitParams const&) ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc:416:3 (content_browsertests+0x899b066)
    #6 views::DesktopNativeWidgetAura::InitNativeWidget(views::Widget::InitParams const&) ui/views/widget/desktop_aura/desktop_native_widget_aura.cc:434:30 (content_browsertests+0x89a9493)
    #7 views::Widget::Init(views::Widget::InitParams const&) ui/views/widget/widget.cc:336:19 (content_browsertests+0x8969bf5)
    #8 content::Shell::PlatformCreateWindow(int, int) content/shell/browser/shell_views.cc:417:19 (content_browsertests+0x3e7bbca)
    #9 content::Shell::CreateShell(content::WebContents*, gfx::Size const&) content/shell/browser/shell.cc:126:10 (content_browsertests+0x3e54337)
    #10 content::Shell::CreateNewWindow(content::BrowserContext*, GURL const&, scoped_refptr<content::SiteInstance> const&, gfx::Size const&) content/shell/browser/shell.cc:201:18 (content_browsertests+0x3e549bd)
    #11 content::ShellBrowserMainParts::InitializeMessageLoopContext() content/shell/browser/shell_browser_main_parts.cc:150:3 (content_browsertests+0x3e57b97)
    #12 content::ShellBrowserMainParts::PreMainMessageLoopRun() content/shell/browser/shell_browser_main_parts.cc:178:3 (content_browsertests+0x3e57ce9)
    #13 content::BrowserMainLoop::PreMainMessageLoopRun() content/browser/browser_main_loop.cc:1189:13 (content_browsertests+0x34a0ff0)
    #14 Invoke<content::BrowserMainLoop *> base/bind_internal.h:194:12 (content_browsertests+0x34a46e8)
    #15 MakeItSo<int (content::BrowserMainLoop::*const &)(), content::BrowserMainLoop *> base/bind_internal.h:277 (content_browsertests+0x34a46e8)
    #16 RunImpl<int (content::BrowserMainLoop::*const &)(), const std::__1::tuple<base::internal::UnretainedWrapper<content::BrowserMainLoop> > &, 0> base/bind_internal.h:349 (content_browsertests+0x34a46e8)
    #17 base::internal::Invoker<base::internal::BindState<int (content::BrowserMainLoop::*)(), base::internal::UnretainedWrapper<content::BrowserMainLoop> >, int ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:331 (content_browsertests+0x34a46e8)
    #18 Run base/callback.h:92:12 (content_browsertests+0x3a0d61e)
    #19 content::StartupTaskRunner::RunAllTasksNow() content/browser/startup_task_runner.cc:45 (content_browsertests+0x3a0d61e)
    #20 content::BrowserMainLoop::CreateStartupTasks() content/browser/browser_main_loop.cc:973:25 (content_browsertests+0x349ec08)
    #21 content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&) content/browser/browser_main_runner.cc:119:17 (content_browsertests+0x34a5b78)
    #22 ShellBrowserMain(content::MainFunctionParams const&, std::__1::unique_ptr<content::BrowserMainRunner, std::__1::default_delete<content::BrowserMainRunner> > const&) content/shell/browser/shell_browser_main.cc:23:32 (content_browsertests+0x3e575f7)
    #23 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:322:16 (content_browsertests+0x3dfc0e4)
    #24 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:414:35 (content_browsertests+0x335c481)
    #25 content::ContentMainRunnerImpl::Run() content/app/content_main_runner.cc:705:12 (content_browsertests+0x335d1cd)
    #26 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() content/app/content_service_manager_main_delegate.cc:51:32 (content_browsertests+0x25aecef)
    #27 service_manager::Main(service_manager::MainParams const&) services/service_manager/embedder/main.cc:456:29 (content_browsertests+0x5e13a73)
    #28 content::ContentMain(content::ContentMainParams const&) content/app/content_main.cc:19:10 (content_browsertests+0x25af49b)
    #29 content::BrowserTestBase::SetUp() content/public/test/browser_test_base.cc:290:3 (content_browsertests+0x3d8fa0f)
    #30 content::ContentBrowserTest::SetUp() content/public/test/content_browser_test.cc:92:20 (content_browsertests+0x3d80436)
    #31 testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc (content_browsertests+0x1df00a6)
    #32 testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2654:11 (content_browsertests+0x1df0f1d)
    #33 testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2772:28 (content_browsertests+0x1df1766)
    #34 testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:4677:43 (content_browsertests+0x1dfa6b6)
    #35 testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc (content_browsertests+0x1dfa0b5)
    #36 RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2237:46 (content_browsertests+0x3dd03e6)
    #37 base::TestSuite::Run() base/test/test_suite.cc:270 (content_browsertests+0x3dd03e6)
    #38 content::ContentTestLauncherDelegate::RunTestSuite(int, char**) content/test/content_test_launcher.cc:106:48 (content_browsertests+0x3d85d4b)
    #39 content::LaunchTests(content::TestLauncherDelegate*, unsigned long, int, char**) content/public/test/test_launcher.cc:620:31 (content_browsertests+0x3db1354)
    #40 main content/test/content_test_launcher.cc:136:10 (content_browsertests+0x3d85cdd)
  Thread T21 'Chrome_InProcGpuThread' (tid=2300, running) created by thread T17 at:
    #0 pthread_create <null> (content_browsertests+0x1570a13)
    #1 base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:114:13 (content_browsertests+0x42bc4c7)
    #2 base::PlatformThread::CreateWithPriority(unsigned long, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:199:10 (content_browsertests+0x42bc3c5)
    #3 base::Thread::StartWithOptions(base::Thread::Options const&) base/threading/thread.cc:112:15 (content_browsertests+0x42c51c7)
    #4 content::GpuProcessHost::Init() content/browser/gpu/gpu_process_host.cc:615:29 (content_browsertests+0x36cbd82)
    #5 content::GpuProcessHost::Get(content::GpuProcessHost::GpuProcessKind, bool) content/browser/gpu/gpu_process_host.cc:398:13 (content_browsertests+0x36cba9b)
    #6 content::BrowserGpuChannelHostFactory::EstablishRequest::EstablishOnIO() content/browser/gpu/browser_gpu_channel_host_factory.cc:122:26 (content_browsertests+0x36b295b)
    #7 Invoke<scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest>> base/bind_internal.h:194:12 (content_browsertests+0x36b40e9)
    #8 MakeItSo<void (content::BrowserGpuChannelHostFactory::EstablishRequest::*)(), scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest> > base/bind_internal.h:277 (content_browsertests+0x36b40e9)
    #9 RunImpl<void (content::BrowserGpuChannelHostFactory::EstablishRequest::*)(), std::__1::tuple<scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest> >, 0> base/bind_internal.h:349 (content_browsertests+0x36b40e9)
    #10 base::internal::Invoker<base::internal::BindState<void (content::BrowserGpuChannelHostFactory::EstablishRequest::*)(), scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest> >, void ()>::RunOnce(base::internal::BindStateBase*) base/bind_internal.h:318 (content_browsertests+0x36b40e9)
    #11 Run base/callback.h:64:12 (content_browsertests+0x421f726)
    #12 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:57 (content_browsertests+0x421f726)
    #13 base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:130:19 (content_browsertests+0x424ea2b)
    #14 base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:394:25 (content_browsertests+0x424cc07)
    #15 DeferOrRunPendingTask base/message_loop/message_loop.cc:406:5 (content_browsertests+0x424d341)
    #16 base::MessageLoop::DoWork() base/message_loop/message_loop.cc:450 (content_browsertests+0x424d341)
    #17 base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_libevent.cc:220:31 (content_browsertests+0x4252500)
    #18 Run base/message_loop/message_loop.cc:345:12 (content_browsertests+0x424c5d0)
    #19 non-virtual thunk to base::MessageLoop::Run(bool) base/message_loop/message_loop.cc (content_browsertests+0x424c5d0)
    #20 base::RunLoop::Run() base/run_loop.cc:114:14 (content_browsertests+0x4281a30)
    #21 base::Thread::Run(base::RunLoop*) base/threading/thread.cc:255:13 (content_browsertests+0x42c5689)
    #22 content::BrowserThreadImpl::IOThreadRun(base::RunLoop*) content/browser/browser_thread_impl.cc:248:11 (content_browsertests+0x34b151f)
    #23 content::BrowserThreadImpl::Run(base::RunLoop*) content/browser/browser_thread_impl.cc:283:14 (content_browsertests+0x34b1794)
    #24 base::Thread::ThreadMain() base/threading/thread.cc:338:3 (content_browsertests+0x42c5951)
    #25 base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:75:13 (content_browsertests+0x42bc93d)
SUMMARY: ThreadSanitizer: data race ui/base/x/x11_util.cc:1440:29 in ui::XVisualManager::OnGPUInfoChanged(bool, unsigned long, unsigned long)

Comment 4 by s...@chromium.org, Nov 2 2017

The race seems to be centered around a shared ui::XVisualManager class, but the folder containing this class hasn't been touched for weeks. https://chromium.googlesource.com/chromium/src/+log/e11aae0c30d30be8f5fffc0d52d40acbbb19a7ee/ui/base/x
Yeah, that shouldn't cause any new data races in existing code. All that change does is initialize a COM environment for the worker pools.

If it's broken now, it should have been broken before.
Ah, even more relevant: My change only impacts Windows. COM doesn't exist on Linux!

Comment 7 by s...@chromium.org, Nov 2 2017

Cc: kbr@chromium.org piman@chromium.org
Components: Internals>GPU>Internals
Since it's the main thread and the Chrome_InProcGpuThread thread that're interacting here, adding some GPU owners in case they have more context of how this should work, or if the race is intentional.

Comment 8 by s...@chromium.org, Nov 2 2017

Cc: briander...@chromium.org jamwalla@chromium.org
If we disregard the first failure https://build.chromium.org/p/chromium.memory/builders/Linux%20TSan%20Tests/builds/13686 , since the errors are slightly different, and say that was an unlikely flake.

Then the second failure, https://build.chromium.org/p/chromium.memory/builders/Linux%20TSan%20Tests/builds/13687 , has two CLs that look tangentially related, if you really squint, https://chromium-review.googlesource.com/c/chromium/src/+/750201 and https://chromium-review.googlesource.com/c/chromium/src/+/741001 . gl_surface_egl.cc is even part of the race stack!

+brianderson and +jamwalla. I'm sorry for looping in people near blindly, but I don't have much understanding of the code that's having problems.

Comment 9 by piman@chromium.org, Nov 3 2017

Cc: thomasanderson@chromium.org
I think the problem is that XVisualManager is a singleton that exists in both the browser process and the GPU process, so we should have 2 instances that run independently, but when running in-process, we only have 1 instance that ends up being shared between threads and we run into these issues. We could probably add a lock around the few fields that are accessed from multiple threads, to make it thread-safe, and I think that would be good enough for tests.

Comment 10 by s...@chromium.org, Nov 3 2017

Owner: piman@chromium.org
Thank you so much for the reply piman! Can you take ownership of this suggested fix, or find someone to take ownership? The Linux Tsan bots are completely red right now because of this.
Cc: -thomasanderson@chromium.org
Labels: OS-Linux
Owner: thomasanderson@chromium.org
@thomasanderson, could you take this?
Cc: -robliao@chromium.org
Status: Started (was: Available)
Project Member

Comment 14 by bugdroid1@chromium.org, Nov 4 2017

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

commit 67d3cf520878b87b31b369548dbbc22730218fa2
Author: Tom Anderson <thomasanderson@chromium.org>
Date: Sat Nov 04 01:00:51 2017

X11: Synchronize XVisualManager

To fix TSAN, this CL adds synchronization for the public API of
XVisualManager.

BUG= 780996 
R=derat@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_tsan_rel_ng

Change-Id: Ia6b7ea40ebe3f4c1dbdb095549ae7825132b610f
Reviewed-on: https://chromium-review.googlesource.com/754103
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513996}
[modify] https://crrev.com/67d3cf520878b87b31b369548dbbc22730218fa2/ui/base/x/x11_util.cc
[modify] https://crrev.com/67d3cf520878b87b31b369548dbbc22730218fa2/ui/base/x/x11_util_internal.h

Status: Fixed (was: Started)

Sign in to add a comment