New issue
Advanced search Search tips

Issue 766442 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 715640



Sign in to add a comment

S13nServiceWorker: Service Worker update logic breaks SW database

Project Member Reported by horo@chromium.org, Sep 19 2017

Issue description

Chrome Version: TOT r502748
OS: Linux

What steps will reproduce the problem?
(1) rm -rf /tmp/test
(2) chrome --user-data-dir=/tmp/test https://horo-t.github.io/serviceworker/demo/simpleblob/
(3) Click "Click this" button to register SW.
(4) Click "test" link => Hello world
(5) Restart Chrome with "--enable-features=NetworkService"
(6) Go https://horo-t.github.io/serviceworker/demo/simpleblob/ and click "test" link => Hello world
(7) Wait more than 1 sec.
(8) Restart Chrome with "--enable-features=NetworkService"
(9) Go https://horo-t.github.io/serviceworker/demo/simpleblob/ and click "test" link.

What is the expected result?
- "Hello world" should be shown

What happens instead?
- 404 error message is shown
- [WARNING:simple_synchronous_entry.cc(1105)] Could not open platform files for entry.

 

Comment 1 by horo@chromium.org, Sep 19 2017

This was caused by c37741f3c09b7e8fbfd80b119165ac2ad883e0f2.
Labels: M-63
ServiceWorkerScriptURLLoader is now actively being implemented ( issue 748415 ) and some of the changes could fix this. I'll closely take a look at this after they are landed.
... and thank you for filing this, horo@ :)

Comment 4 by falken@chromium.org, Sep 29 2017

Blocking: 715640

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

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

Comment 6 by kinuko@chromium.org, Jan 11 2018

Cc: nhiroki@chromium.org
Labels: -Pri-3 -M-63 Pri-2
Owner: ----
Status: Available (was: Assigned)

Comment 7 by falken@chromium.org, Jan 25 2018

Summary: S13nServiceWorker: Service Worker update logic breaks SW database (was: S13nServiceWorker: Service Worker update logic breaks SW databse)
I'm not sure if it's related but I get this flaky crash once in a while when running layout tests:
Thread 18 (crashed)
 0  libc-2.19.so + 0x36c37
    rax = 0x0000000000000000   rdx = 0x0000000000000006
    rcx = 0x00007f721cb7cc37   rbx = 0x00007f72066ff6e0
    rsi = 0x000000000000bfec   rdi = 0x000000000000bfd6
    rbp = 0x00007f72066ff670   rsp = 0x00007f72066ff538
     r8 = 0x0000000000000000    r9 = 0x00000d4111b8cb00
    r10 = 0x0000000000000008   r11 = 0x0000000000000202
    r12 = 0x00007f72066ffbc8   r13 = 0x00007f72066ffbb8
    r14 = 0x00007f72066ffbc0   r15 = 0x00007f72066ff6c9
    rip = 0x00007f721cb7cc37
    Found by: given as instruction pointer in context
 1  libbase.so!logging::LogMessage::~LogMessage() + 0x48c
    rbp = 0x00007f72066ffb10   rsp = 0x00007f72066ff680
    rip = 0x00007f7223e4c1ac
    Found by: previous frame's frame pointer
 2  libcontent.so!content::ServiceWorkerScriptCacheMap::NotifyStartedCaching(GURL const&, long) + 0x29f
    rbx = 0x0000000000000000   rbp = 0x00007f72066ffd10
    rsp = 0x00007f72066ffb20   r12 = 0x00007f72066ffbb8
    r13 = 0x00000d4112004410   r14 = 0x00000d4112024c60
    r15 = 0x00000d411200d6d8   rip = 0x00007f7225353a8f
    Found by: call frame info
 3  libcontent.so!content::ServiceWorkerScriptURLLoader::ServiceWorkerScriptURLLoader(int, int, unsigned int, network::ResourceRequest const&, mojo::InterfacePtr<network::mojom::URLLoaderClient>, scoped_refptr<content::ServiceWorkerVersion>, scoped_refptr<content::URLLoaderFactoryGetter>, net::MutableNetworkTrafficAnnotationTag const&) + 0x9c6
    rbx = 0x0000000000000000   rbp = 0x00007f72066fff80
    rsp = 0x00007f72066ffd20   r12 = 0x0000000000000000
    r13 = 0x0000000000000000   r14 = 0x00000d4112004400
    r15 = 0x00000d4111efd820   rip = 0x00007f7225355336
    Found by: call frame info
 4  libcontent.so!content::ServiceWorkerScriptURLLoaderFactory::CreateLoaderAndStart(mojo::InterfaceRequest<network::mojom::URLLoader>, int, int, unsigned int, network::ResourceRequest const&, mojo::InterfacePtr<network::mojom::URLLoaderClient>, net::MutableNetworkTrafficAnnotationTag const&) + 0x2ea
    rbx = 0x00007f72066fffe0   rbp = 0x00007f7206700180
    rsp = 0x00007f72066fff90   r12 = 0x00000d4112004400
    r13 = 0x00007f72067002a8   r14 = 0x00000d4112004400
    r15 = 0x00000d411200d308   rip = 0x00007f7225357e9a
    Found by: call frame info
 5  libcontent.so!network::mojom::URLLoaderFactoryStubDispatch::Accept(network::mojom::URLLoaderFactory*, mojo::Message*) + 0x3a3
    rbx = 0x00000d4111f888a0   rbp = 0x00007f7206700710
    rsp = 0x00007f7206700190   r12 = 0x00007f72067005b8
    r13 = 0x00007f72067001b8   r14 = 0x00007f7225357bb0
    r15 = 0x00007f7206700218   rip = 0x00007f7224a67763
    Found by: call frame info

Comment 8 by falken@chromium.org, Feb 21 2018

Owner: falken@chromium.org
Status: Started (was: Available)
I'll take a look at this.

Comment 9 by falken@chromium.org, Feb 21 2018

Components: -Internals>Services>Network
Project Member

Comment 10 by bugdroid1@chromium.org, Feb 21 2018

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

commit e41ca8fb381ab55a299c3a4466477dd7bc1bd173
Author: Matt Falkenhagen <falken@chromium.org>
Date: Wed Feb 21 09:25:53 2018

S13nServiceWorker: Fix update logic when the scripts are identical.

The code was accidentally telling ServiceWorkerVersion that the new
script was installed instead of aborting the installation.

R=shimazu

Bug:  766442 
Change-Id: I9683ca3f833a6b511204ce3b2320af48ce7f18fb
Reviewed-on: https://chromium-review.googlesource.com/927967
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538052}
[modify] https://crrev.com/e41ca8fb381ab55a299c3a4466477dd7bc1bd173/content/browser/service_worker/service_worker_script_url_loader.cc
[modify] https://crrev.com/e41ca8fb381ab55a299c3a4466477dd7bc1bd173/content/browser/service_worker/service_worker_script_url_loader_unittest.cc

Labels: M-66
Status: Fixed (was: Started)

Sign in to add a comment