[Media Router] Browser tests crashing because of CHECK-fail on threading |
||||||
Issue descriptionThe MR integration browser tests are all failing for me because of a CHECK failing in base::FilePath. This cannot be called on the UI thread. I don't know if this is somehow just a problem for my build, or if this was recently enforced or introduced by a refactoring. The CHECK has been there for some time... Note: Google Test filter = MediaRouterIntegrationIncognitoBrowserTest.MANUAL_ReconnectSession [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from MediaRouterIntegrationIncognitoBrowserTest, where TypeParam = [ RUN ] MediaRouterIntegrationIncognitoBrowserTest.MANUAL_ReconnectSession [28554:28554:0519/112054.402147:246636717248:INFO:media_router_base_browsertest.cc(112)] ParseCommandLine [28554:28554:0519/112055.699741:WARNING:browser_main_loop.cc(264)] <unknown>: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-yJyHynUwUC: Connection refused [28554:28554:0519/112056.278480:WARNING:password_store_factory.cc(250)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options. [28554:28580:0519/112057.846801:WARNING:extension_l10n_util.cc(296)] Supplied locale iw is not supported. [28554:28580:0519/112058.659789:WARNING:extension_l10n_util.cc(296)] Supplied locale iw is not supported. [28554:28554:0519/112059.283051:INFO:media_router_base_browsertest.cc(107)] Host created [28554:28554:0519/112100.639344:FATAL:thread_restrictions.cc(38)] Check failed: false. Function marked as IO-only was called from a thread that disallows IO! If this thread really should be allowed to make IO calls, adjust the call to base::ThreadRestrictions::SetIOAllowed() in this thread's startup. #0 0x7facbc3506fb base::debug::StackTrace::StackTrace() #1 0x7facbc34f3fc base::debug::StackTrace::StackTrace() #2 0x7facbc3c2f83 logging::LogMessage::~LogMessage() #3 0x7facbc548ee7 base::ThreadRestrictions::AssertIOAllowed() #4 0x7facbc3994f1 base::PathExists() #5 0x0000017fc4eb media_router::MediaRouterIntegrationBrowserTest::GetResourceFile() #6 0x0000017fbc0a media_router::MediaRouterIntegrationBrowserTest::OpenTestPage() #7 0x0000017fbe2d media_router::MediaRouterIntegrationBrowserTest::StartSessionWithTestPageAndSink() #8 0x0000017fbfa9 media_router::MediaRouterIntegrationBrowserTest::StartSessionWithTestPageAndChooseSink() #9 0x0000017fef1f media_router::MediaRouterIntegrationBrowserTest::RunReconnectSessionTest() #10 0x000001800235 media_router::MediaRouterIntegrationIncognitoBrowserTest_MANUAL_ReconnectSession_Test::RunTestOnMainThread() #11 0x0000040575ba content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #12 0x0000008a6075 _ZN4base8internal13FunctorTraitsIM25RenderViewContextMenuBaseFvvEvE6InvokeIP21RenderViewContextMenuJEEEvS4_OT_DpOT0_ #13 0x0000008a5f81 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIM25RenderViewContextMenuBaseFvvEJP21RenderViewContextMenuEEEvOT_DpOT0_ #14 0x0000040590a7 _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserTestBaseEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIRKS6_RKSt5tupleIJS8_EEJLm0EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEE #15 0x000004058fec _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserTestBaseEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE3RunEPNS0_13BindStateBaseE #16 0x00000088d07d _ZNKR4base8CallbackIFvvELNS_8internal8CopyModeE1ELNS2_10RepeatModeE1EE3RunEv #17 0x000003b45a8e ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #18 0x000003b444e0 ChromeBrowserMainParts::PreMainMessageLoopRun() #19 0x7facb33828f1 content::BrowserMainLoop::PreMainMessageLoopRun() #20 0x7facb261c475 _ZN4base8internal13FunctorTraitsIMN7content13URLLoaderImplEFvvEvE6InvokeIPS3_JEEEvS5_OT_DpOT0_ #21 0x7facb338bfa1 _ZN4base8internal12InvokeHelperILb0EiE8MakeItSoIRKMN7content15BrowserMainLoopEFivEJPS5_EEEiOT_DpOT0_ #22 0x7facb338bf47 _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserMainLoopEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE7RunImplIRKS6_RKSt5tupleIJS8_EEJLm0EEEEiOT_OT0_NS_13IndexSequenceIJXspT1_EEEE #23 0x7facb338be8c _ZN4base8internal7InvokerINS0_9BindStateIMN7content15BrowserMainLoopEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE3RunEPNS0_13BindStateBaseE #24 0x7facb25ee76d _ZNKR4base8CallbackIFvvELNS_8internal8CopyModeE1ELNS2_10RepeatModeE1EE3RunEv #25 0x7facb3fb67ab content::StartupTaskRunner::RunAllTasksNow() #26 0x7facb3380380 content::BrowserMainLoop::CreateStartupTasks() #27 0x7facb338f3b7 content::BrowserMainRunnerImpl::Initialize() #28 0x7facb337c67f content::BrowserMain() #29 0x7facb4d46f56 content::RunNamedProcessTypeMain() #30 0x7facb4d4928d content::ContentMainRunnerImpl::Run() #31 0x7facb4d459fa content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #32 0x7faca5fa6dd1 service_manager::Main() #33 0x7facb4d469af content::ContentMain() #34 0x0000040572ae content::BrowserTestBase::SetUp() #35 0x000002e45530 InProcessBrowserTest::SetUp() #36 0x000001635ecd ExtensionBrowserTest::SetUp() #37 0x0000017f5e16 media_router::MediaRouterBaseBrowserTest::SetUp() #38 0x00000117bbee _ZN7testing8internal12InvokeHelperIvSt5tupleIJEEE12InvokeMethodI14ServiceProcessMS6_FvvEEEvPT_T0_RKS3_ #39 0x00000191abb2 testing::internal::HandleExceptionsInMethodIfSupported<>() #40 0x00000190f714 testing::Test::Run() #41 0x00000190ff1d testing::TestInfo::Run() #42 0x0000019104bf testing::TestCase::Run() #43 0x00000191586c testing::internal::UnitTestImpl::RunAllTests() #44 0x00000117b1ee _ZN7testing8internal12InvokeHelperIbSt5tupleIJEEE12InvokeMethodI20MockServiceIPCServerMS6_FbvEEEbPT_T0_RKS3_ #45 0x00000191c3a2 testing::internal::HandleExceptionsInMethodIfSupported<>() #46 0x00000191550f testing::UnitTest::Run() #47 0x000002e62c41 RUN_ALL_TESTS() #48 0x000002e61932 base::TestSuite::Run() #49 0x000002e00be0 ChromeTestSuiteRunner::RunTestSuite() #50 0x000002e00cd9 ChromeTestLauncherDelegate::RunTestSuite() #51 0x0000040e32cf content::LaunchTests() #52 0x000002e01019 LaunchChromeTests() #53 0x000002e00495 main #54 0x7faca2b2ff45 __libc_start_main #55 0x0000008042b4 <unknown>
,
May 22 2017
The buildbots are also experiencing this problem. Linux, Mac and Windows run started to failed on 5/19 (Friday) 6pm and ever since.
,
May 23 2017
,
May 23 2017
It doesn't happen on buildbot, because buildbots use release build, and this is DCHECK, it is not included in release build.
,
May 24 2017
Who's on point to look into/address this?
,
May 30 2017
The other browser tests get around the AssertIOAllowed check by creating a base::ThreadRestrictions::ScopedAllowIO on the stack. The documentation says "Doing this is almost certainly always incorrect", which sounds right in production code but is probably OK in tests. The buildbots are failing for a different reason. I will open another bug for that.
,
May 30 2017
Looks like the IO restrictions were enforced about a month ago: https://groups.google.com/a/chromium.org/forum/#!searchin/chromium-dev/ScopedAllowIO%7Csort:relevance/chromium-dev/RiPPe4g6lKA/UKnkESn3CgAJ
,
May 30 2017
Thanks, ScopedAllowIO sounds right vs. having to implement thread hopping here.
,
May 30 2017
,
May 30 2017
,
May 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a7e23ba097190eb75739fe1687002696b5962853 commit a7e23ba097190eb75739fe1687002696b5962853 Author: imcheng <imcheng@chromium.org> Date: Wed May 31 20:46:26 2017 [Media Router tests] Add minimal ScopedAllowIO for the tests to pass. In MR integration tests we perform certain file IO for loading test data. As IO restrictions are now enforced in browser_tests, we need to use ScopedAllowIO to bypass them. Also added media_router_integration_browsertest.cc to the ScopedAllowIO whitelist. BUG= 724573 Review-Url: https://codereview.chromium.org/2910263002 Cr-Commit-Position: refs/heads/master@{#476010} [modify] https://crrev.com/a7e23ba097190eb75739fe1687002696b5962853/PRESUBMIT.py [modify] https://crrev.com/a7e23ba097190eb75739fe1687002696b5962853/chrome/test/media_router/media_router_integration_browsertest.cc
,
May 31 2017
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by mfo...@chromium.org
, May 19 2017