Skip to content

Conversation

@bentsherman
Copy link
Member

Close #6549

This PR fixes an issue where local tasks that exceed their time limit do not have an exit status, making it difficult to apply common error strategies such as retrying with more time based on the exit code.

The exit status is inferred from the sub-process.

@bentsherman bentsherman requested a review from jorgee November 20, 2025 17:44
@netlify
Copy link

netlify bot commented Nov 20, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit d9e55e5
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/691f5394a7e1620008b2ff63

*/
if( elapsedTimeMillis() > wallTimeMillis ) {
destroy()
task.exitStatus = process.exitValue()
Copy link
Member

Choose a reason for hiding this comment

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

Would not make sense to use a predictable exit status (we event is known). Otherwise it can entirely depend on "destroy" implementation, and I'm not even sure that's going to a deterministic value.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's an interesting question. I think you could argue either way -- to make it consistent at Nextflow level, or make it consistent with the underlying OS, which the JVM implementation is likely to imitate

I figure that if a user has a pipeline with a mix of e.g. local and SLURM jobs, they would prefer to use the same error codes for both. That's why I lean towards deferring to the JVM

When I tested locally, it returned 143 which corresponds to SIGTERM. This is probably what most implementations do. Some might use 137 (SIGKILL) but that seems less likely since it's more aggressive

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.

task.exitStatus is unset on timeout with local executor, breaking dynamic errorStrategy

3 participants