-
Notifications
You must be signed in to change notification settings - Fork 187
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
WIP: Implement force-kill option in verdi process kill #6575
base: main
Are you sure you want to change the base?
Conversation
This allows plumpy ignore the callback so it does not get stuck in it but directly transitions the process to killed. The disadvantage is that the job behind the process might not be killed as we do not wait for. But I think that can be clearly communicated to the user in the help message and it has a similar logic as `kill -9 <PID>`. TODO: As you mentioned @kh with this solution the worker process will not be killed. Some parts of plumpy in stepping are needed to kill the process, but I am not sure which ones.
for more information, see https://pre-commit.ci
Thanks @agoscinski
and says:
|
This part is key. If you want to kill a The question is what the code should do in this case. Maybe the EBM should be disabled when calling the scheduler's kill command. But then again, what if the |
Yes, exactly! I was thinking about this as well. Once done, this PR should address all possibilities:
|
2af67e7
to
8e080b0
Compare
8e080b0
to
75bb430
Compare
This allows plumpy ignore the callback so it does not get stuck in it but directly transitions the process to killed. The disadvantage is that the job behind the process might not be killed as we do not wait for. But I think that can be clearly communicated to the user in the help message and it has a similar logic as
kill -9 <PID>
.This PR goes together with the PR in plumpy aiidateam/plumpy#288
TODO:
As you feared @khsrali with this solution the worker process will not be killed, so the upload async function still continues, so maybe we still need to find a solution that actually sends the message back to aiida-core. It is really weird, I feel like
_stepping
part in plumpy is buggy, because it only the transition function actually returns back to the sender of the message (whereverdi process kill <PID>
was sent), while only call the callback docalcjobs.tasks.task_kill_job
in the _stepping part kills the process occupying the worker (when removing the exponential backof from the kill), but it should do both. I have this a bug on my system also when just killing local jobs that sleep. Maybe we can check on your machine.Co-author @khsrali