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

Feature Request: handle SIGTERM gracefully in IO routines #101

Open
gdevenyi opened this issue Oct 9, 2018 · 2 comments
Open

Feature Request: handle SIGTERM gracefully in IO routines #101

gdevenyi opened this issue Oct 9, 2018 · 2 comments

Comments

@gdevenyi
Copy link
Contributor

gdevenyi commented Oct 9, 2018

With the introduction of SLURM on Compute Canada we've been running into some issues when the IO routines of libminc being interrupted by the timeout SIGTERM+SIGKILL.

SLURM signals with a SIGTERM, waits 30 seconds, then signals with a SIGKILL to stop overtime jobs (as configured on compute canada)

Unfortunately, due to a combination of the latency of the filesystem and the size of files being written, we're running into some minc-based tools being interrupted by the SIGKILL. This seems to result in malformed MINC or XFM files being left dangling which messes with future runs of the pipeline.

Searching through the code, it doesn't look like there's any signal handlers implemented. I would like to propose that the IO routines implement a SIGTERM handler that will stop and delete the output file if it receives a SIGTERM.

@vfonov
Copy link
Member

vfonov commented Oct 9, 2018

maybe create all minc and xfm files in $TEMPDIR , and then move to to the target directory?

@gdevenyi
Copy link
Contributor Author

gdevenyi commented Oct 9, 2018

Certainly a good solution I can implement in the meantime 👍

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

No branches or pull requests

2 participants