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

Issue 767526 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Handling of unresponsive renderers doesn't consider OOPIFs

Project Member Reported by lukasza@chromium.org, Sep 21 2017

Issue description

Because of OOPIFs a single WebContents can span multiple renderer processes.  When WebContentsObserver::OnRendererUnresponsive is called, it receives an argument pointing out a specific RenderWidgetHost* that is unresponsive.  Unfortunately this information is dropped when forwarding the notification and OnRendererUnresponsive in tab_web_contents_delegate_android.cc is only aware of WebContents* that is unresponsive (i.e. is not aware anymore which widget and/or process *within* WebContents is unresponsive).

The above can lead to killing a wrong/innocent renderer process via HungRendererInfoBarDelegate.  OTOH, maybe killing the whole tab is WAI?  WDYT?  Should the user be able to kill individual renderers instead?

FWIW, I see that Chrome's task manager also overrides WebContentsEntry::OnRendererUnresponsive, but keeps processing it at task manager's task granularity (so hopefully preserving the information which specific renderer is unresponsive).
 

Comment 1 by boliu@chromium.org, Sep 21 2017

Owner: ----
jdduke left chrome years ago..

oopif hasn't shipped on android yet I think? I guess this is a blocker for that.

Fixing this in code is not probably hard, but I think the bigger issueis that there is no ux for killing/reloading just a frame on android. What does desktop do..?
RE: oopif hasn't shipped on android yet I think? I guess this is a blocker for that.

Correct - OOPIFs have not yet shipped on Android.  The first planned Android launch might be isolating SafeBrowsing-click-throughs - this bug is probably not a blocker for this (since we are okay with slightly degraded experience on pages that SafeBrowsing has classified as malicious).


RE: What does desktop do..?

Hmmm... I have tried to check that via:

1. $ out/gn/chrome --user-data-dir=$HOME/.chrome-oopif-unresponsive --site-per-process https://csreis.github.io/tests/cross-site-iframe.html

2. Click "Go cross-site (complex page)"

3. Launch task manager and confirm that there is an OOPIF

4. Try to execute javascript that will make one of the frames unresponsive.  I think I accomplished this with: x = 123; for (;x > 0;) { x = x + 1;}  (scrolling still worked, but clicking on links/buttons didn't).

Unfortunately, whether I tried #4 in the main frame or in the OOPIF, I didn't get any "frame is unresponsive" dialog, so I am not sure if this is something that works on desktop.
Cc: nick@chromium.org
+nick@ for task manager expertise
Hmmm... FWIW, chrome/browser/ui/cocoa/hung_renderer_controller.mm also deals only with the main frame's renderer when working with |hungContents|.
And here: chrome/browser/ui/views/hung_renderer_view.cc
Cc: treib@chromium.org
It seems that HungPagesTableModel::GetRenderProcessHost also deals only with main frames.
Labels: -OS-Android
Summary: Handling of unresponsive renderers doesn't consider OOPIFs (was: OnRendererUnresponsive in tab_web_contents_delegate_android.cc doesn't consider OOPIFs)
Cc: -treib@chromium.org msw@chromium.org

Comment 9 by a...@chromium.org, Dec 7 2017

Cc: a...@chromium.org
I've poked at this area of the code too, so +cc.

The big question is really: what is the Right Thing to do? Once we decide on that, the coding here is pretty straightforward.

Comment 10 by a...@chromium.org, Dec 27 2017

Owner: a...@chromium.org
Status: Assigned (was: Untriaged)
Doc at https://docs.google.com/document/d/1jauDNsrtdrQ88Vb0sJP_WYPrAr5GayshHyWJjzBt0DI/.

Comment 11 by a...@chromium.org, Jan 3 2018

Cc: dtapu...@chromium.org gklassen@chromium.org creis@chromium.org sadrul@chromium.org nasko@chromium.org
 Issue 798551  has been merged into this issue.
Project Member

Comment 12 by bugdroid1@chromium.org, Jan 29 2018

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

commit b3d355f22661b3a566d509e3349bb4642b7b0ed6
Author: Avi Drissman <avi@chromium.org>
Date: Mon Jan 29 20:08:18 2018

OOPIF-ize hung renderers part 1

This modernizes the WebContentsObserver interface.

BUG= 767526 

Change-Id: I55b92fabf7a62cc932124822a91da1ffe2230549
Reviewed-on: https://chromium-review.googlesource.com/889939
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532563}
[modify] https://crrev.com/b3d355f22661b3a566d509e3349bb4642b7b0ed6/chrome/browser/task_manager/providers/web_contents/web_contents_task_provider.cc
[modify] https://crrev.com/b3d355f22661b3a566d509e3349bb4642b7b0ed6/content/browser/web_contents/web_contents_impl.cc
[modify] https://crrev.com/b3d355f22661b3a566d509e3349bb4642b7b0ed6/content/public/browser/web_contents_observer.h

Project Member

Comment 13 by bugdroid1@chromium.org, Jan 31 2018

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

commit 8920def2f6aeb0ee97c9ea73ba5233287af95cc1
Author: Avi Drissman <avi@chromium.org>
Date: Wed Jan 31 19:53:36 2018

OOPIF-ize hung renderers part 2

This modernizes the WebContentsDelegate interface.

BUG= 767526 

Change-Id: Ifac5cccf4798f80ef1abb365c80db75609268002
Reviewed-on: https://chromium-review.googlesource.com/889766
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533366}
[modify] https://crrev.com/8920def2f6aeb0ee97c9ea73ba5233287af95cc1/chrome/browser/ui/browser.cc
[modify] https://crrev.com/8920def2f6aeb0ee97c9ea73ba5233287af95cc1/chrome/browser/ui/browser.h
[modify] https://crrev.com/8920def2f6aeb0ee97c9ea73ba5233287af95cc1/components/web_contents_delegate_android/web_contents_delegate_android.cc
[modify] https://crrev.com/8920def2f6aeb0ee97c9ea73ba5233287af95cc1/components/web_contents_delegate_android/web_contents_delegate_android.h
[modify] https://crrev.com/8920def2f6aeb0ee97c9ea73ba5233287af95cc1/content/browser/devtools/devtools_manager_unittest.cc
[modify] https://crrev.com/8920def2f6aeb0ee97c9ea73ba5233287af95cc1/content/browser/web_contents/web_contents_impl.cc
[modify] https://crrev.com/8920def2f6aeb0ee97c9ea73ba5233287af95cc1/content/public/browser/web_contents_delegate.h
[modify] https://crrev.com/8920def2f6aeb0ee97c9ea73ba5233287af95cc1/content/shell/browser/shell.cc
[modify] https://crrev.com/8920def2f6aeb0ee97c9ea73ba5233287af95cc1/content/shell/browser/shell.h
[modify] https://crrev.com/8920def2f6aeb0ee97c9ea73ba5233287af95cc1/extensions/browser/guest_view/web_view/web_view_guest.cc
[modify] https://crrev.com/8920def2f6aeb0ee97c9ea73ba5233287af95cc1/extensions/browser/guest_view/web_view/web_view_guest.h

Project Member

Comment 14 by bugdroid1@chromium.org, Feb 2 2018

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

commit 1572e8c3cf50ccbc085f5ca0087e92cbf61c8554
Author: Avi Drissman <avi@chromium.org>
Date: Fri Feb 02 19:06:36 2018

OOPIF-ize hung renderers part 2, attempt 2

The embedder needs access to the RenderWidgetHost in order to
fully implement a "hung page" dialog.

BUG= 767526 

Change-Id: I2d699d96d3fef88be17c54422578c14310826851
Reviewed-on: https://chromium-review.googlesource.com/896343
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534113}
[modify] https://crrev.com/1572e8c3cf50ccbc085f5ca0087e92cbf61c8554/chrome/browser/ui/browser.cc
[modify] https://crrev.com/1572e8c3cf50ccbc085f5ca0087e92cbf61c8554/chrome/browser/ui/browser.h
[modify] https://crrev.com/1572e8c3cf50ccbc085f5ca0087e92cbf61c8554/components/web_contents_delegate_android/web_contents_delegate_android.cc
[modify] https://crrev.com/1572e8c3cf50ccbc085f5ca0087e92cbf61c8554/components/web_contents_delegate_android/web_contents_delegate_android.h
[modify] https://crrev.com/1572e8c3cf50ccbc085f5ca0087e92cbf61c8554/content/browser/devtools/devtools_manager_unittest.cc
[modify] https://crrev.com/1572e8c3cf50ccbc085f5ca0087e92cbf61c8554/content/browser/web_contents/web_contents_impl.cc
[modify] https://crrev.com/1572e8c3cf50ccbc085f5ca0087e92cbf61c8554/content/public/browser/web_contents_delegate.h
[modify] https://crrev.com/1572e8c3cf50ccbc085f5ca0087e92cbf61c8554/content/shell/browser/shell.cc
[modify] https://crrev.com/1572e8c3cf50ccbc085f5ca0087e92cbf61c8554/content/shell/browser/shell.h
[modify] https://crrev.com/1572e8c3cf50ccbc085f5ca0087e92cbf61c8554/extensions/browser/guest_view/web_view/web_view_guest.cc
[modify] https://crrev.com/1572e8c3cf50ccbc085f5ca0087e92cbf61c8554/extensions/browser/guest_view/web_view/web_view_guest.h

Comment 15 by msw@chromium.org, Feb 2 2018

Cc: -msw@chromium.org
Project Member

Comment 16 by bugdroid1@chromium.org, Feb 5 2018

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

commit c3666174a0f9911dbcc937e2351ee0606633f597
Author: Avi Drissman <avi@chromium.org>
Date: Mon Feb 05 23:22:07 2018

OOPIF-ize hung renderers part 3

This modernizes the "Hung Page" dialog.

BUG= 767526 

Change-Id: I4831ef1d3d4db92ce92d67f5e7fce34393f0f655
Reviewed-on: https://chromium-review.googlesource.com/897896
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: Sidney San Martín <sdy@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534531}
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/app/generated_resources.grd
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/browser.cc
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/cocoa/OWNERS
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/cocoa/hung_renderer_controller.h
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/cocoa/hung_renderer_controller.mm
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/cocoa/tab_dialogs_cocoa.h
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/cocoa/tab_dialogs_cocoa.mm
[add] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/hung_renderer/OWNERS
[rename] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/hung_renderer/hung_renderer_browsertest.cc
[add] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/hung_renderer/hung_renderer_core.cc
[add] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/hung_renderer/hung_renderer_core.h
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/tab_dialogs.h
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/views/OWNERS
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/views/hung_renderer_view.cc
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/views/hung_renderer_view.h
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/views/hung_renderer_view_browsertest.cc
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/views/tab_dialogs_views.cc
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/browser/ui/views/tab_dialogs_views.h
[modify] https://crrev.com/c3666174a0f9911dbcc937e2351ee0606633f597/chrome/test/BUILD.gn

Comment 17 by a...@chromium.org, Feb 6 2018

Status: Fixed (was: Assigned)

Sign in to add a comment