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

Issue 743314 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug

Blocking:
issue 724335
issue 730098



Sign in to add a comment

DCHECK failure when opening blank Chrome with Global Resource Coordinator.

Project Member Reported by ducbui@google.com, Jul 15 2017

Issue description

Chrome Version: 61.0.3159.0 (Developer Build) (64-bit)
Revision: 55981d4d73f3f95808aaa43a5640e34854add031-refs/heads/master@{#486979}
OS: Linux

What steps will reproduce the problem?
(1) Compile chrome with dcheck_always_on = true and is_debug = false from origin/master
(2) Open chrome with GlobalResourceCoordinator enabled *with no url*
$ out/Release/chrome --enable-features=GlobalResourceCoordinator
(3) Click "No thanks" on Get Started Page if opening the first time.

* When running chrome with a url, there is no DCHECK error.
$ out/Release/chrome --enable-features=GlobalResourceCoordinator cnn.com

What is the expected result?
No DCHECK failure.

What happens instead? DCHECK failure with the following trace:
[1:1:0714/220825.595620:FATAL:WebFrameClient.h(198)] Check failed: false.                                                                     

#0 0x55b07bc80e47 base::debug::StackTrace::StackTrace()                
#1 0x55b07bc9a4d1 logging::LogMessage::~LogMessage()                                                                                                                                                                                                                                        
#2 0x55b07eaa49b3 blink::WebFrameClient::GetInterfaceProvider()        
#3 0x55b07e13ddc1 blink::LocalFrame::LocalFrame()                      
#4 0x55b07e13d303 blink::LocalFrame::Create()                          
#5 0x55b07e6cdd78 blink::WebLocalFrameImpl::InitializeCoreFrame()      
#6 0x55b07e6cd7fd blink::WebLocalFrameImpl::CreateMainFrame()          
#7 0x55b07e6f67d3 blink::WebFactoryImpl::CreateMainWebLocalFrameBase() 
#8 0x55b0801ab9a2 blink::WebEmbeddedWorkerImpl::PrepareShadowPageForLoader()
#9 0x55b0801ab883 blink::WebEmbeddedWorkerImpl::StartWorkerContext()   
#10 0x55b07e8aaab4 content::EmbeddedWorkerInstanceClientImpl::StartWorkerContext()
#11 0x55b07e8aa437 content::EmbeddedWorkerInstanceClientImpl::StartWorker()
#12 0x55b07a30b439 content::mojom::EmbeddedWorkerInstanceClientStubDispatch::Accept()
#13 0x55b07c82360c mojo::InterfaceEndpointClient::HandleValidatedMessage()
#14 0x55b07c836036 mojo::FilterChain::Accept()                         
#15 0x55b07c824a1c mojo::InterfaceEndpointClient::HandleIncomingMessage()
#16 0x55b07c82ba61 mojo::internal::MultiplexRouter::ProcessIncomingMessage()
#17 0x55b07c82b295 mojo::internal::MultiplexRouter::Accept()           
#18 0x55b07c836036 mojo::FilterChain::Accept()                                                                                                
#19 0x55b07c82262b mojo::Connector::ReadSingleMessage()                                                                                       
#20 0x55b07c823052 mojo::Connector::ReadAllAvailableMessages()                                                                                
#21 0x55b07c822ecc mojo::Connector::OnHandleReadyInternal()                                                                                   
#22 0x55b07a640bb0 content::(anonymous namespace)::DeferredCallback()                                                                         
#23 0x55b07c838aa2 mojo::SimpleWatcher::OnHandleReady()                
#24 0x55b07b821d68 _ZN4base8internal7InvokerINS0_9BindStateIMN2ui10GpuServiceEFvN3gfx21GenericSharedMemoryIdEiRKN3gpu9SyncTokenEEJNS_7WeakPtrIS4_EES6_iS8_EEEFvvEE7RunImplIRKSC_RKNSt3__15tupleIJSE_S6_iS8_EEEJLm0ELm1ELm2ELm3EEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEE
#25 0x55b07bd2e54b base::debug::TaskAnnotator::RunTask()               
#26 0x55b07e0c1f36 blink::scheduler::TaskQueueManager::ProcessTaskFromWorkQueue()                                                             
#27 0x55b07e0bfbb4 blink::scheduler::TaskQueueManager::DoWork()                                                                               
#28 0x55b07a53f912 _ZN4base8internal7InvokerINS0_9BindStateIMN6policy17AsyncPolicyLoaderEFvbEJNS_7WeakPtrIS4_EEbEEEFvvEE3RunEPNS0_13BindStateBaseE
#29 0x55b07bd2e54b base::debug::TaskAnnotator::RunTask()                                                                                      
#30 0x55b07bca122d base::MessageLoop::RunTask()                                                                                               
#31 0x55b07bca1572 base::MessageLoop::DeferOrRunPendingTask()                                                                                                                                                                                                                               
#32 0x55b07bca1854 base::MessageLoop::DoWork()                                                                                                                                                                                                                                              
#33 0x55b07bca3009 base::MessagePumpDefault::Run()                                                                                            
#34 0x55b07bca0def base::MessageLoop::Run()                            
#35 0x55b07bcca447 base::RunLoop::Run()                                
#36 0x55b07e8a564d content::RendererMain()                             
#37 0x55b07b8e9e8a content::RunZygote()
#38 0x55b07b8ea76b content::RunNamedProcessTypeMain()
#39 0x55b07b8eb0a8 content::ContentMainRunnerImpl::Run()
#40 0x55b07b8f4bf6 service_manager::Main()
#41 0x55b07b8e9b52 content::ContentMain()
#42 0x55b079fed734 ChromeMain
#43 0x7f11ef96bf45 __libc_start_main
#44 0x55b079fed590 <unknown>

 

Comment 1 by l...@chromium.org, Jul 15 2017

Cc: -l...@chromium.org oysteine@chromium.org
Labels: -Pri-3 Pri-1
Owner: l...@chromium.org
Status: Assigned (was: Untriaged)
Thanks, Me and Matt are aware of this issue. The problem is that when a web site is using ServiceWorker, it creates a 'shadow page' which uses ServiceWorker specific WebFrameClient, and those WebFrameClient implementation don't implement GetInterfaceProvider.

For the first step, Matt will disable FrameResourceCoordinator in Blink, and I will work on a real fix. https://chromium-review.googlesource.com/c/569442/

Comment 2 by ducbui@google.com, Jul 16 2017

Description: Show this description

Comment 3 by ducbui@google.com, Jul 17 2017

Description: Show this description
Project Member

Comment 4 by sheriffbot@chromium.org, Jul 17 2017

Labels: Hotlist-Google

Comment 5 by zh...@chromium.org, Jul 17 2017

Blocking: 724335 730098

Comment 6 by zh...@chromium.org, Jul 17 2017

Labels: -Hotlist-Google Hotlist-GRC

Comment 7 by l...@chromium.org, Jul 17 2017

Cc: reillyg@chromium.org kinuko@chromium.org yhirano@chromium.org
Components: Blink>Internals>Frames Internals>Mojo
+kinuko for suggestion.

kinuko@, the main problem here, is that WebEmbeddedWorkerImpl and WebSharedWorkerImpl don't implement GetInterfaceProvider of WebFrameClient, so when we want to create FrameResourceCoordinator in https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/frame/LocalFrame.cpp?l=767, the GetInterfaceProvider will hit NOTREACHED and crash.

This also happens for other WebFrameClient that doesn't implement GetInterfaceProvider, thus we want to identify when we can safely call GetInterfaceProvider. According to reillyg, if GetInterfaceProvider isn't implemented, then we shouldn't call it in the first place.

Any suggestion on identifying those WebFrameClient implementation of ServiceWorker? My basic thought here is to add an API, like IsFake() that returns true for RenderFrame only.
I would suggest IsShadowPage() just to make the intention clear. Am I right kinuko@ that with off-main-thread loading we may be able to get away from having a shadow page?

Comment 9 by dcheng@chromium.org, Jul 18 2017

Cc: dcheng@chromium.org
Project Member

Comment 10 by sheriffbot@chromium.org, Jul 18 2017

Labels: Hotlist-Google
Cc: l...@chromium.org
 Issue 745251  has been merged into this issue.
Project Member

Comment 12 by bugdroid1@chromium.org, Jul 21 2017

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

commit f50732fbe5cc6fff535adbdee0f9066e1dcc61e7
Author: Peiyong Lin <lpy@chromium.org>
Date: Fri Jul 21 01:59:00 2017

Add empty InterfaceProvider for WebFrameClient subclasses.

Currently, only RenderFrame has InterfaceProvider and implements
GetInterfaceProvider, thus when calling GetInterfaceProvider on other
WebFrameClient subclasses, it causes crash on NOTREACHED. This patch
adds empty InterfaceProvider to WebFrameClient subclasses to avoid
crashing.

TBR=scottbyer@chromium.org
BUG= 743314 

Change-Id: I7ea9297c9f30b55f2ad69624e977eee4b3e6c71f
Reviewed-on: https://chromium-review.googlesource.com/576370
Commit-Queue: lpy <lpy@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Tommy Li <tommycli@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488548}
[modify] https://crrev.com/f50732fbe5cc6fff535adbdee0f9066e1dcc61e7/components/plugins/renderer/DEPS
[modify] https://crrev.com/f50732fbe5cc6fff535adbdee0f9066e1dcc61e7/components/plugins/renderer/webview_plugin.cc
[modify] https://crrev.com/f50732fbe5cc6fff535adbdee0f9066e1dcc61e7/components/plugins/renderer/webview_plugin.h
[modify] https://crrev.com/f50732fbe5cc6fff535adbdee0f9066e1dcc61e7/components/printing/renderer/DEPS
[modify] https://crrev.com/f50732fbe5cc6fff535adbdee0f9066e1dcc61e7/components/printing/renderer/print_web_view_helper.cc
[modify] https://crrev.com/f50732fbe5cc6fff535adbdee0f9066e1dcc61e7/third_party/WebKit/Source/core/exported/WebSharedWorkerImpl.cpp
[modify] https://crrev.com/f50732fbe5cc6fff535adbdee0f9066e1dcc61e7/third_party/WebKit/Source/core/exported/WebSharedWorkerImpl.h
[modify] https://crrev.com/f50732fbe5cc6fff535adbdee0f9066e1dcc61e7/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/f50732fbe5cc6fff535adbdee0f9066e1dcc61e7/third_party/WebKit/Source/core/frame/LocalFrame.h
[modify] https://crrev.com/f50732fbe5cc6fff535adbdee0f9066e1dcc61e7/third_party/WebKit/Source/modules/exported/WebEmbeddedWorkerImpl.cpp
[modify] https://crrev.com/f50732fbe5cc6fff535adbdee0f9066e1dcc61e7/third_party/WebKit/Source/modules/exported/WebEmbeddedWorkerImpl.h
[modify] https://crrev.com/f50732fbe5cc6fff535adbdee0f9066e1dcc61e7/third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.cpp

Comment 13 by l...@chromium.org, Aug 8 2017

Status: Fixed (was: Assigned)
Project Member

Comment 14 by bugdroid1@chromium.org, Oct 4 2017

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

commit 5c750d1d80a4cafd1a137080cbabdd21a1f9aa68
Author: Peiyong Lin <lpy@chromium.org>
Date: Wed Oct 04 03:24:04 2017

Add static empty InterfaceProvider to WebFrameClient.

There are some tests using WebFrameClient directly, which results in crash when
GetInterfaceProvider is called. To do it more comprehensively, in this patch we
add an empty InterfaceProvider to WebFrameClient itself and make sure it's bound
correctly when GetInterfaceProvider is called. And also remove
GetInterfaceProvider overrides that implement an empty InterfaceProvider.

TBR=scottbyer@chromium.org, tommycli@chromium.org
BUG= 743314 

Change-Id: I445a5f3100f6e949d161b30e248d67a4b948ea8c
Reviewed-on: https://chromium-review.googlesource.com/691059
Commit-Queue: lpy <lpy@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506290}
[modify] https://crrev.com/5c750d1d80a4cafd1a137080cbabdd21a1f9aa68/components/plugins/renderer/webview_plugin.cc
[modify] https://crrev.com/5c750d1d80a4cafd1a137080cbabdd21a1f9aa68/components/plugins/renderer/webview_plugin.h
[modify] https://crrev.com/5c750d1d80a4cafd1a137080cbabdd21a1f9aa68/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/5c750d1d80a4cafd1a137080cbabdd21a1f9aa68/third_party/WebKit/Source/core/exported/BUILD.gn
[add] https://crrev.com/5c750d1d80a4cafd1a137080cbabdd21a1f9aa68/third_party/WebKit/Source/core/exported/WebFrameClient.cpp
[modify] https://crrev.com/5c750d1d80a4cafd1a137080cbabdd21a1f9aa68/third_party/WebKit/Source/core/exported/WorkerShadowPage.cpp
[modify] https://crrev.com/5c750d1d80a4cafd1a137080cbabdd21a1f9aa68/third_party/WebKit/Source/core/exported/WorkerShadowPage.h
[modify] https://crrev.com/5c750d1d80a4cafd1a137080cbabdd21a1f9aa68/third_party/WebKit/public/web/DEPS
[modify] https://crrev.com/5c750d1d80a4cafd1a137080cbabdd21a1f9aa68/third_party/WebKit/public/web/WebFrameClient.h

Sign in to add a comment