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

[seafile.sh stop] doesn't kill webdav processes #2832

Open
laur89 opened this issue Oct 9, 2024 · 0 comments
Open

[seafile.sh stop] doesn't kill webdav processes #2832

laur89 opened this issue Oct 9, 2024 · 0 comments
Labels

Comments

@laur89
Copy link

laur89 commented Oct 9, 2024

This issue is essentially derived from a seafile forum post.

There seems to be a problem with how seafile.sh stop stops the webdav process. Unsure why, but under some conditions child processes are not terminated, which causes subsequent seafile.sh start to fail because of the sanity checks mentioned in the forum post.

To recap, the webdav process shutdown is currently done in two steps after invoking seafile.sh stop:

  1. first seafile.sh sends SIGTERM to seafile-controller process...:
pkill -SIGTERM -f "seafile-controller -c ${default_ccnet_conf_dir}"

This signal is caught by the signal handler, which in turn sends SIGKILL to wsgi process stored in seafdav PID-file.

  1. ...then itself sends SIGTERM to wsgidav process:
pkill -f  "wsgidav.server.server_cli"

My experience says if webdav had been in use (e.g. some files were synced over the protocol), then it never shuts down correctly. Note this is important in reproducing this -- simply starting seafile & stopping it without making use of webdav results in clean webdav shutdown.

Are we killing this process correctly? First I'd question why seafile-controller is SIGKILL-ing processes by default? Wouldn't it be best to first send SIGTERM (or some other signal) to allow whatever sub-process clean up their state gracefully? Second -- why are there two points of termination for webdav: both from within seafile-controller and seafile.sh's own pkill invocation?

Note I asked the wsgidav project about proper way of terminating the process under this gh issue. I was unable to reproduce this unclean shutdown using vanilla wsgidav 4.3.3 as mentioned in that ticket.


Running CE 11.0.12 in phusion/baseimage:jammy-1.0.4 container.

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

No branches or pull requests

2 participants