New issue
Advanced search Search tips

Issue 712515 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug



Sign in to add a comment

Flaky unittest: EmbeddedWorkerInstanceTest.AddMessageToConsole

Project Member Reported by shimazu@chromium.org, Apr 18 2017

Issue description

Flaky dashboard:
https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=content_unittests&tests=EmbeddedWorkerInstanceTest.AddMessageToConsole


This is the crash dump of EWInstanceTest.AddMessageToConsole:

[18265:18265:0418/102940.610783:2420576254721:FATAL:worker_devtools_agent_host.cc(116)] Check failed: WORKER_TERMINATED == state_ (2 vs. 0)
#0 0x7ff27a42a3fb base::debug::StackTrace::StackTrace()
#1 0x7ff27a4290fc base::debug::StackTrace::StackTrace()
#2 0x7ff27a49bf2f logging::LogMessage::~LogMessage()
#3 0x7ff276a33756 content::WorkerDevToolsAgentHost::WorkerRestarted()
#4 0x7ff276a2473f content::ServiceWorkerDevToolsManager::WorkerCreated()
#5 0x7ff27723f163 content::(anonymous namespace)::SetupOnUI()
#6 0x7ff277244e96 _ZN4base8internal13FunctorTraitsIPFviPKN7content24ServiceWorkerContextCoreERKNS_7WeakPtrIS3_EElRK4GURLSC_bN4mojo16InterfaceRequestINS2_5mojom28EmbeddedWorkerInstanceClientEEERKNS_8CallbackIFvibELNS0_8CopyModeE1ELNS0_10RepeatModeE1EEEEvE6InvokeIJRKiRKPS3_S9_RKlSC_SC_RKbSH_SO_EEEvSQ_DpOT_
#7 0x7ff277244bac _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKPFviPKN7content24ServiceWorkerContextCoreERKNS_7WeakPtrIS5_EElRK4GURLSE_bN4mojo16InterfaceRequestINS4_5mojom28EmbeddedWorkerInstanceClientEEERKNS_8CallbackIFvibELNS0_8CopyModeE1ELNS0_10RepeatModeE1EEEEJRKiRKPS5_SB_RKlSE_SE_RKbSJ_SQ_EEEvOT_DpOT0_
#8 0x7ff277244a78 _ZN4base8internal7InvokerINS0_9BindStateIPFviPKN7content24ServiceWorkerContextCoreERKNS_7WeakPtrIS4_EElRK4GURLSD_bN4mojo16InterfaceRequestINS3_5mojom28EmbeddedWorkerInstanceClientEEERKNS_8CallbackIFvibELNS0_8CopyModeE1ELNS0_10RepeatModeE1EEEEJiPS4_S8_lSB_SB_bNS0_13PassedWrapperISI_EESN_EEEFvvEE7RunImplIRKSR_RKSt5tupleIJiSS_S8_lSB_SB_bSU_SN_EEJLm0ELm1ELm2ELm3ELm4ELm5ELm6ELm7ELm8EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
#9 0x7ff27724476c _ZN4base8internal7InvokerINS0_9BindStateIPFviPKN7content24ServiceWorkerContextCoreERKNS_7WeakPtrIS4_EElRK4GURLSD_bN4mojo16InterfaceRequestINS3_5mojom28EmbeddedWorkerInstanceClientEEERKNS_8CallbackIFvibELNS0_8CopyModeE1ELNS0_10RepeatModeE1EEEEJiPS4_S8_lSB_SB_bNS0_13PassedWrapperISI_EESN_EEEFvvEE3RunEPNS0_13BindStateBaseE
#10 0x7ff27a43090e _ZNO4base8CallbackIFvvELNS_8internal8CopyModeE0ELNS2_10RepeatModeE0EE3RunEv
#11 0x7ff27a43004e base::debug::TaskAnnotator::RunTask()
#12 0x7ff27a4c077d base::MessageLoop::RunTask()
#13 0x7ff27a4c0a04 base::MessageLoop::DeferOrRunPendingTask()
#14 0x7ff27a4c0cf4 base::MessageLoop::DoWork()
#15 0x7ff27a4dac2e base::MessagePumpLibevent::Run()
#16 0x7ff27a4c0317 base::MessageLoop::RunHandler()
#17 0x7ff27a56328a base::RunLoop::Run()
#18 0x7ff27a563509 base::RunLoop::RunUntilIdle()
#19 0x000001244d72 content::EmbeddedWorkerInstanceTest_AddMessageToConsole_Test::TestBody()
#20 0x000000e5fdde _ZN7testing8internal12InvokeHelperIdSt5tupleIJEEE12InvokeMethodIN5media23VirtualAudioInputStreamEMS7_FdvEEEdPT_T0_RKS3_
#21 0x0000023694f2 testing::internal::HandleExceptionsInMethodIfSupported<>()
#22 0x00000235e256 testing::Test::Run()
#23 0x00000235ea0d testing::TestInfo::Run()
#24 0x00000235efaf testing::TestCase::Run()
#25 0x00000236431c testing::internal::UnitTestImpl::RunAllTests()
#26 0x000000e5f23e _ZN7testing8internal12InvokeHelperIbSt5tupleIJEEE12InvokeMethodIN5media23VirtualAudioInputStreamEMS7_FbvEEEbPT_T0_RKS3_
#27 0x00000236abe2 testing::internal::HandleExceptionsInMethodIfSupported<>()
#28 0x000002363fbf testing::UnitTest::Run()
#29 0x0000021c0411 RUN_ALL_TESTS()
#30 0x0000021bf2d2 base::TestSuite::Run()
#31 0x00000215262d content::UnitTestTestSuite::Run()
#32 0x000000732025 _ZN4base8internal13FunctorTraitsIMN7content26AppCacheRequestHandlerTestEFvvEvE6InvokeIPS3_JEEEvS5_OT_DpOT0_
#33 0x000000731f41 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMN7content26AppCacheRequestHandlerTestEFvvEJPS5_EEEvOT_DpOT0_
#34 0x00000170eba7 _ZN4base8internal7InvokerINS0_9BindStateIMN7content17UnitTestTestSuiteEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE7RunImplIRKS6_RKSt5tupleIJS8_EEJLm0EEEEiOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
#35 0x00000170eaec _ZN4base8internal7InvokerINS0_9BindStateIMN7content17UnitTestTestSuiteEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE3RunEPNS0_13BindStateBaseE
#36 0x00000073e46d _ZNKR4base8CallbackIFvvELNS_8internal8CopyModeE1ELNS2_10RepeatModeE1EE3RunEv
#37 0x0000021e1726 base::(anonymous namespace)::LaunchUnitTestsInternal()
#38 0x0000021e1594 base::LaunchUnitTests()
#39 0x00000170e97f main
#40 0x7ff268e25f45 __libc_start_main
#41 0x0000006b1874 <unknown>

 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 19 2017

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

commit 6c2885ec2d91839b39a248c1461b5ecd7d857bf9
Author: shimazu <shimazu@chromium.org>
Date: Wed Apr 19 05:48:50 2017

ServiceWorker: Create a proxy when adding the worker to DevToolsManager

Currently ServiceWorkerDevToolsAgentHost is created on the UI thread in
ServiceWorkerDevToolsManager::WorkerCreated which is invoked on SetupOnUI, and
DevToolsProxy managing the agent is created in the task posted by SetupOnUI
which runs on the io thread. However, if the mojo interface which is connected
in the SetupOnUI fails to establish the connection to the renderer process,
OnDetach gets called before setting up the DevToolsProxy. This means the
ServiceWorkerDevToolsAgentHost is dangling even though EWInstance no longer has
any process.  This patch is to fix that by creating DevToolsProxy at the same
time with WorkerCreated. This enables us to manage the lifetime of the agent
even if EmbeddedWorkerInstance fails making connection somehow.

BUG= 712515 

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

[modify] https://crrev.com/6c2885ec2d91839b39a248c1461b5ecd7d857bf9/content/browser/service_worker/embedded_worker_instance.cc
[modify] https://crrev.com/6c2885ec2d91839b39a248c1461b5ecd7d857bf9/content/browser/service_worker/embedded_worker_instance.h

Status: Fixed (was: Started)
Looks fine in the dashboard.
Labels: M-60

Sign in to add a comment