flathub / org.electronjs.Electron2.BaseApp

7 stars 16 forks source link

Flatpak apps based on org.electronjs.Electron2.BaseApp leak orphaned processes #18

Closed lostfictions closed 3 years ago

lostfictions commented 3 years ago

Hi there, I've noticed something strange about a few flatpak apps I have installed. Every time I close them, they seem to leave an orphaned process behind. Over time, these build up:

image

In the above screenshot, you can see one instance of org.signal.Signal running under gnome-shell. Above it are the orphaned processes. The bwrap processes in question are bwrap --args 33 signal or bwrap --args 34 signal, and the zypak-sandbox children of the latter are /app/Signal/chrome-sandbox /app/Signal/signal-desktop --type=zygote. I've also observed leaking bwrap xdg-dbus-proxy processes (bwrap --args 33 (or 34) xdg-dbus-proxy --args=36), but maybe this is a side effect of the zypak processes not being terminated?

I've observed this issue in org.signal.Signal and net.cozic.joplin_desktop from flathub. It doesn't appear to happen with any non-Electron-based flatpak apps. I don't have any other Electron-based flatpak apps to try, but I could investigate if further info is needed. This is on Ubuntu 20.04 (gnome-shell 3.36.4), Flatpak 1.6.5.

lostfictions commented 3 years ago

Tagging @refi64 in case this is a zypak issue, not sure who's a maintainer/watches this repo.

refi64 commented 3 years ago

Well...this is certainly odd. I had seen something like this and fixed it previously with a new Zypak release around...a month or so ago, have you updated the apps in question since then?

lostfictions commented 3 years ago

Yep, they've both been updated within the last few weeks:

$ flatpak list --columns=application,version | grep -Ei 'signal|joplin'
net.cozic.joplin_desktop    1.6.8
org.signal.Signal   1.39.6
lostfictions commented 3 years ago

At this point the problem is persistent and annoying enough that (now that I've identified the cause) I'll probably just drop any Electron flatpak apps and install them via some other method if this is not resolvable, unfortunately.

refi64 commented 3 years ago

Sorry for the delays, this should be fixed now in Zypak master, and I'll make a new stable release before the end of the month. I'll re-open this until then, though, so you know when the fix is widely available.

lostfictions commented 3 years ago

@refi64 Thank you so much for the update! Really glad to hear it was addressable (and not something weird happening with my own configuration :) ).

refi64 commented 3 years ago

Just merged in the latest version, should come down to the individual apps on their next updates!