FATAL:service_worker_provider_host.cc(286)] Check failed: ServiceWorkerUtils::ScopeMatches( registration->pattern(), document_url_) |
||||||||||||||||||||||
Issue descriptionVersion: 54.0.2817.0 (Developer Build) (64-bit) with dcheck_always_on=1 OS: Linux What steps will reproduce the problem? (1) open inbox.google.com (2) auth credential timed out(?),so prompt ServiceLogin page (3) What is the expected output? What do you see instead? browser crashed with [8833:8881:0804/132228:FATAL:service_worker_provider_host.cc(286)] Check failed: ServiceWorkerUtils::ScopeMatches( registration->pattern(), document_url_). Program received signal SIGABRT, Aborted. [Switching to Thread 0x7fffd578e700 (LWP 8881)] 0x00007fffeea2fc37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007fffeea2fc37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007fffeea33028 in __GI_abort () at abort.c:89 #2 0x00007ffff7a79a92 in base::debug::BreakDebugger() () from /usr/local/google/home/ukai/src/chromium-git/src/out.0/Release/./libbase .so #3 0x000000000000009d in ?? () #4 0x00007ffff7a9caaa in logging::LogMessage::~LogMessage() () from /usr/local/google/home/ukai/src/chromium-git/src/out.0/Release/./libbase .so #5 0xec55b241f2700500 in ?? () #6 0x00003a2dc751f258 in ?? () #7 0x00003a2dc3816230 in ?? () #8 0x00007ffff7b0b3cb in base::ThreadCheckerImpl::CalledOnValidThread() const () from /usr/local/google/home/ukai/src/chromium-git/src/out.0/Release/./libbase .so #9 0x2f343038303a3138 in ?? () #10 0x463a383232323331 in ?? () #11 0x7265733a4c415441 in ?? () #12 0x726f775f65636976 in ?? () #13 0x766f72705f72656b in ?? () #14 0x736f685f72656469 in ?? () #15 0x3638322863632e74 in ?? () #16 0x6b63656843205d29 in ?? () #17 0x3a64656c69616620 in ?? () #18 0x6563697672655320 in ?? () #19 0x745572656b726f57 in ?? () #20 0x6f63533a3a736c69 in ?? () #21 0x65686374614d6570 in ?? () #22 0x7369676572202873 in ?? () #23 0x2d6e6f6974617274 in ?? () #24 0x6e7265747461703e in ?? () #25 0x75636f64202c2928 in ?? () #26 0x6c72755f746e656d in ?? () #27 0x00007f0a202e295f in ?? () #28 0x00007fffd5780009 in ?? () #29 0x00003a2dd391c1f8 in ?? () #30 0x0000000000000000 in ?? () Please use labels and text to provide additional information. https://chromium.googlesource.com/chromium/src/+/71a34b78703ad8bfefbd8c54ea78414e8cda7eca ?
,
Aug 8 2016
I'll take over this issue from nhiroki@.
,
Aug 8 2016
Thank you! ServiceWorkerProviderHost::AddMatchingRegistration() is called from... 1) ServiceWorkerRegisterJob::AddRegistrationToMatchingProviderHosts, 2) ServiceWorkerProviderHost::AddAllMatchingRegistrations(), and 3) ServiceWorkerProviderHost::AssociateRegistration() 1) and 2) make sure the scope matching before calling AddMatchingRegistration(), so the precondition seems to be broken somewhere on the callpath of 3).
,
Aug 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f6c9b6f8d1880e0746a1e7cd1712d8c541264cdd commit f6c9b6f8d1880e0746a1e7cd1712d8c541264cdd Author: shimazu <shimazu@chromium.org> Date: Tue Aug 09 11:09:08 2016 ServiceWorker: DCHECK is changed to CHECK to track the failure This patch is to figure the cause of failure out by the crash dashboard. BUG= 634222 Review-Url: https://codereview.chromium.org/2223413002 Cr-Commit-Position: refs/heads/master@{#410630} [modify] https://crrev.com/f6c9b6f8d1880e0746a1e7cd1712d8c541264cdd/content/browser/service_worker/service_worker_provider_host.cc
,
Aug 11 2016
Issue 636374 has been merged into this issue.
,
Aug 11 2016
Users experienced this crash on the following builds: Win Canary 54.0.2825.0 - 5.57 CPM, 59 reports, 53 clients (signature content::ServiceWorkerProviderHost::AddMatchingRegistration) Mac Canary 54.0.2825.0 - 4.58 CPM, 16 reports, 15 clients (signature content::ServiceWorkerProviderHost::AddMatchingRegistration) If this update was incorrect, please add "Fracas-Wrong" label to prevent future updates. - Go/Fracas
,
Aug 11 2016
This crash has high impact on Chrome's stability. Signature: content::ServiceWorkerProviderHost::AddMatchingRegistration. Channel: canary. Platform: win. Labeling issue 634222 with ReleaseBlock-Dev. If this update was incorrect, please add "Fracas-Wrong" label to prevent future updates. - Go/Fracas
,
Aug 12 2016
This crash happens around [1]. I investigate around there. 1) [1] is called in ServiceWorkerProviderHost::ClaimedByRegistration ([2] SWRegistration.cc, l.207) This means host->MatchRegistration() is equal to 'this'. 2) [1] is executed in ClaimedByRegistration ([3]: SWProviderHost.cc, l.431) This means registration (which is 'this') is different from |associated_registration_| in the ServiceWorkerProviderHost. If my understanding is correct, this is the case when SWProviderHost::DisassociateRegistration() is called but SWProviderHost::AssociateRegistration is not called. 3) In this situation, registration.pattern() and document_url doesn't match, then CHECK makes crash. I'm still not sure why document_url_ and registration.pattern doesn't match, but as ukai-san says 'so prompt ServiceLogin page', I suspect that a combination of claim and redirection causes the error. ex) redirect from another page (in scope of another serviceworker?) -> install and claim() though the provider has the previous information but actually this doesn't happen because PrepareForMainResource after redirect set the correct information... [1]: https://crash.corp.google.com/browse?q=product.name%3D%27Chrome%27%20AND%20product.version%3E%3D%2754.0%27%20AND%20custom_data.ChromeCrashProto.magic_signature_1.name%3D%27content%3A%3AServiceWorkerProviderHost%3A%3AAddMatchingRegistration%27%20AND%20crash.Reason%3D%27EXCEPTION_ACCESS_VIOLATION_WRITE%27%20AND%20clientid%3D%27b0f72531-7898-4dc1-baf2-7e662de5aab7%27%20OMIT%20RECORD%20IF%20SUM(CrashedStackTrace.StackFrame.FunctionName%3D%27content%3A%3AServiceWorkerProviderHost%3A%3AAddMatchingRegistration(content%3A%3AServiceWorkerRegistration%20*)%27)%20%3D%200%20OR%20SUM(CrashedStackTrace.StackFrame.SourceFileName%3D%27c%3A%5C%5Cb%5C%5Cbuild%5C%5Cslave%5C%5Cwin64-pgo%5C%5Cbuild%5C%5Csrc%5C%5Ccontent%5C%5Cbrowser%5C%5Cservice_worker%5C%5Cservice_worker_provider_host.cc%27)%20%3D%200%20OR%20SUM(CrashedStackTrace.StackFrame.FunctionName%3D%27content%3A%3AServiceWorkerProviderHost%3A%3AAddMatchingRegistration(content%3A%3AServiceWorkerRegistration%20*)%27)%20%3D%200%20OR%20SUM(CrashedStackTrace.StackFrame.FunctionName%3D%27content%3A%3AServiceWorkerRegistration%3A%3AClaimClients()%27)%20%3D%200%20OR%20SUM(CrashedStackTrace.StackFrame.FunctionName%3D%27content%3A%3AServiceWorkerProviderHost%3A%3AAddMatchingRegistration(content%3A%3AServiceWorkerRegistration%20*)%27)%20%3D%200%20OR%20SUM(CrashedStackTrace.StackFrame.FunctionName%3D%27content%3A%3AServiceWorkerRegistration%3A%3AClaimClients()%27)%20%3D%200%20OR%20SUM(CrashedStackTrace.StackFrame.FunctionName%3D%27content%3A%3AServiceWorkerVersion%3A%3AOnClaimClients(int)%27)%20%3D%200%20OR%20SUM(CrashedStackTrace.StackFrame.FunctionName%3D%27content%3A%3AServiceWorkerProviderHost%3A%3AAddMatchingRegistration(content%3A%3AServiceWorkerRegistration%20*)%27)%20%3D%200%20OR%20SUM(CrashedStackTrace.StackFrame.FunctionName%3D%27content%3A%3AServiceWorkerProviderHost%3A%3AAddMatchingRegistration(content%3A%3AServiceWorkerRegistration%20*)%27)%20%3D%200&ignore_case=false&enable_rewrite=false&omit_field_name=&omit_field_value=&omit_field_opt=&stbtiq=&reportid=f8a96c4100000000&index=0#4 [2]: https://cs.chromium.org/chromium/src/content/browser/service_worker/service_worker_provider_host.cc?q=ClaimedByRegistration&sq=package:chromium&l=423&dr=CSs [3]: https://cs.chromium.org/chromium/src/content/browser/service_worker/service_worker_provider_host.cc?q=ClaimedByRegistration&sq=package:chromium&dr=CSs&l=431
,
Aug 15 2016
I'm trying to add similar debugging keys to Issue 619294 . Talking with nhiroki@, this crash might be related to Issue 619294 : 1. claim() is called, but previously it's not crashed when registration.pattern() != document_url_. 2. After claim is done, unregister is executed and fails on OnUnregisterServiceWorker.
,
Aug 15 2016
A merged bug affects OS-Android so adding it here.
,
Aug 16 2016
I'm creating a new layout test: https://crrev.com/2245063003 This problem hasn't been reproduced yet. (update process doesn't seem to happen?) I'll update the test tomorrow.
,
Aug 16 2016
Link to Builds on which the crash is seen: 54.0.2830.0 1.33% 11 54.0.2829.1 1.09% 9 54.0.2829.0 22.68% 188 54.0.2828.0 9.89% 82 54.0.2827.0 16.41% 136 54.0.2826.1 1.21% 10 54.0.2826.0 18.94% 157 54.0.2825.0 22.44% 186 M54 regression issue started in 54.0.2825.0 Going with RB-Dev as this is introduced after last week's Dev release [54.0.2824.0] shimazu@, please have the fix ready by Wednesday 5 PM PST as this is blocking Dev's release which got re-scheduled to this Thursday [8/18]. Link to Builds on which this crash is seen: https://crash.corp.google.com/browse?q=product.name%3D%27Chrome%27%20AND%20custom_data.ChromeCrashProto.ptype%3D%27browser%27%20AND%20custom_data.ChromeCrashProto.magic_signature_1.name%3D%27content%3A%3AServiceWorkerProviderHost%3A%3AAddMatchingRegistration%27&ignore_case=false&enable_rewrite=true&omit_field_name=&omit_field_value=&omit_field_opt=%3D
,
Aug 17 2016
This problem could be reproduced by https://crrev.com/2245063003 . (updated the test) The scenario was: 1. Access to a in-scope page 2. A registered service worker gets started, and return a redirect response 3. Redirect to out-of-scope page 4. New service worker is installed by update procedure, and it calls skipWaiting and claim 5. On claiming, the origin of the registration is the same with the in-scope page accessed at step 1, but provide_host has a document_url set at step 3 (out-of-scope page), so ScopeMatch fails To fix them, we have to clear the state of a provider_host when redirecting. This might be similar to SWRequestHandler::PrepareForCrossSiteTransfer[1]. I'll investigate the procedure more. [1]: https://cs.chromium.org/chromium/src/content/browser/service_worker/service_worker_request_handler.cc?sq=package:chromium&rcl=1471375518&l=159
,
Aug 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8ec4b9245178dfe3761af5fd09da53488d46f356 commit 8ec4b9245178dfe3761af5fd09da53488d46f356 Author: shimazu <shimazu@chromium.org> Date: Wed Aug 17 04:07:17 2016 ServiceWorker: Restore CHECK to DCHECK Enough information has been gathered for debugging, so it's restored. BUG= 634222 R=nhiroki Review-Url: https://codereview.chromium.org/2256513003 Cr-Commit-Position: refs/heads/master@{#412446} [modify] https://crrev.com/8ec4b9245178dfe3761af5fd09da53488d46f356/content/browser/service_worker/service_worker_provider_host.cc
,
Aug 17 2016
I'm now checking if |matching_registrations_| is correctly stored. I was guessing it contained all live registrations whose scopes are matching with the document_url, but it had only one matching registration though I registered three registrations whose scopes were like 'scope', 'scope1', 'scope12'. Hense, I'm now suspecting this mechanism might be broken. I'll consider about the structure tmrw.
,
Aug 19 2016
,
Aug 19 2016
,
Aug 19 2016
Since the CHECK has been converted back to a DCHECK I don't think this needs to block dev anymore. Next time you'd like to enable a CHECK, if you could ping someone from the release team (myself, bustamante@) to coordinate (to avoid landing right before a dev push or a branch or something) it would be appreciated.
,
Aug 22 2016
Issue 639443 has been merged into this issue.
,
Aug 23 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/90ac0459a2f02d2eaae991314f9b540f9fa97f4a commit 90ac0459a2f02d2eaae991314f9b540f9fa97f4a Author: shimazu <shimazu@chromium.org> Date: Tue Aug 23 07:03:39 2016 ServiceWorker: Call SyncMatchingRegistration when document_url is changed For details: https://crbug.com/634222 BUG= 634222 , 619294 , 454250 Review-Url: https://codereview.chromium.org/2245063003 Cr-Commit-Position: refs/heads/master@{#413682} [modify] https://crrev.com/90ac0459a2f02d2eaae991314f9b540f9fa97f4a/content/browser/service_worker/service_worker_provider_host.cc [modify] https://crrev.com/90ac0459a2f02d2eaae991314f9b540f9fa97f4a/content/browser/service_worker/service_worker_provider_host.h [modify] https://crrev.com/90ac0459a2f02d2eaae991314f9b540f9fa97f4a/content/browser/service_worker/service_worker_provider_host_unittest.cc [modify] https://crrev.com/90ac0459a2f02d2eaae991314f9b540f9fa97f4a/content/browser/service_worker/service_worker_request_handler.cc [add] https://crrev.com/90ac0459a2f02d2eaae991314f9b540f9fa97f4a/third_party/WebKit/LayoutTests/http/tests/serviceworker/claim-with-redirect.html [add] https://crrev.com/90ac0459a2f02d2eaae991314f9b540f9fa97f4a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-with-redirect-iframe.html [add] https://crrev.com/90ac0459a2f02d2eaae991314f9b540f9fa97f4a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/update-claim-worker.php
,
Aug 29 2016
Issue 619294 has been merged into this issue.
,
Aug 29 2016
As the following dashboard shows, no SW-related crash happened after my patch has been landed (after 54.0.2838)! :) https://crash.corp.google.com/browse?q=product.name%3D%27Chrome%27%20AND%20SUBSTR(product.Version%2C%206%2C%204)%20%3E%3D%20%272838%27%20AND%20(custom_data.ChromeCrashProto.magic_signature_1.file_path%20CONTAINS%20%27serviceworker%27%20OR%20custom_data.ChromeCrashProto.magic_signature_1.file_path%20CONTAINS%20%27service_worker%27)&ignore_case=false&enable_rewrite=true&omit_field_name=&omit_field_value=&omit_field_opt=
,
Aug 29 2016
This fix improves SW stability; this patch will solve the second crasher at the following dashboard. I'd like to merge this into M53 (beta). https://crash.corp.google.com/browse?q=product.name%3D%27Chrome%27%20AND%20SUBSTR(product.Version%2C%201%2C%202)%20%3E%3D%20%2752%27%20AND%20(custom_data.ChromeCrashProto.magic_signature_1.file_path%20CONTAINS%20%27serviceworker%27%20OR%20custom_data.ChromeCrashProto.magic_signature_1.file_path%20CONTAINS%20%27service_worker%27)&ignore_case=false&enable_rewrite=true&omit_field_name=&omit_field_value=&omit_field_opt=
,
Aug 29 2016
[Automated comment] Less than 2 weeks to go before stable on M53, manual review required.
,
Aug 29 2016
I'd like to merge it into stable because this will solve a big crash cause: Issue 619294 . For my four days observation, this won't have any regression, and this will not cause other regression I think, but actually I want to have a bit more time to merge to be sure this definitely doesn't have no regression.
,
Aug 29 2016
Ok, sounds good. It will miss First Desktop Stable candidate cut. We can pick it up for next Stable cut if all looks good. Thank you.
,
Aug 29 2016
We're cutting our Chrome for Android stable candidate tomorrow night; if you want this change included, please merge - approved for branch 2785.
,
Aug 30 2016
I chatted with govind@ yesterday and decided to wait for the next Dev (will be released today?) which includes my fix. After that, I'll observe the crash dashboard until this Thursday JST to confirm it won't cause any other regression. Could you approve again after my report of the observation?
,
Aug 30 2016
+ amineer@, PTAL comment #29 please.
,
Aug 30 2016
No reason not to just leave the approval, please remove it if you find crashes, otherwise merge if no crashes.
,
Sep 1 2016
,
Sep 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/afb2f14ceb5456b460770434f19ea690430b8a68 commit afb2f14ceb5456b460770434f19ea690430b8a68 Author: shimazu <shimazu@chromium.org> Date: Thu Sep 01 02:39:26 2016 ServiceWorker: Enable CHECK to confirm crash doesn't happen This patch is to confirm crashes are gone. BUG= 634222 Review-Url: https://codereview.chromium.org/2288613002 Cr-Commit-Position: refs/heads/master@{#415859} [modify] https://crrev.com/afb2f14ceb5456b460770434f19ea690430b8a68/content/browser/service_worker/service_worker_provider_host.cc
,
Sep 1 2016
Users experienced this crash on the following builds: Android Beta 53.0.2785.80 - 0.51 CPM, 49 reports, 49 clients (signature [Renderer kill 54] content::ServiceWorkerDispatcherHost::OnUnregisterServiceWorker) If this update was incorrect, please add "Fracas-Wrong" label to prevent future updates. - Go/Fracas
,
Sep 2 2016
,
Sep 2 2016
I could confirm the patch didn't break anything and solved the problems, so I'm trying to merge. I'm requesting a credential of chromium-commiters group for gerrit: Issue 643502 . Just a moment...
,
Sep 2 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7bf12b246a2546fe2b9386df0f7893617a0eb64f commit 7bf12b246a2546fe2b9386df0f7893617a0eb64f Author: Matt Falkenhagen <falken@chromium.org> Date: Fri Sep 02 05:28:34 2016 [M53] ServiceWorker: Call SyncMatchingRegistration when document_url is changed Committing on behalf of shimazu@. For details: https://crbug.com/634222 BUG= 634222 , 619294 , 454250 Review-Url: https://codereview.chromium.org/2245063003 Cr-Commit-Position: refs/heads/master@{#413682} (cherry picked from commit 90ac0459a2f02d2eaae991314f9b540f9fa97f4a) Review URL: https://codereview.chromium.org/2300293002 . Cr-Commit-Position: refs/branch-heads/2785@{#809} Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382} [modify] https://crrev.com/7bf12b246a2546fe2b9386df0f7893617a0eb64f/content/browser/service_worker/service_worker_provider_host.cc [modify] https://crrev.com/7bf12b246a2546fe2b9386df0f7893617a0eb64f/content/browser/service_worker/service_worker_provider_host.h [modify] https://crrev.com/7bf12b246a2546fe2b9386df0f7893617a0eb64f/content/browser/service_worker/service_worker_provider_host_unittest.cc [modify] https://crrev.com/7bf12b246a2546fe2b9386df0f7893617a0eb64f/content/browser/service_worker/service_worker_request_handler.cc [add] https://crrev.com/7bf12b246a2546fe2b9386df0f7893617a0eb64f/third_party/WebKit/LayoutTests/http/tests/serviceworker/claim-with-redirect.html [add] https://crrev.com/7bf12b246a2546fe2b9386df0f7893617a0eb64f/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-with-redirect-iframe.html [add] https://crrev.com/7bf12b246a2546fe2b9386df0f7893617a0eb64f/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/update-claim-worker.php
,
Sep 5 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4b6d694efc24392d1516551abfc1098dd6d97bc8 commit 4b6d694efc24392d1516551abfc1098dd6d97bc8 Author: shimazu <shimazu@chromium.org> Date: Mon Sep 05 07:20:45 2016 ServiceWorker: Disable CHECK for debug Removes temporary CHECK added at https://crrev.com/2288613002 BUG= 634222 Review-Url: https://codereview.chromium.org/2313543002 Cr-Commit-Position: refs/heads/master@{#416512} [modify] https://crrev.com/4b6d694efc24392d1516551abfc1098dd6d97bc8/content/browser/service_worker/service_worker_provider_host.cc
,
Sep 5 2016
,
Sep 7 2016
This crash no more seen after chrome version 54.0.2831.0 and not seen in any of the M53 builds. 54.0.2831.0 19.56% 283 54.0.2830.1 1.80% 26 54.0.2830.0 14.03% 203 54.0.2829.2 0.28% 4 54.0.2829.1 0.83% 12 54.0.2829.0 17.62% 255 54.0.2828.1 0.41% 6 54.0.2828.0 6.36% 92 54.0.2827.1 0.35% 5 54.0.2827.0 10.44% 151 54.0.2826.1 0.83% 12 54.0.2826.0 12.02% 174 54.0.2825.1 0.35% 5 54.0.2825.0 13.68% 198 52.0.2743.116 0.21% 3 51.0.2704.103 0.07% 1 51.0.2704.84 0.07% 1 51.0.2704.79 0.07% 1 50.0.2661.102 0.83% 12 49.0.2623.112 0.21% 3 Link to the builds: https://crash.corp.google.com/browse?q=product.name%3D%27Chrome%27%20AND%20custom_data.ChromeCrashProto.ptype%3D%27browser%27%20AND%20custom_data.ChromeCrashProto.magic_signature_1.name%3D%27content%3A%3AServiceWorkerProviderHost%3A%3AAddMatchingRegistration%27&ignore_case=false&enable_rewrite=true&omit_field_name=&omit_field_value=&omit_field_opt=%3D#samplereports:5,productversion:1000 Hence adding TE-Verified labels
,
Sep 7 2016
NOTE : Will be monitoring the fix in chrome version 53.0.2785.101 for some more time and accordingly add TE-Verified-M53 label.
,
Mar 1 2017
|
||||||||||||||||||||||
►
Sign in to add a comment |
||||||||||||||||||||||
Comment 1 by nhiroki@chromium.org
, Aug 5 2016Components: -Platform>Apps>ServiceWorker Blink>ServiceWorker
Labels: -Pri-3 Restrict-View-EditIssue Pri-1
Owner: nhiroki@chromium.org
Status: Assigned (was: Untriaged)