New issue
Advanced search Search tips

Issue 674443 link

Starred by 1 user

Issue metadata

Status: Duplicate
Owner:
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Flaky LayoutTest: http/tests/serviceworker/chromium/resolve-after-window-close.html

Project Member Reported by shimazu@chromium.org, Dec 15 2016

Issue description

I could reproduce the crash by the following command:

for ((i=0;i<10;i++)); do ./third_party/WebKit/Tools/Scripts/run-webkit-tests  -t Master 'http/tests/serviceworker/chromium/resolve-after-window-close.html' --no-retry-failures --order=random --iterations=100 --exit-after-n-crashes-or-timeouts=1; [[ "$?" != "0" ]] && break; done


This might happen when StopWorker is dispatched before the worker gets started. This is possible to happen when StopWorker is requested while AllocateWorkerProcess is running on the UI thread. 

== crash log ==
[1:1:1215/174257.140702:1838687326856:FATAL:embedded_worker_instance_client_impl.cc(64)] Check failed: embedded_worker_id_. 
#0 0x7f756fb31c8e base::debug::StackTrace::StackTrace()
#1 0x7f756fb5621b logging::LogMessage::~LogMessage()
#2 0x7f7570c8b600 content::EmbeddedWorkerInstanceClientImpl::StopWorker()
#3 0x7f75703d3d99 content::mojom::EmbeddedWorkerInstanceClientStubDispatch::AcceptWithResponder()
#4 0x7f756eeecf15 mojo::InterfaceEndpointClient::HandleValidatedMessage()
#5 0x7f756eeec766 mojo::FilterChain::Accept()
#6 0x7f756eeedffe mojo::InterfaceEndpointClient::HandleIncomingMessage()
#7 0x7f756eef522a mojo::internal::MultiplexRouter::ProcessIncomingMessage()
#8 0x7f756eef4b8a mojo::internal::MultiplexRouter::Accept()
#9 0x7f756eeec766 mojo::FilterChain::Accept()
#10 0x7f756eee8022 mojo::Connector::ReadSingleMessage()
#11 0x7f756eee8681 mojo::Connector::OnHandleReadyInternal()
#12 0x7f7571ab252a mojo::Watcher::OnHandleReady()
#13 0x7f7571ab2654 _ZN4base8internal13FunctorTraitsIMN4mojo7WatcherEFvjEvE6InvokeIRKNS_7WeakPtrIS3_EEJRKjEEEvS5_OT_DpOT0_
#14 0x7f756fb3286e base::debug::TaskAnnotator::RunTask()
#15 0x7f756ce29820 blink::scheduler::TaskQueueManager::ProcessTaskFromWorkQueue()
#16 0x7f756ce28114 blink::scheduler::TaskQueueManager::DoWork()
#17 0x7f756ce2ae3b _ZN4base8internal12InvokeHelperILb1EvE8MakeItSoIRKMN5blink9scheduler16TaskQueueManagerEFvNS_9TimeTicksEbERKNS_7WeakPtrIS6_EEJRKS7_RKbEEEvOT_OT0_DpOT1_
#18 0x7f756fb3286e base::debug::TaskAnnotator::RunTask()
#19 0x7f756fb6386d base::MessageLoop::RunTask()
#20 0x7f756fb64206 base::MessageLoop::DoWork()
#21 0x7f756fb65c69 base::MessagePumpDefault::Run()
#22 0x7f756fb635c5 base::MessageLoop::RunHandler()
#23 0x7f756fb9778c base::RunLoop::Run()
#24 0x7f7570c82ab8 content::RendererMain()
#25 0x7f7570dd4c77 content::RunZygote()
#26 0x7f7570dd53a8 content::RunNamedProcessTypeMain()
#27 0x7f7570dd5dc6 content::ContentMainRunnerImpl::Run()
#28 0x7f7570dd4810 content::ContentMain()
#29 0x000000465991 main
#30 0x7f75683e4f45 __libc_start_main
#31 0x000000465871 <unknown>
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 6 2017

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

commit 840051ec723d7dcacc54b81b8c77957c8ce8dad3
Author: shimazu <shimazu@chromium.org>
Date: Fri Jan 06 05:02:42 2017

ServiceWorker: Stop don't send a message before connection established

Currently a callback passed on the second time is discarded when StopWorker
message is sent twice. This patch fixes it by not calling EWInstance::Stop twice
and not sending the StopWorker message before StartWorker message.

BUG= 674443 
TEST= ./third_party/WebKit/Tools/Scripts/run-webkit-tests  -t Master 'http/tests/serviceworker/chromium/resolve-after-window-close.html' --no-retry-failures --order=random --iterations=100 --exit-after-n-crashes-or-timeouts=1

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

[modify] https://crrev.com/840051ec723d7dcacc54b81b8c77957c8ce8dad3/content/browser/service_worker/embedded_worker_instance.cc
[modify] https://crrev.com/840051ec723d7dcacc54b81b8c77957c8ce8dad3/content/browser/service_worker/embedded_worker_instance.h
[modify] https://crrev.com/840051ec723d7dcacc54b81b8c77957c8ce8dad3/content/browser/service_worker/embedded_worker_instance_unittest.cc
[modify] https://crrev.com/840051ec723d7dcacc54b81b8c77957c8ce8dad3/content/browser/service_worker/service_worker_version.cc
[modify] https://crrev.com/840051ec723d7dcacc54b81b8c77957c8ce8dad3/content/renderer/service_worker/embedded_worker_instance_client_impl.cc
[modify] https://crrev.com/840051ec723d7dcacc54b81b8c77957c8ce8dad3/tools/metrics/histograms/histograms.xml

Mergedinto: 668633
Status: Duplicate (was: Started)
The check failure was fixed by c#1 and flakiness was significantly improved, but it's still flaky with "Terminating renderer for bad IPC message, reason 129". This would be related to Issue 668633.

http://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webkit_tests&tests=http%2Ftests%2Fserviceworker%2Fchromium%2Fresolve-after-window-close.html

Sign in to add a comment