Following on from Jamie's comments, I'm just going to braindump what
else we discovered is happening yesterday:

1) appmgr sends SIGSTOP to the process group for the webapp-container
2) The low memory killer comes along and kills the process group leader
3) appmgr considers the app closed, and never continues the remaining processes 
in their process group, leaving them around forever.

Normally when a process group becomes orphaned and it contains processes
that are stopped, the kernel automatically sends SIGHUP and then SIGCONT
to all remaining processes in that group. This is sufficient to ensure
all remaining processes in the group are cleaned up, and I've verified
this is the case on the desktop and the device when launching
webbrowser-app manually from a terminal.

However, applications started by Upstart get their own session (thanks
to Tyler for spotting this), with the session leader being webbrowser-
app (or whatever app you're launching). The process group of the session
leader is already orphaned by definition*, and so when the group (and
session) leader is killed, the kernel will never send SIGHUP and SIGCONT
to the remaining stopped processes.

*A process group is orphaned if the parent of every member is either
within the process group or outside of the session.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1303676

Title:
  [webapp-container] when using multiple webapps they crash randomly, if
  there is only one app remaining, this one starts being replaced when
  new ones start

To manage notifications about this bug go to:
https://bugs.launchpad.net/oxide/+bug/1303676/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to