Notify browser about intentional GPU process termination for 'exit_on_context_lost' workaround |
||||||||
Issue descriptionSometimes 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.
,
Mar 28 2016
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.
,
Jun 21 2016
Does this need a patch ? If someone hasnt started yet, i can check this.
,
Aug 16 2016
Yes, this still needs a patch.
,
Aug 18 2016
,
Aug 21 2017
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
,
Aug 24 2017
,
Aug 24
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
,
Aug 24
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by siev...@chromium.org
, Mar 28 2016