New issue
Advanced search Search tips

Issue 707058 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

BluetoothEventRouterTest tests are flaky (crashing)

Project Member Reported by michae...@chromium.org, Mar 30 2017

Issue description

When run locally or on the bots, BluetoothEventRouterTest test cases sometimes crash. This only happens when DCHECK is on.

Example failure: https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.chromiumos%2FLinux_ChromiumOS_Tests__dbg__1_%2F24256%2F%2B%2Frecipes%2Fsteps%2Fextensions_unittests%2F0%2Fstdout

Example output:

[14831:14831:0330/142747.964420:7123018170:FATAL:dependency_manager.cc(108)] Check failed: false. Attempted to access a context that was ShutDown(). This is most likely a heap smasher in progress. After KeyedService::Shutdown() completes, your service MUST NOT refer to depended services again.
#0 0x7f409702141b base::debug::StackTrace::StackTrace()
#1 0x7f409701faec base::debug::StackTrace::StackTrace()
#2 0x7f409708626c logging::LogMessage::~LogMessage()
#3 0x7f4089f21e7f DependencyManager::AssertContextWasntDestroyed()
#4 0x7f4089f243e1 KeyedServiceBaseFactory::AssertContextWasntDestroyed()
#5 0x7f4089241147 BrowserContextKeyedServiceFactory::GetContextToUse()
#6 0x7f4089f24f7d KeyedServiceFactory::GetServiceForContext()
#7 0x7f4089240ed7 BrowserContextKeyedServiceFactory::GetServiceForBrowserContext()
#8 0x0000011001d2 extensions::ExtensionRegistryFactory::GetForBrowserContext()
#9 0x0000010fa235 extensions::ExtensionRegistry::Get()
#10 0x00000112b0a7 extensions::LazyBackgroundTaskQueue::LazyBackgroundTaskQueue()
#11 0x000000704054 extensions::LazyBackgroundTaskQueueTest_ShouldEnqueueTask_Test::TestBody()
#12 0x0000019fe5ae testing::internal::HandleSehExceptionsInMethodIfSupported<>()
#13 0x0000019f15f2 testing::internal::HandleExceptionsInMethodIfSupported<>()
#14 0x0000019e6516 testing::Test::Run()
#15 0x0000019e6c4d testing::TestInfo::Run()
#16 0x0000019e71ef testing::TestCase::Run()
#17 0x0000019ec55c testing::internal::UnitTestImpl::RunAllTests()
#18 0x000001a025ee testing::internal::HandleSehExceptionsInMethodIfSupported<>()
#19 0x0000019f2d22 testing::internal::HandleExceptionsInMethodIfSupported<>()
#20 0x0000019ec1ff testing::UnitTest::Run()
#21 0x00000184d3c1 RUN_ALL_TESTS()
#22 0x00000184c352 base::TestSuite::Run()
#23 0x00000189b98d content::UnitTestTestSuite::Run()
#24 0x0000005657c5 _ZN4base8internal13FunctorTraitsIMN7content17UnitTestTestSuiteEFivEvE6InvokeIPS3_JEEEiS5_OT_DpOT0_
#25 0x0000005656e1 _ZN4base8internal12InvokeHelperILb0EiE8MakeItSoIRKMN7content17UnitTestTestSuiteEFivEJPS5_EEEiOT_DpOT0_
#26 0x000000565687 _ZN4base8internal7InvokerINS0_9BindStateIMN7content17UnitTestTestSuiteEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE7RunImplIRKS6_RKSt5tupleIJS8_EEJLm0EEEEiOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
#27 0x00000056559c _ZN4base8internal7InvokerINS0_9BindStateIMN7content17UnitTestTestSuiteEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE3RunEPNS0_13BindStateBaseE
#28 0x00000065487d _ZNKR4base8CallbackIFvvELNS_8internal8CopyModeE1ELNS2_10RepeatModeE1EE3RunEv
#29 0x00000184fc8e base::(anonymous namespace)::LaunchUnitTestsInternal()
#30 0x00000184fb24 base::LaunchUnitTests()
#31 0x00000056274a main
#32 0x7f4086d8af45 __libc_start_main
#33 0x0000005625e5 <unknown>

 
Owner: se...@yandex-team.ru
Status: Assigned (was: Untriaged)
I will fix it. We need to mark context as live in every BrowserContext::Initialize() call.
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 3 2017

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

commit d41e9b3d5432ec0bf5e5679fc45432e2e178d6f7
Author: sense <sense@yandex-team.ru>
Date: Mon Apr 03 05:58:32 2017

Mark content::TestBrowserContext as live in ExtensionsTest before use.

This fixes occasional assertions when a test is based on ExtensionsTest and
does service requesting before SetUp is called.

BUG= 707058 
R=benwells@chromium.org

Review-Url: https://codereview.chromium.org/2785373003
Cr-Commit-Position: refs/heads/master@{#461374}

[modify] https://crrev.com/d41e9b3d5432ec0bf5e5679fc45432e2e178d6f7/extensions/browser/extensions_test.cc

Status: Fixed (was: Started)

Sign in to add a comment