Ticket 7573 - SPANK exit codes do not always propagate
Summary: SPANK exit codes do not always propagate
Status: RESOLVED FIXED
Alias: None
Product: Slurm
Classification: Unclassified
Component: Other (show other tickets)
Version: 23.11.x
Hardware: Linux Linux
: 4 - Minor Issue
Assignee: Tim McMullan
QA Contact:
URL:
: 10721 11075 (view as ticket list)
Depends on: 11361 12637 13199
Blocks:
  Show dependency tree / graph
 
Reported: 2019-08-13 15:29 MDT by Luke Yeager
Modified: 2025-05-07 06:12 MDT (History)
4 users (show)

See Also:
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: 23.11.0rc1
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments
v3 for 22.05 (90.11 KB, patch)
2022-05-29 02:20 MDT, Carlos Tripiana Montes
Details | Diff
failtest spank (1.31 KB, text/x-csrc)
2022-05-29 05:22 MDT, Carlos Tripiana Montes
Details
spank_test.c (1.68 KB, text/plain)
2022-06-21 14:43 MDT, Luke Yeager
Details
bats test suite for spank_test.so (6.84 KB, text/plain)
2022-06-27 10:53 MDT, Luke Yeager
Details
bug7573 23.11 (v3) (45.33 KB, patch)
2023-10-27 09:29 MDT, Tim McMullan
Details | Diff
bug7573 23.11 (v7) (38.18 KB, patch)
2023-10-30 08:25 MDT, Tim McMullan
Details | Diff
bug7573 2311 (v8) (38.21 KB, patch)
2023-11-03 10:47 MDT, Felip Moll
Details | Diff

Note You need to log in before you can comment on or make changes to this ticket.
Description Luke Yeager 2019-08-13 15:29:34 MDT
We noticed some strange behavior while developing a SPANK plugin. Our plugin can fail in the user_init function. In this case, SLURM helpfully prints this message:

> slurmstepd: error: spank: required plugin libspank_test.so: user_init() failed with rc=-1

... and the job quits immediately, without continuing on to the task_init_privileged function. However, the return code of the srun command is 0 (signaling success), and the job completion record also shows an exit code of 0.

This seems like a bug. It says the function failed, and the job exits immediately, yet the job is recorded as finishing successfully.

I dug into this further, and found these issues:

1. [init           in remote context] error codes and log messages are not propagated
2. [init_post_opt  in remote context] error codes and log messages are not propagated
3. [user_init      in remote context] error codes are not propagated
4. [task_post_fork in remote context] error codes are not propagated
5. [task_exit      in remote context] error codes are not propagated
6. [exit           in local context]  error codes are not propagated

In all cases, if there is an error in any of those functions, the job terminates immediately.

Interestingly, error codes ARE propagated from task_init_privileged and task_init in remote context.

Is this behavior expected? I can see how you might choose to ignore SPANK errors in task_exit and exit, but it seems to me you would not want to ignore them from init, init_post_opt, or user_init.
Comment 1 Nate Rini 2020-01-17 20:08:45 MST
Luke,

Looks like the code will only reject the job if the error code is negative (and spank plugin is required).
> if ((rc < 0) && sp->required)

Did you test using an rc=-1 for all of the above?

Thanks,
--Nate
Comment 2 Luke Yeager 2020-01-21 12:21:12 MST
Hi Nate,

The issue is not whether or not the job is rejected. The issue is with the return code from srun.

Thanks,
Luke
Comment 3 Nate Rini 2020-02-13 16:38:06 MST
Luke,

Can you please verify if your plugstack.conf had the plugins as required or optional?

Thanks,
--Nate
Comment 5 Luke Yeager 2020-02-24 11:03:49 MST
The plugin was "required".
Comment 6 Nate Rini 2020-03-10 12:19:42 MDT
Luke,

We have replicated the issue and are working on a patchset. Since this will affect a good number of plugins, we will need to be careful and take our time with it.

Thanks,
--Nate
Comment 28 Scott Jackson 2020-08-21 15:06:07 MDT
I have changed the srun and salloc tests to be more robust against incidental errors. I still need to fixup sbatch to look for the jobid, calling of api, failure of api call, exit codes, etc.
Comment 50 Luke Yeager 2020-12-04 15:33:15 MST
Any ETA on this? I found myself wanting to log+fail from slurm_spank_init() in REMOTE context today but am still unable to.
Comment 52 Nate Rini 2020-12-09 08:51:55 MST
(In reply to Luke Yeager from comment #50)
> Any ETA on this? I found myself wanting to log+fail from slurm_spank_init()
> in REMOTE context today but am still unable to.

The ETA is currently the slurm-21.08 release. We have been augmenting our test suite in order to fully test this issue and catch other related issues and to ensure against this breaking again.
Comment 60 Luke Yeager 2020-12-16 17:02:37 MST
(In reply to Nate Rini from comment #52)
> The ETA is currently the slurm-21.08 release.
Sounds good, thanks for the update.

I took another look at this today now that I'm on 20.11. Focusing only on the return codes, here is the fuller (now completely full?) matrix of entrypoints and contexts that I tested. For each, I caused a failure at this point in the SPANK plugin and recorded whether the 'salloc srun hostname' command returned a non-zero error code or not.

function              context     result
--------              -------     ------
init                  slurmd      rc!=0
init                  allocator   rc!=0
init_post_opt         allocator   rc!=0
job_prolog            job_script  rc=0   BAD
init                  local       rc!=0
init_post_opt         local       rc!=0
local_user_init       local       rc!=0
init                  remote      rc=0   BAD
init_post_opt         remote      rc=0   BAD
task_post_fork        remote      rc=0   BAD
user_init             remote      rc!=0
task_init_privileged  remote      rc!=0
task_init             remote      rc!=0
task_exit             remote      rc=0   OK
exit                  remote      rc=0   OK
exit                  local       rc=0   OK
job_epilog            job_script  rc=0   OK
exit                  allocator   rc=0   OK
slurmd_exit           slurmd      rc=0   OK

Do you agree with my placement of 'BAD' above? Are these the behaviors you're planning to change?

What's the plan for log message visibility? Will 'slurm_spank_log' etc. now propagate from ALL entrypoints and contexts? I would expect not (e.g. for init+slurmd), but would love to see the planned feature matrix at some point.
Comment 61 Nate Rini 2021-01-12 14:30:04 MST
(In reply to Luke Yeager from comment #60)
> What's the plan for log message visibility? Will 'slurm_spank_log' etc. now
> propagate from ALL entrypoints and contexts?

I suggest opening a new ticket for controlling how slurm_spank_log messages are propagated. AFAIK, there are no plans to change the current behavior.

(In reply to Luke Yeager from comment #60)
> Do you agree with my placement of 'BAD' above? Are these the behaviors
> you're planning to change?
We will respond with the expected changes once we have come to an agreement internally on them. There is currently no ETA except before the 21.08 release.
Comment 64 Nate Rini 2021-01-27 16:03:52 MST
*** Ticket 10721 has been marked as a duplicate of this ticket. ***
Comment 83 Nate Rini 2021-03-31 13:42:02 MDT
*** Ticket 11075 has been marked as a duplicate of this ticket. ***
Comment 84 Nate Rini 2021-06-17 13:54:07 MDT
(In reply to Nate Rini from comment #61)
> (In reply to Luke Yeager from comment #60)
> > Do you agree with my placement of 'BAD' above? Are these the behaviors
> > you're planning to change?
> We will respond with the expected changes once we have come to an agreement
> internally on them. There is currently no ETA except before the 21.08
> release.

Luke,

We have come to an internal agreement to combine the error namespaces for SPANK and Slurm which I consider to be the root cause of this issue in bug#11361 (private). Once that is done, we should be able to correct this issue correctly.

Thanks,
--Nate
Comment 85 Nate Rini 2021-08-02 09:39:32 MDT
(In reply to Nate Rini from comment #84)
> We have come to an internal agreement to combine the error namespaces for
> SPANK and Slurm which I consider to be the root cause of this issue in
> bug#11361 (private).

This is now upstream for 21.08rc1:
> https://github.com/SchedMD/slurm/compare/2557ae6bb112de76a3933d753701a1d477e97f15...9be55eef183539d69d282b489d3be056d593d3b4
  
> Once that is done, we should be able to correct this
> issue correctly.

Currently working on the patchset for rc2 to correct the returns now that the actual SPANK errors can be propagated.
Comment 91 Nate Rini 2021-09-16 16:54:43 MDT
Luke,

We are continuing to work on this issue. The SPANK docs have now been updated to include a table of expected results of when a SPANK callback issues a non-zero return code.

> man spank
or
> https://slurm.schedmd.com/spank.html#SECTION_Errors

We are currently undergoing our usual QA process to add a new unit test that verifies all the contents of the table along with a few more results.

Given the nature of any changes to SPANK causing issues for users (i.e. bug#12309), we are currently targeting enhanced error propagation to the Slurm 22.05 release.

I will provide updates as we make progress.

Thanks,
--Nate
Comment 92 Luke Yeager 2021-09-17 07:37:01 MDT
Thanks for adding that [huge] table - big improvement! I look forward to seeing the patterns in that table becoming a bit easier to visually group and understand, when breaking changes can be made in the next release. Thanks for the update.
Comment 99 Nate Rini 2021-09-22 09:37:41 MDT
(In reply to Nate Rini from comment #91)
> We are currently undergoing our usual QA process to add a new unit test that
> verifies all the contents of the table along with a few more results.

The new test7.24 is upstream:
> https://github.com/SchedMD/slurm/commit/379a489cee6a110e2cf7055254e597f13d8b9e20

It extensively tests the permutations in advance of the current work to propagate the errors.
Comment 102 Nate Rini 2022-03-03 17:44:53 MST
Created attachment 23727 [details]
patch for master (Nvidia test only)

Please give this patch set a try on the master branch.
Comment 104 Luke Yeager 2022-03-08 14:47:53 MST
(In reply to Nate Rini from comment #102)
> Please give this patch set a try on the master branch.
Thanks for the patch! Issues:


(1) hangs

I caused my plugin to fail in these scenarios:

FUNCTION        CONTEXT
init            remote
init_post_opt   remote
task_post_fork  remote

In each case, the failure causes the frontend client command (salloc srun hostname) to hang. I had to SIGKILL the process. For task_post_fork, it was even worse - I had to SIGKILL slurmd as well. There is a warning in SPANK(8) about how this might happen with proctrack/pgid, but I am using proctrack/cgroup (see related bug 10470).


(2) user_init

The behavior of errors from user_init() for salloc jobs is essentially unchanged from when I originally filed this bug. The job exits immediately but is recorded as a success. This is according to what's documented in SPANK(8), but I don't feel this behavior is helpful. Why was this left unchanged?

Furthermore, the behavior is different when the error occurs in an sbatch job vs. an salloc job. The node is drained for an sbatch job. That seems like a wildly different result. Was that intended?


(3) job_prolog, job_epilog

This is minor, but the behavior of errors from these two entrypoints are not documented. The behavior lines up with my expectation (node drains for prolog/epilog errors). I think it's fine if you leave it undocumented, but I wanted to point it out in case it was an oversight.
Comment 112 Carlos Tripiana Montes 2022-04-21 06:52:40 MDT
Luke,

I'm having the bug assigned to continue the job done by Nate until now.

By now I'm still getting familiar to the issue and the fixes developed up to now. What I feel is that the direction we have are right and we need to polish the patch just a bit before it meets the expected behaviour.

I'll let you know once I have more information to share.

Regards,
Carlos.
Comment 114 Carlos Tripiana Montes 2022-05-29 02:58:53 MDT
Luke,

I'm following on the work here, and I need more details of:

> (2) user_init

> The behavior of errors from user_init() for salloc jobs is essentially unchanged from when I originally filed this bug. The job exits immediately but is recorded as a success. This is according to what's documented in SPANK(8), but I don't feel this behavior is helpful. Why was this left unchanged?

I think it comes from what I'm going to explain below. I think the salloc test did not spawned any step, or tasks, so it could be salloc didn't fire any user_init at all.

> Furthermore, the behavior is different when the error occurs in an sbatch job vs. an salloc job. The node is drained for an sbatch job. That seems like a wildly different result. Was that intended?

I've look at what we have have now, and this seems like the expected behaviour IF the salloc did not spawn any step or tasks.

spank_local_user (LOCAL_USER_INIT) is only called in pre_launch_srun_job just after _run_srun_prolog.

spank_user (STEP_USER_INIT) is only called in _fork_all_tasks (stepd) just before forking all the step tasks.

So you see the salloc/sbatch difference highly depends on how the jobs were. To see if we are missing anything, send us the sbatch and salloc jobs you used, so we can see if everything is as expected or we are missing anything else.

As completely opposite, it might be us forgetting to catch the return code in some additional place elsewhere.

Thanks,
Carlos.
Comment 115 Carlos Tripiana Montes 2022-05-29 04:22:13 MDT
init            remote
init_post_opt   remote
task_post_fork  remote

If that failed only with a salloc srun hostname as mentioned, it would be really helpful to see you logs (slurmd.log mainly).

Is there any possibility?

Thanks,
Carlos.
Comment 116 Carlos Tripiana Montes 2022-05-29 05:18:06 MDT
Comment on attachment 25269 [details]
v3 for 22.05

Making patch public to user to test
Comment 117 Carlos Tripiana Montes 2022-05-29 05:22:39 MDT
Created attachment 25270 [details]
failtest spank

I'm sharing with you my sample test spank to see if I'm missing anything.

I'm targeting fixes for 22.05 branch right now, and testing my spank with the patch I'm just made visible (v3 for 22.05) it seems I can't make "spank_init" fail in remote context.

Please, get a fresh 22.05 branch, apply the v3 patch, and use my failtest spank as base tested.

Report us back if anything still fails, how it fails (reproduction steps and changes in failtest.c), and relevant logs exposing the errors.

I hope we are close to get this ready for review, I don't want to miss anything.

Thank you,
Carlos.
Comment 118 Carlos Tripiana Montes 2022-06-13 01:05:41 MDT
Hi Luke,

we haven't received any feedback in the last 14 days so please report back the requested information information whenever possible but, at least, ACK to keep the bug open.

Thanks,
Carlos.
Comment 119 Carlos Tripiana Montes 2022-06-15 04:18:15 MDT
Hi,

since we haven't received any feedback in the last 14 days, I am proceeding to close this bug as TIMEDOUT. Please, feel free to mark it as OPEN again when you have more information for us.

Regards,
Carlos.
Comment 120 Felix Abecassis 2022-06-15 09:41:32 MDT
Carlos, sorry about the delay in replying. We are still interested in seeing this resolved.

I know that my colleague Luke has been very busy, hopefully we will be able to test this patch next week.
Comment 121 Luke Yeager 2022-06-21 14:43:00 MDT
Created attachment 25598 [details]
spank_test.c

(In reply to Carlos Tripiana Montes from comment #117)
> I'm sharing with you my sample test spank to see if I'm missing anything.

Hi Carlos. I've attached the code I've been using to test patches related to this bug. It lets you test failure at different points by simply editing the plugstack file. No need to recompile the plugin.

I've added your patch on top of 22.05.2 and will commence testing now.
Comment 122 Luke Yeager 2022-06-27 10:50:28 MDT
(Good news)

1. The hangs in init/remote and init_post_opt/remote are fixed now - nice!


(Bad news)

1. The hang in init_post_fork/remote is still present. slurmd must be SIGKILLed.

2. Errors from job_prolog/job_script are missed. The job exit code is 0, and the node is also not drained. 

3. Errors from job_epilog/job_script do not drain the node.

4. Errors from init/remote and init_post_opt/remote do not cause the job to fail for salloc+srun or sbatch+srun. However, they DO cause the job to fail for a bare srun job. The latter behavior seems best.

5. Errors from user_init/remote are not working well. For srun and salloc+srun jobs, the exit code is 0 (not good). And for sbatch+srun, the exit code is 1 (better) but the node is drained (why?).

6. Errors from task_exit/remote and exit/remote are propagated to the job exit code for sbatch+srun jobs. They should not be - these should be silent failures as are all other failures in teardown entrypoints.
Comment 123 Luke Yeager 2022-06-27 10:53:38 MDT
Created attachment 25666 [details]
bats test suite for spank_test.so

It seems there are some holes in the testing for these patches. I'm attaching the testsuite I'm currently using, in case it's useful. I use it in conjunction with the previously attached spank_test.c plugin.

Current test suite status: 50 tests, 12 failures, 3 skipped
Comment 131 Tim McMullan 2022-08-02 11:29:17 MDT
Hi Luke,

I've started to take a look at this ticket as a whole and while looking through your comments I found a likely cause of:

(In reply to Luke Yeager from comment #122)
> 2. Errors from job_prolog/job_script are missed. The job exit code is 0, and
> the node is also not drained. 
> 
> 3. Errors from job_epilog/job_script do not drain the node.

Both of these appear to largely be a regression introduced with 22.05.  I've proposed a patch to fix it in 22.05, but it would be helpful to me to know if when running your tests you have a Prolog and Epilog defined in the slurm.conf file.

I did note that your test suite will always fail the test if the node is drained, but as you know it is expected for slurm_spank_job_[prolog|epilog] to drain the node.

There is an awful lot more to digest here, but I'm continuing to work through this!

Thanks!
--Tim
Comment 132 Luke Yeager 2022-08-02 11:44:28 MDT
(In reply to Tim McMullan from comment #131)
> ... it would be helpful to me to know
> if when running your tests you have a Prolog and Epilog defined in the
> slurm.conf file.
Yes, I do.

> I did note that your test suite will always fail the test if the node is
> drained, but as you know it is expected for slurm_spank_job_[prolog|epilog]
> to drain the node.
Yes, I'll probably want to modify that test suite to pass in an additional parameter - "expected_node_state". I hope looking at the .bats script is interesting, but it's still in flux.

Thanks for continuing to push this along!
Comment 133 Tim McMullan 2022-08-02 11:53:05 MDT
(In reply to Luke Yeager from comment #132)
> (In reply to Tim McMullan from comment #131)
> > ... it would be helpful to me to know
> > if when running your tests you have a Prolog and Epilog defined in the
> > slurm.conf file.
> Yes, I do.

Ok, sounds good.  In that case you are finding that regression, so the proposed patch should improve things some!

> > I did note that your test suite will always fail the test if the node is
> > drained, but as you know it is expected for slurm_spank_job_[prolog|epilog]
> > to drain the node.
> Yes, I'll probably want to modify that test suite to pass in an additional
> parameter - "expected_node_state". I hope looking at the .bats script is
> interesting, but it's still in flux.

It is very interesting, and I found a great way to illustrate how you expect things to behave!  Thanks for putting it together!

> Thanks for continuing to push this along!

Sure thing!  I'll let you know how things go as I continue to make progress here!
Comment 135 Tim McMullan 2022-08-25 11:59:26 MDT
Hi Luke,

I've been plugging away at this and slowly making some progress.  I've found the source of at least one hang and will be working on the other when I get it resolved.

The patch that should have job_prolog and job_epilog failures not draining the node should now be fixed upstream.

Thanks!
--Tim
Comment 136 Tim McMullan 2022-10-06 07:52:29 MDT
Just wanted to update this, I've continued to work on tracking down the couple of hanging situations.  I've fixed another one, but there is still some work to be done there.
Comment 137 Felix Abecassis 2023-04-12 17:13:39 MDT
Is there any new update on this?

We had a similar issue today and we noticed that the big table in https://slurm.schedmd.com/spank.html is missing all remote slurm_spank_init cases. 

In addition, it would be great to unify the node drain behavior at for remote spank_init: it should probably drain the node for all cases (srun/salloc/sbatch). And remote slurm_spank_user_init should probably *not* drain the nodes as this callback is likely influenced by command-line arguments specified by the users and might contain some mistakes.
Comment 138 Felix Abecassis 2023-04-12 17:14:33 MDT
For my last sentence regarding slurm_spank_user_init, to clarify: it is currently only draining in the sbatch case.
Comment 139 Tim McMullan 2023-04-13 13:46:38 MDT
Hi Felix,

I apologize for the lack of updates on this.

This is still on my radar, and I have been making progress on it.  My current patch set is based on the current master branch and has been working better in my tests (at least one fix for a potential lockup did end up in 23.02, which are certainly part of making these changes possible).

My current investigations are around an issue where it is possible some responses are getting lost.  Once I've finished sorting this out, some more broader testing might be appropriate. 

(In reply to Felix Abecassis from comment #137)
> And remote slurm_spank_user_init should probably *not*
> drain the nodes as this callback is likely influenced by command-line
> arguments specified by the users and might contain some mistakes.

This is certainly interesting, I'll have to see why that is the case right now.  What version(s) are you seeing this on?

Thanks!
--Tim
Comment 140 Felix Abecassis 2023-04-13 14:33:59 MDT
> This is certainly interesting, I'll have to see why that is the case right now.  What version(s) are you seeing this on?

I'm testing on the latest code on the master branch, I'm returning "-1" from slurm_spank_user_init and launching a sbatch job.

The slurmctld log:
slurmctld: debug2: Spawning RPC agent for msg_type REQUEST_BATCH_JOB_LAUNCH
slurmctld: debug2: Tree head got back 0 looking for 1
slurmctld: debug2: Tree head got back 1
slurmctld: debug2: node_did_resp ioctl
slurmctld: debug2: Processing RPC: REQUEST_COMPLETE_BATCH_SCRIPT from UID=0
slurmctld: error: slurmd error running JobId=6 on node(s)=ioctl: Slurmd could not execve job
slurmctld: drain_nodes: node ioctl state set to DRAIN
slurmctld: _job_complete: JobId=6 WEXITSTATUS 0
Comment 141 Felix Abecassis 2023-04-13 16:27:17 MDT
Looking at the table in https://slurm.schedmd.com/spank.html again, I think there was some kind of copy/paste issue maybe?

Because I don't think sbatch + slurm_spank_init + local context is a combination that exists. For sbatch there is the alloc context or the remote context.
Comment 142 Tim McMullan 2023-04-14 07:34:13 MDT
(In reply to Felix Abecassis from comment #141)
> Looking at the table in https://slurm.schedmd.com/spank.html again, I think
> there was some kind of copy/paste issue maybe?
> 
> Because I don't think sbatch + slurm_spank_init + local context is a
> combination that exists. For sbatch there is the alloc context or the remote
> context.

You are right!  It looks like a bunch of local context stuff ended up in there that shouldn't be since those functions are in the "allocator" context.


I'll work on getting the docs corrected.
Comment 150 Tim McMullan 2023-10-27 11:12:18 MDT
I've attached the current patch set that is aiming to get the return codes when a spank plugin fails to be consistent.  There is still work being done on this, but please take a look and let me know if you run into any problems with the current patch!

Thanks!
Comment 153 Tim Wickberg 2023-10-27 12:31:32 MDT
Hey Felix -

I misread an internal note to Felip as Felix during our call earlier, and thought they'd already exposed the patch so you could quickly test it. My fault there.

They should have a public version ready early next week if not today for you to look at. Sorry for any confusion I caused.

- Tim
Comment 156 Felix Abecassis 2023-10-27 23:29:02 MDT
I was indeed a little confused :)
Thanks for clarifying!
Comment 157 Tim McMullan 2023-10-30 08:25:58 MDT
Created attachment 33017 [details]
bug7573 23.11 (v7)
Comment 159 Tim McMullan 2023-10-30 08:29:39 MDT
Hi Felix,

This is an updated version of the patch where I've fixed a couple bugs I found in the version I had  uploaded previously.

Let me know if you encounter any issues with this one!

Thanks,
--Tim
Comment 160 Felip Moll 2023-11-03 10:47:01 MDT
Created attachment 33149 [details]
bug7573 2311 (v8)

I upload a patch update with minor fixes replacing 0x0100 by W_EXITCODE(1, 0) in two spots.
Comment 164 Tim McMullan 2023-11-03 14:18:23 MDT
We've pushed a slightly modified version of the v8 patch to master:

https://github.com/SchedMD/slurm/compare/aac30015eb...ea01794ee9

The changes to rc should be in for 23.11.

Please let us know if you encounter any issues!

Thanks,
--Tim
Comment 165 Tim McMullan 2023-11-06 09:05:37 MST
With the changes pushed, I'm going to resolve this ticket.  If you encounter any issues please let us know!

Thanks,
--Tim
Comment 166 Luke Yeager 2024-01-08 12:22:34 MST
I just tested on 23.11.1.

> The hang in init_post_fork/remote is still present. slurmd must be SIGKILLed.
This is fixed.

> Errors from job_prolog/job_script are missed. The job exit code is 0, and the
> node is also not drained.
This is fixed.

> Errors from job_epilog/job_script do not drain the node.
This is fixed.

> Errors from init/remote and init_post_opt/remote do not cause the job to fail
> for salloc+srun or sbatch+srun. However, they DO cause the job to fail for a
> bare srun job. The latter behavior seems best.
This is fixed.

> Errors from task_exit/remote and exit/remote are propagated to the job exit
> code for sbatch+srun jobs. They should not be - these should be silent
> failures as are all other failures in teardown entrypoints.
This is fixed.

> Errors from user_init/remote are not working well. For srun and salloc+srun
> jobs, the exit code is 0 (not good). And for sbatch+srun, the exit code is 1
> (better) but the node is drained (why?).
Error codes for the "sbatch+srun" case still aren't working well. I'll open a new bug.