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

Issue 598400 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 586905



Sign in to add a comment

Notify browser about intentional GPU process termination for 'exit_on_context_lost' workaround

Project Member Reported by siev...@chromium.org, Mar 28 2016

Issue description

Sometimes we intentionally kill the GPU process (the workaround is enabled on Windows and Android) when there was a lost context through robustness i.e. GPU reset.

The distinction between this and another intentional shutdown is not clear to the browser. (On Android it is, or it doesn't matter, since we only have the notion of the app having been or having not been in the foreground, and the former is a crash for all we care and the latter is not.)

I tried to bypass 3d api blocking for normal shutdown as seen by the browser in https://codereview.chromium.org/1749263003/.
However in https://codereview.chromium.org/1747283003/ I noticed this is flaky depending on the platform, since although we also have another context-specific api blocking codepath (see GpuProcessHost::DidLoseContext), it's not clear which context will see the gpu reset first and initiate the shutdown (and with 'exit_on_context_lost' we only see DidLostContext once).

I'm wondering if the #ifdef Android here can be eliminated by propagating that the process was shutdown for 'exit_on_context_lost' differently:

GpuProcessHost::~GPProcessHost() {
...
#if defined(OS_ANDROID)
  497         block_offscreen_contexts = false;	  500         block_offscreen_contexts = false;
#endif

Sending an IPC seems flaky at shutdown. Maybe we can plumb an 'exit status' and translate it to an internal TERMINATION_STATUS. Since we don't call exit() but shutdown the message loop, I assume it'd have to be the code returned from 'int GpuMain()' and plumbed through ChildProcessLauncher and waitpid() etc.
 
> However in https://codereview.chromium.org/1747283003/ I noticed this is flaky depending

I mean it's not flaky in the way it is on trunk, but it meant that in my attempt to remove another 3d-api-blocking codepath (triggered per context from blink here), it turns out that it wasn't in fact redundant when it comes to 'exit_on_context_lost' and https://codereview.chromium.org/1747283003/.

Comment 2 by kbr@chromium.org, Mar 28 2016

Blockedon: 586905
Components: Blink>WebGL Internals>GPU
Signaling from the GPU process to the host via its exit code that the process was torn down for a specific reason sounds pretty good. In the past, I've also encountered the problem that the "last" IPC out of a process being torn down isn't delivered reliably.

Does this need a patch ? If someone hasnt started yet, i can check this.

Comment 4 by kbr@chromium.org, Aug 16 2016

Status: Available (was: Untriaged)
Yes, this still needs a patch.

Cc: j.iso...@samsung.com
Project Member

Comment 6 by sheriffbot@chromium.org, Aug 21 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 7 by kbr@chromium.org, Aug 24 2017

Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)
Project Member

Comment 8 by sheriffbot@chromium.org, Aug 24

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)

Sign in to add a comment