| Summary: | Failure in slurm_spank_task_post_fork drains the node | ||
|---|---|---|---|
| Product: | Slurm | Reporter: | Luke Yeager <lyeager> |
| Component: | Other | Assignee: | Marshall Garey <mgarey> |
| Status: | RESOLVED INFOGIVEN | QA Contact: | |
| Severity: | 4 - Minor Issue | ||
| Priority: | --- | CC: | fabecassis, mstolarek |
| Version: | 20.11.1 | ||
| Hardware: | Linux | ||
| OS: | Linux | ||
| Site: | NVIDIA (PSLA) | Slinky Site: | --- |
| Alineos Sites: | --- | Atos/Eviden Sites: | --- |
| Confidential Site: | --- | Coreweave sites: | --- |
| Cray Sites: | --- | DS9 clusters: | --- |
| Google sites: | --- | HPCnow Sites: | --- |
| HPE Sites: | --- | IBM Sites: | --- |
| NOAA SIte: | --- | NoveTech Sites: | --- |
| Nvidia HWinf-CS Sites: | --- | OCF Sites: | --- |
| Recursion Pharma Sites: | --- | SFW Sites: | --- |
| SNIC sites: | --- | Tzag Elita Sites: | --- |
| Linux Distro: | --- | Machine Name: | |
| CLE Version: | Version Fixed: | ||
| Target Release: | --- | DevPrio: | --- |
| Emory-Cloud Sites: | --- | ||
|
Description
Luke Yeager
2020-12-16 17:53:53 MST
Thanks for the report Luke. I'll look into it and let you know if I can reproduce it or not Hi Luke,
Sorry for the delayed response. I'm not able to reproduce the "kill task failed" error leading to a drained node.
Briefly, here's what happens in the code:
_fork_all_tasks() -> spank_task_post_fork().
If that errors, then goto fail2 and return back to job_manager().
Back in job_manager(), it does a goto fail3 since _fork_all_tasks() failed. Here it starts and stops the step terminate monitor thread. This is the thread that the KillWait timeout. So in between these start/stop calls slurmstepd is waiting for the processes to finish but they aren't getting killed.
The proctrack_g_signal() call signals the processes, and proctrack_g_wait() waits for 2 minutes or until those processes are killed.
_set_job_state(job, SLURMSTEPD_STEP_ENDING);
step_terminate_monitor_start(job);
if (job->cont_id != 0) {
proctrack_g_signal(job->cont_id, SIGKILL);
proctrack_g_wait(job->cont_id);
}
step_terminate_monitor_stop();
We can see this happen in the log file:
>Dec 16 16:13:14 slurmstepd-node-1[786148]: error: spank task 0 post-fork failed
>Dec 16 16:13:14 slurmstepd-node-1[786153]: error: _exec_wait_child_wait_for_parent: failed: Operation now in progress
>Dec 16 16:14:15 slurmstepd-node-1[786148]: error: *** STEP 273.0 STEPD TERMINATED ON node-1 AT 2020-12-16T16:14:14 DUE TO JOB NOT ENDING WITH SIGNALS ***
>Dec 16 16:14:15 slurmctld[783385]: update_node: node node-1 reason set to: Kill task failed
>Dec 16 16:14:15 slurmctld[783385]: update_node: node node-1 state set to DRAINING
That "STEPD TERMINATED ON ... DUE TO JOB NOT ENDING WITH SIGNALS" happens in the step terminate monitor thread.
Anyway, the short of it is that the processes aren't getting killed for some reason, but they normally should be.
* What do you have ProctrackType set to in slurm.conf?
* Does this "kill task failed" and node draining happen every single time there is a failure in slurm_spank_task_post_fork()? What is the job doing? Have you tried different types of jobs (like a job that just sleeps or calls hostname or something like that)?
(In reply to Marshall Garey from comment #5) > * What do you have ProctrackType set to in slurm.conf? That was the right question, it seems. I was using proctrack/pgid (an old config I was testing and forgot to revert on my local workstation). When I switched to proctrack/cgroup the cleanup happens as expected. Quickly and without draining. Since we don't use that proctrack plugin anywhere at our site, this isn't a problem for us. I'd be curious to know if you can reproduce it with that proctrack plugin yourself, though. It does repro consistently for me. Yes, it reproduces for me with proctrack/pgid. It also ends up with a defunct slurmstepd process. That's demonstrates why we recommend proctrack/cgroup, and not the other proctrack plugins. I'm closing this as infogiven. Let me know if you have more questions. Actually closing the bug this time. Sorry about the extra email. |