Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OS X > 10.10] ownCloud Extensions is running even when owncloud is not #5382

Closed
SamuAlfageme opened this issue Dec 13, 2016 · 8 comments
Closed

Comments

@SamuAlfageme
Copy link
Contributor

SamuAlfageme commented Dec 13, 2016

Expected behaviour

When you close the sync client, the Extensions process helper should be closed too to avoid having resources consumed and files open. (owncloud should be the parent process)

Actual behaviour

The ownCloud Extensions process is created by launchd(1) and keeps running indefinitely:

img

Steps to reproduce

  1. Quit/Kill the ownCloud process
  2. Check the Activity Monitor and filter by ownCloud Extensions

Client configuration

Client version: 2.2.4
Operating system: Mac OS X > 10.10 (Finder Sync Extension)

@jturcotte
Copy link
Member

We don't control this, that process is only the sandbox shell for the plugin, and the plugin must be loaded by Finder in order for us to detect if the ownCloud client is reachable through the SocketAPI or not. This should normally match the behavior of Dropbox, Google Drive and other sync clients.

Enabling or disabling the extension in "System Preferences / Extensions" is the normal way to let the user control the presence of this process, and activating/deactivating that setting on startup would mean that we overwrite what the user has chosen.

It should however take no CPU, and very little memory.

@jturcotte
Copy link
Member

Dropbox seems to unload their extension, maybe it destroys itself? However they are allowed to do this since they install/uninstall the extension at runtime depending on a setting they have in the Dropbox settings. Not sure if we should go all that way to achieve this. I haven't checked what Google Drive does.

@SamuAlfageme
Copy link
Contributor Author

@jturcotte thanks for explaining! I wanted to discuss a bit about this because I've found myself having an extension process from a client I had not opened for a while. And if somehow could we improve this so the process life span limits to the client's.

activating/deactivating that setting on startup would mean that we overwrite what the user has chosen.

This is a really good point. We could consider how other projects deal with the sandboxed process for the finder sync extension and close if we don't find a better solution.

@SamuAlfageme
Copy link
Contributor Author

SamuAlfageme commented Dec 15, 2016

@jturcotte Just tried:

I haven't checked what Google Drive does.

And the sandboxed process is killed a bit after main process termination. It's also a child of launchd(1) but probably pools if the main Drive process is running.

@SamuAlfageme
Copy link
Contributor Author

@jturcotte maybe one additional reason to kill the finder extension process together with the client would be to allow users to uninstall from the apps folder; i.e right now you're prompted with:

For the update process, I guess the .pkg installer kills the running extension and replaces it with the new one. Haven't had the chance to check just yet though.

@guruz guruz assigned guruz and unassigned jturcotte Feb 12, 2018
@guruz guruz added this to the 2.5.0 milestone Feb 12, 2018
@guruz
Copy link
Contributor

guruz commented Mar 26, 2018

@jturcotte Can't ownCloud client on exit send something to all connected sockets to make them unload themselves?

@guruz guruz modified the milestones: 2.5.0, 2.6.0 Mar 26, 2018
@jturcotte
Copy link
Member

The socket will be closed, so you can already know that in the plugin, the question is if you can exit the sandbox from the inside, or if you need to do this from the outside (like with some pluginkit hack).

@guruz guruz modified the milestones: 2.6.0, 2.5.0 Apr 10, 2018
@guruz
Copy link
Contributor

guruz commented Apr 10, 2018

@jturcotte i think the pluginkitway is the only one.. feel free to review #6444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants