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

Issue 767916 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug
Proj-Servicification

Blocking:
issue 748415



Sign in to add a comment

Network service + service worker: DCHECK in service_worker_script_url_loader

Project Member Reported by yzshen@chromium.org, Sep 22 2017

Issue description

This is causing flakiness of the following layout test:

http/tests/background_fetch/background-fetch-manager-get.https.html

Please see https://chromium-swarm.appspot.com/task?id=38c33153bbd11510&refresh=10&show_raw=1

Call stack:
09:18:02.962 29175   [31326:31441:0922/091802.649481:5737959404:FATAL:service_worker_script_url_loader.cc(47)] Check failed: ServiceWorkerVersion::NEW == version->status() (0 vs. 4)
09:18:02.962 29175   #0 0x000001cdc037 base::debug::StackTrace::StackTrace()
09:18:02.962 29175   #1 0x000001cf3331 logging::LogMessage::~LogMessage()
09:18:02.962 29175   #2 0x0000019f8999 content::ServiceWorkerScriptURLLoader::ServiceWorkerScriptURLLoader()
09:18:02.963 29175   #3 0x0000019fb323 _ZN4base10MakeUniqueIN7content28ServiceWorkerScriptURLLoaderEJRiS3_RjRKNS1_15ResourceRequestEN4mojo12InterfacePtrINS1_5mojom15URLLoaderClientEEEPNS1_20ServiceWorkerVersionER13scoped_refptrINS1_22URLLoaderFactoryGetterEERKN3net34MutableNetworkTrafficAnnotationTagEEEEDTclsr3stdE11make_uniqueIT_Espclsr3stdE7forwardIT0_Efp_EEEDpOSO_
09:18:02.963 29175   #4 0x0000019faf71 content::ServiceWorkerScriptURLLoaderFactory::CreateLoaderAndStart()
09:18:02.963 29175   #5 0x0000004a1f4a content::mojom::URLLoaderFactoryStubDispatch::Accept()
09:18:02.963 29175   #6 0x000001ebcfcf mojo::InterfaceEndpointClient::HandleValidatedMessage()
09:18:02.963 29175   #7 0x000001ed27f6 mojo::FilterChain::Accept()
09:18:02.963 29175   #8 0x000001ebe37c mojo::InterfaceEndpointClient::HandleIncomingMessage()
09:18:02.963 29175   #9 0x000001ee53e1 IPC::(anonymous namespace)::ChannelAssociatedGroupController::Accept()
09:18:02.963 29175   #10 0x000001ed27f6 mojo::FilterChain::Accept()
09:18:02.963 29175   #11 0x000001ebbf21 mojo::Connector::ReadSingleMessage()
09:18:02.963 29175   #12 0x000001ebc942 mojo::Connector::ReadAllAvailableMessages()
09:18:02.963 29175   #13 0x000001ebc7bc mojo::Connector::OnHandleReadyInternal()
09:18:02.963 29175   #14 0x00000094b170 mojo::SimpleWatcher::DiscardReadyState()
09:18:02.963 29175   #15 0x000001ed7602 mojo::SimpleWatcher::OnHandleReady()
09:18:02.963 29175   #16 0x000001ed7aca _ZN4base8internal7InvokerINS0_9BindStateIMN4mojo13SimpleWatcherEFvijRKNS3_18HandleSignalsStateEEJNS_7WeakPtrIS4_EEijS5_EEEFvvEE7RunImplIRKS9_RKNSt3__15tupleIJSB_ijS5_EEEJLm0ELm1ELm2ELm3EEEEvOT_OT0_NSI_16integer_sequenceImJXspT1_EEEE
09:18:02.963 29175   #17 0x000001cdc777 base::debug::TaskAnnotator::RunTask()
09:18:02.963 29175   #18 0x000001d7f590 base::internal::IncomingTaskQueue::RunTask()
09:18:02.963 29175   #19 0x000001cf9b57 base::MessageLoop::RunTask()
09:18:02.963 29175   #20 0x000001cfa19a base::MessageLoop::DoWork()
09:18:02.963 29175   #21 0x000001cfd169 base::MessagePumpLibevent::Run()
09:18:02.963 29175   #22 0x000001cf95fa base::MessageLoop::Run()
09:18:02.963 29175   #23 0x000001d1acc6 base::RunLoop::Run()
09:18:02.963 29175   #24 0x000001d4235c base::Thread::Run()
09:18:02.963 29175   #25 0x00000162d096 content::BrowserThreadImpl::IOThreadRun()
09:18:02.963 29175   #26 0x00000162d254 content::BrowserThreadImpl::Run()
09:18:02.963 29175   #27 0x000001d42902 base::Thread::ThreadMain()
09:18:02.963 29175   #28 0x000001d3b0ec base::(anonymous namespace)::ThreadFunc()
09:18:02.963 29175   #29 0x7ff4406a0184 start_thread
09:18:02.963 29175   #30 0x7ff43bdadffd clone
 

Comment 1 by falken@chromium.org, Sep 25 2017

Blocking: 748415
Cc: -nhiroki@chromium.org
Owner: nhiroki@chromium.org
Status: Started (was: Untriaged)
nhiroki is working on this at https://chromium-review.googlesource.com/c/chromium/src/+/674143
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 26 2017

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

commit 81f3a6b9554d7f31aefb68c747a72b407a9ca922
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Tue Sep 26 03:49:20 2017

S13nServiceWorker: Re-enable ServiceWorkerVersionBrowserTests on Mojo FYI bots

These tests were disabled by [1] because [2] introduced a stricter check
for ServiceWorkerVersion::status_ (status_ == NEW) and failed them. We found
this check is wrong because ServiceWorkerScriptURLLoader is also used for
importScripts() that can be called during the Install event (status_ ==
INSTALLING).

This CL makes ServiceWorkerScriptURLLoaderFactory determines whether to use
ServiceWorkerScriptURLLoader more precisely, and changes the check in the ctor
of ServiceWorkerScriptURLLoader based on that.

This CL also corrects the timings to update the service worker status in the
browser tests to avoid the check failure.

[1] https://chromium-review.googlesource.com/c/664845/
[2] https://chromium-review.googlesource.com/c/662957/

Bug:  748415 ,  765064 ,  767916 
Change-Id: Id7786510170129514058e6f5c5d4bd1860b4be1b
Reviewed-on: https://chromium-review.googlesource.com/674143
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504277}
[modify] https://crrev.com/81f3a6b9554d7f31aefb68c747a72b407a9ca922/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/81f3a6b9554d7f31aefb68c747a72b407a9ca922/content/browser/service_worker/service_worker_script_url_loader.cc
[modify] https://crrev.com/81f3a6b9554d7f31aefb68c747a72b407a9ca922/content/browser/service_worker/service_worker_script_url_loader_factory.cc
[modify] https://crrev.com/81f3a6b9554d7f31aefb68c747a72b407a9ca922/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter

Status: Fixed (was: Started)
The DCHECK failure was fixed but the test is still flaky. It looks like there is another reason. Let me close this and file a separate issue for the flakiness if necessary.
Labels: M-63

Comment 6 by laforge@google.com, Nov 7 2017

Components: -Internals>Network>Service Internals>Services>Network
Apologies, applied the wrong component in bulk.

Sign in to add a comment