This forum has been archived. All content is frozen. Please use KDE Discuss instead.

What is responsible for exiting Chrome cleanly on reboots?

Tags: None
(comma "," separated)
User avatar
Sudhir Khanger
Registered Member
Posts
237
Karma
0
OS
Hi,

Chrome can be closed via Alt+F4 or cross button on the window or quit it via Ctrl+Shift+Q or menu . I often close the window but not quit Chrome which means the process continues to run so that background apps like Hangouts can continue to run freely. Ideally, the system should tell any processes running to exit cleanly when a user restarts his/her system. It doesn't happen as far as Chrome is concerned. Is this a problem with Chrome or Plasma or my distribution?

Thanks.
luebking
Karma
0
Define "exit cleanly" - does chrome segfault?

The session server (ksmserver) tells every (participating) process: "session is gonna end, save your stuff".
A process that does not use X11 may easily survive logouts from the GUI session, though (but oc. not reboots)
(eg. you could shift a build process to the background, disown it, logout from KDE, log into Enlightenment, start a terminal and pull the job into fg there)
User avatar
Sudhir Khanger
Registered Member
Posts
237
Karma
0
OS
luebking wrote:Define "exit cleanly" - does chrome segfault?

The session server (ksmserver) tells every (participating) process: "session is gonna end, save your stuff".
A process that does not use X11 may easily survive logouts from the GUI session, though (but oc. not reboots)
(eg. you could shift a build process to the background, disown it, logout from KDE, log into Enlightenment, start a terminal and pull the job into fg there)


If I have closed Chrome window not quit it and restarted my system after that when I start Chrome I get message "chrome didn't shut down correctly" and a dialog to restore previous session. That means Chrome is not quitting properly on shutdown. Is there a log that I should watch to tell what happens when ksmserver tell Chrome that system is shutting down you want to exit cleanly?
luebking
Karma
0
I assume chrome does not exit the background process w/ the GUI session (makes sense for eg. downloads, see build job example) and it's then killed w/ the system shutdown, what makes chrome "believe" it crashed.

=> Just log out w/o rebooting and check whether the chrom process is still running.
If it is (and assuming that is intentional) it's rather an ebkac.
You did not explicitly exit chrome (its bg jobs) at any point and had them killed by the shutdown instead.
Chrome warns you about this.
User avatar
Sudhir Khanger
Registered Member
Posts
237
Karma
0
OS
My understanding is that Chrome background apps are suppose to run always. Chrome creates an auto start file which auto starts it with the system. So they always run in background unless you intentionally quit them. This is their default behavior.

In both the following cases I closed the active Chrome window and let Hangouts run in background.

1. Logout - Chrome starts without problem. No error is shown.

2. Reboot - You get "chrome didn't shut down correctly" error message.
luebking
Karma
0
Yes, because chrome "crashed" when you shutdown the system.

The shutdown routines should pass them a SIGTERM first and follow with a SIGKILL (if chrome doesn't terminate)

This is either a "bug" in chromium (ignoring SIGTERM or taking it as a crash) or the init process (systemd, upstart, SysV init - depends on your distro)

It may also be that chromium receives the SIGTERM to late, tries to do some final action but fails (eg. because of an unmounted filesystem) and SIGSEGVs in return.

It has however nothing to do with Plasma, KDE or the GUI session management.
User avatar
Sudhir Khanger
Registered Member
Posts
237
Karma
0
OS
When I do killall chrome with Chrome window closed and background app running it kills all chrome processes. On starting again Chrome starts cleanly without problem.

Thanks for the explanation. I will read up more on figuring out if this is a systemd problem or Chrome.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]