-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup of failed folders #80
Comments
Nextflow provides two directives,
Then it would be easy to scan for orphaned work directories. We could create a cleanup process like you said or we could use the
The latter option would have to be written in Groovy instead of Bash though. |
Possibly Helpful References on fixing this problem. Nextflow issue 452 has Paolo considering that this is something that is necessary to add to the language, as many people have commented about this issue. This is currently causing a hangup for GEMmaker, as it quickly runs out of space when ran on a local machine. nextflow-io/nextflow#165 https://www.nextflow.io/blog/2016/error-recovery-and-automatic-resources-management.html |
The error status 141 is strange, as it appears that the ascp step is finishing properly. When looking at the run logs, it appears that they complete successfully:
With no indication that they failed besides the .exitcode of 141 Example of failed directory:
|
Potentially reason why some were failing |
exit 141 is commonly a SIGPIPE error meaning that a pipe was shutdown in the middle of the next tool in the piped command reading from the pipe. I'm getting 141 errors on other processes too, so I don't think this problem is specific to downloading SRAs. I'm currently wrapping the SRA download into a Python script so we have greater control over problems with it. For example, prefetch will sometimes indicate that the download failed when it fact it has not. I'm not sure why. Maybe some last bit of communication didn't happen correctly for it. This may help resolve the 141 on this too as I suspect it may have something to do with the for loop in the bash code? |
Oh, and I should mention the Python wrapper script I'm writing will cleanup the files if it detects a failure :-) |
We've done all we can do to fix this issue. The new python scripts created for issue #138 will cleanup failed attempts for downloading SRAs and failed fastq_dump runs. We have processes to do cleanup. We just need to wait on Nextflow to provide more control. |
Using the newest GEMmaker when I run the 475 rice dataset the
output
directory only cosumes 1.9GB of storage. Previously all of the output would have consumed around 30TB of storage. So this is great!However, we still have some problems with the
work
directory. If GEMmaker fails along the way and has partially created files (e.g. SAM/BAM/FASTQ files) then restarts the process it creates a new process directory so those failed attempts never get cleaned up. Also, any temp files (e.g.temp.*.sam
) files don't get cleaned up either. So, while theoutput
directory has 1.9GB, thework
directory in my case is still consuming 5TB.Note, that work directories may be abandoned if any part of GEMmaker fails. For example, if you are running 100 samples and 1 failes for some reason, all of those working directories for the other 99 samples are potentially abandoned (need to verify this).
Perhaps the solution is to run a 'cleanup' process if the
-resume
flag is used that can look for incompleted work directories. However, I have no clue how to determine which directories contain results from failed processes.The text was updated successfully, but these errors were encountered: