nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Execution failure is not reported in the trace file when retry error strategy is used

Open msmootsgi opened this issue 9 years ago • 9 comments

I just had a pipeline fail because sbatch failed to submit the job to the SLURM queue. However, my nextflow.config is configured to retry processes that fail:

process {
    errorStrategy = "retry"
    maxRetries = 2
    cache = "deep"
    maxErrors = 10
}

It would seem that the sbatch submission is handled outside of the normal error/retry handling. It would be great if we could handle sbatch submission errors just like normal process errors.

Here's some of the nextflow output:

Caused by:
  Failed to submit process to grid scheduler for execution

Command executed:

  sbatch .command.run

Command exit status:
  1

Command output:
  sbatch: error: Batch job submission failed: I/O error writing script/environment to file

msmootsgi avatar Jul 13 '17 18:07 msmootsgi

Could you include the .nextflow.log file ?

pditommaso avatar Jul 13 '17 18:07 pditommaso

I've attached the last 1000 lines, which should capture the whole error. Let me know if you need anything earlier. sbatch.nextflow.log.last.1000.txt

I'm not sure what to make of the "No space left on device" exception. The launch dir and work dir are both on an EFS partition and I'm not using scratch.

msmootsgi avatar Jul 13 '17 19:07 msmootsgi

The retry logic is working as expected:

Error submitting process 'hmmscan_gene3d_parse (924)' for execution -- Execution is retried (1)
:
Error submitting process 'hmmscan_gene3d_parse (924)' for execution -- Execution is retried (2)
:

pditommaso avatar Jul 13 '17 19:07 pditommaso

Hmmm. The failure didn't make it into my trace file, which is what prompted the question.

msmootsgi avatar Jul 13 '17 19:07 msmootsgi

Do you mean the file generate by the -trace-file option ?

pditommaso avatar Jul 13 '17 19:07 pditommaso

Yes

msmootsgi avatar Jul 13 '17 19:07 msmootsgi

Now we have the bug, the task is re-retried but not reported in the trace :/

pditommaso avatar Jul 13 '17 19:07 pditommaso

Well, it helped uncover a bug in my pipeline too! :) Now I know that I need to use tempDir for the collectFile operator. :)

msmootsgi avatar Jul 13 '17 19:07 msmootsgi

great ! :)

pditommaso avatar Jul 13 '17 19:07 pditommaso