Descriptionchrome: control how chrome orchestrates its exit.
Without this CL, the zygote process sends a SIGTERM after 2 seconds of waiting
for the renderer process to exit. The renderer process can take longer than 2
seconds if it is instrumented to collect profile data, for example.
Another issue with the current exit process is that the browser process can exit
before the children exit. This causes issues on ChromeOS where if the browser
process exits, the session_manager kills all children of the browser process
with a SIGKILL.
The goal of this CL is 2-fold:
1. Have --child-clean-exit ensure all child processes exit cleanly.
2. Have --wait-for-children-before-exiting ensure the browser process is the
last one to exit.
These objectives are achieved through the following measures (when
--child-clean-exit and --wait-for-children-to-exit are passed):
1. --child-clean-exit is propagated to the zygote process.
2. The zygote process reaps its child processes instead of sending a SIGTERM to
them.
3. The zygote process waits indefinitely until all its child processes have
exited.
4. The browser process waits indefinitely until all its child processes have
exited.
5. The browser process waits for the zygote and reaps it before exiting.
6. The renderer process does not send a SIGALRM to itself after 30 seconds.
Instead it waits indefinitely to cleanly exit. 30 seconds is not enough for a
clean exit when Chrome is instrumented and writing profile data.
BUG=259824
TEST=python test_clean_exit.py (pyauto unittest already checked in) works.
Patch Set 1 #Patch Set 2 : Patch is now working. #
Total comments: 4
Patch Set 3 : Made comment better. #Patch Set 4 : Clarified comment. #
Total comments: 6
Patch Set 5 : Redid the CL a bit. Added a new flag and test. #Patch Set 6 : Reverted file that was added by mistake. #Patch Set 7 : Made comments better. #Messages
Total messages: 20 (0 generated)
|