[webapp-container] apps are not handled by lifecycle management properly

Bug #1388089 reported by Oliver Grawert
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Oxide
New
Undecided
Unassigned
qtmir (Ubuntu)
Confirmed
Undecided
Unassigned
qtmir (Ubuntu RTM)
New
Undecided
Unassigned
webbrowser-app (Ubuntu)
Confirmed
Undecided
Unassigned
webbrowser-app (Ubuntu RTM)
New
Critical
Unassigned

Bug Description

in image 137, if you open a gazillion of apps and have webapps among them, the webapp screenshots never turn blurry when the OOM score is reached on high memory pressure ... once you switch to such a webapp, the whole content window turns white (sometimes the app header stays around, sometimes the whole app window is white).

seemingly the renderer is lifecycle managed and gets properly OOM killed on high memory pressure , but the frontend of the webapp does not.

Related branches

Oliver Grawert (ogra)
description: updated
Revision history for this message
Michał Sawicz (saviq) wrote :

Let's stop calling it "lifecycle managed" as that suggests our app management actually has anything to do with it. It's all about the out-of-memory killer and how it behaves. It will just kill one process that it sees fit to kill (in this case, the renderer), so the *app*, being the webapp container, lives on. So there's no screenshot, per se, it's all the app still working (but SIGSTOP'ed, suspended). Once you focus it, it realizes it lost the renderer and the web canvas goes blank (totally blank if webapp has no header, header still around if it was there in the first place).

There's two potential solutions here:
a) get OOM to kill the whole pgroup
b) make the webapp container recover by restarting its renderer

a) would be more in line with our overall lifecycle management
b) could be quicker, as we only need to start the renderer, not the whole app, but the shell won't have control over how the recovery looks

Revision history for this message
Ted Gould (ted) wrote :

For "emergency" mode we're talking about making it so that we don't set the OOM value on the oxide processes, then we can research how to get the OOM killer to kill the whole cgroup.

Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

To be noted:

- killing the whole cgroup would be a valid solution for webapps per-se since atm they are mostly single webview entities but most likely not for the webbrowser-app which basically is the host for multiple webviews. Killing the whole webview bits might be trickier and not desirable from the perspective of per-tab state preservation ...

- there are some tasks in the pipe that would deal with those issues (discussed during the Washington sprint):
     - making webapps a single process (which would simplify the klling process),
     - having an api for the webview to be informed that the renderer process has been killed (ongoing work and also needed to properly solve other issues, like proper handling of window.close()),
     - clever handling of background tabs strategies for the oom killer ...

Those above are being prioritized and/or worked on atm,

tags: added: exploratory
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

tagged for review and tracking

tags: added: rtm14
Changed in webbrowser-app (Ubuntu RTM):
importance: Undecided → Critical
Olivier Tilloy (osomon)
no longer affects: webbrowser-app
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qtmir (Ubuntu):
status: New → Confirmed
Changed in webbrowser-app (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.