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

fix(run_command): fix subprocess timeout recovery #179

Merged
merged 2 commits into from
May 15, 2024

Conversation

ketiltrout
Copy link
Member

Normally, when a transfer times out, it's because it's stuck deep down in I/O wait, meaning SIGKILL
is not going to be handled in a timely manner, and, so, trying to .communicate() with it again is just futile.

With the current code, after a timeout, the worker just gets stuck in the same wait it tried to get out of with the kill, as if there were no timeout given.

So, let's just send it a kill and then abandon it.

Related to #175 (abandonning subprocesses may lead to zombies), but this doesn't really address the items brought up in that issue, which are higher-level ideas.

I have deployed this to cedar.

Normally, when a transfer times out, it's because
it's stuck deep down in I/O wait, meaning SIGKILL
is not going to be handled in a timely manner,
and, so, trying to `.communicate()` with it again
is just futile.

With the current code, after a timeout, the worker
just gets stuck in the same wait it tried to get
out of with the kill, as if there were no timeout
given.

So, let's just send it a kill and then abandon it.

Related to #175 (abandonning subprocesses may lead
to zombies), but this doesn't really address
the items brought up in that issue, which are higher-
level ideas.
@ketiltrout ketiltrout requested review from ljgray and rikvl May 15, 2024 19:03
Copy link

@rikvl rikvl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

I think (the newest version of) black wants to add empty lines and such in a bunch of files

@ketiltrout
Copy link
Member Author

It was the semicolons! (I think I've been spending too much time in perl recently).

@ketiltrout ketiltrout merged commit 799dfc9 into master May 15, 2024
3 checks passed
@ketiltrout ketiltrout deleted the subprocess_timeout_recovery branch May 15, 2024 19:59
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

Successfully merging this pull request may close these issues.

None yet

3 participants