This is maybe related to https://issues.jenkins-ci.org/browse/JENKINS-28822
I have a fairly complicated build that has parallel sections where sh steps run with returnStatus: true. Some of the parallel branches have timeout steps, others do not, but none of the timeouts are around the sh steps, they're usually around an input step.
You could say that the pipeline looks something like this:
And the error I'm getting is only on one of those branches, the sh step fails with:
Which seems to come from this line in the durable-task plugin:
I'm not sure what I should be doing differently or how to workaround this, other than to not use returnStatus: true and instead just make these scripts write the status to a file in the workspace which I can read and always exit 0