Logout vs full restart on ChromeOS

162 views
Skip to first unread message

Arnold

unread,
Jul 26, 2017, 5:56:11 AM7/26/17
to Chromium OS dev
From my understanding, when an user logs out of his account on CrOS, all chronos user processes get killed and the browser process is restarted by ui script. 

I would like to know if the browser process starts fresh after each logout or if there are any temporary files allocated in memory or stateful partition that are reused by the browser when an user logs out of one account and into another without restarting the Chromebook, that are purged only after full restart. 

Basically, does logout and login "refresh" the browser process in a similar way that full hardware restart does?

Thanks!

Daniel Erat

unread,
Jul 28, 2017, 10:51:09 AM7/28/17
to Arnold Nowik, Chromium OS dev
[re-adding cros-dev, which I think I accidentally dropped in my initial reply]

Yes, all Chrome processes exit and are restarted, and to the best of my knowledge there's nothing that we keep on-disk to help with the next restart. (If there *were* some way to make Chrome restart more quickly, we'd probably want to keep it always on-disk so that Chrome would also start faster when the system first boots instead of only after logout.)

Note that there are persistent resources under /home/chronos that are used by the login profile. This includes the list of users, their profile pictures, wallpapers, keyboard layouts, etc.

On Fri, Jul 28, 2017 at 12:48 AM, Arnold Nowik <arn...@evolable.asia> wrote:
Thank you Daniel for the swift reply!

What I wanted to know is if the Chrome browser restarts completely clean after being killed by ui script every time an user logs out of their account, or if there are any temporary resources that are reused from the previous session, for example in order to make the browser restart faster or next login quicker etc., which would only disappear after proper hardware restart.

My concern is that in the case of the latter, if anything went wrong during the user session (e.g. some chronos user processes get corrupted) and some resources were to be reused after logout, then the next user or guest session might also be impacted. Such scenario would be technically impossible if Chrome started clean every time, thus my question. I took a look at /run directory that you pointed to and it seems that Chrome does not create any per-boot files except for the wayland-0 socket, so am I correct to think that this is a non-existing problem and I am just being paranoid?

Thanks!

On 27 July 2017 at 06:47, Daniel Erat <de...@chromium.org> wrote:
Your understanding is correct: Chrome's browser process (and all other Chrome processes) are killed when the ui job restarts. Encrypted home directories are unmounted, so no state persists through there. Most (all?) other per-boot files are stored under /run.

If that doesn't answer your question, please be more specific about what your concerns are and/or what you're trying to do.

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en




Arnold Nowik

unread,
Jul 29, 2017, 5:04:21 AM7/29/17
to Daniel Erat, Chromium OS dev
Thank you Daniel for the clarification! From your answer I understand that on logout the Chrome browser restarts every time entirely independently from the previous session and does not reuse any files on the disk or in the memory that were used by the previous browser process and its children. This is exactly what I wanted to know.

Daniel Erat

unread,
Jul 29, 2017, 11:50:55 AM7/29/17
to Arnold Nowik, Chromium OS dev
"... does not reuse any files on the disk or in the memory that were used by the previous browser process and its children" isn't correct. The new Chrome process uses files under /home/chronos that were also used by the previous Chrome process -- see the last paragraph of my previous reply.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages