nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

`nextflow clean` throws `Unexpected error [EOFException]` when attempting to clean previous runs

Open MatteoSchiavinato opened this issue 2 years ago • 2 comments

Bug report

After a successful run of my pipeline, I am trying to clean the workspace from previous runs. I'm doing so using nextflow clean -f -before nauseous_cajal, which is the mnemonic of the latest run.

Expected behavior and actual behavior

I would expect this to work seamlessly by removing the previous runs and leaving only "nauseous_cajal" in the nextflow log. However, when running the command (regardless of -f or -n) it throws out this error:

Unexpected error [EOFException]

Steps to reproduce the problem

I am simply trying to clean up previous runs, something I did with this workflow for the past months every now and then, and in general has never thrown out errors before in the system I use.

I have run nextflow -log log clean -f -before nauseous_cajal as suggested in the nextflow gitter chat to another user some time ago, and this is the produced log:

ene-28 13:47:54.839 [main] DEBUG nextflow.cli.Launcher - $> nextflow -log log clean -f -before nauseous_cajal
ene-28 13:47:55.176 [main] ERROR nextflow.cli.Launcher - null
java.io.EOFException: null
        at java.io.RandomAccessFile.readBoolean(RandomAccessFile.java:644)
        at nextflow.CacheDB.eachRecord(CacheDB.groovy:272)
        at nextflow.cli.CmdClean.cleanup(CmdClean.groovy:116)
        at nextflow.cli.CmdClean.access$0(CmdClean.groovy)
        at nextflow.cli.CmdClean$_run_closure1.doCall(CmdClean.groovy:93)
        at nextflow.cli.CmdClean$_run_closure1.call(CmdClean.groovy)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2318)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2303)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2344)
        at nextflow.cli.CmdClean.run(CmdClean.groovy:93)
        at nextflow.cli.Launcher.run(Launcher.groovy:475)
        at nextflow.cli.Launcher.main(Launcher.groovy:657)

nextflow.log

Environment

  • Nextflow version: 21.04.3 build 5560
  • Java version: openjdk version "1.8.0_161"
  • Operating system: SUSE Linux Enterprise Server 12 SP2
  • Bash version: 4.3.42(1)-release (x86_64-suse-linux-gnu)

MatteoSchiavinato avatar Jan 28 '22 12:01 MatteoSchiavinato

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 29 '22 12:06 stale[bot]

we have to look into this

pditommaso avatar Sep 21 '22 08:09 pditommaso

I tried and couldn't reproduce it.

➜  ~ NXF_VER=21.04.3 nextflow clean -f -before pedantic_heisenberg
CAPSULE: Downloading dependency org.slf4j:log4j-over-slf4j:jar:1.7.25
CAPSULE: Downloading dependency org.codehaus.groovy:groovy-xml:jar:3.0.7
CAPSULE: Downloading dependency io.nextflow:nextflow:jar:21.04.3
CAPSULE: Downloading dependency org.slf4j:slf4j-api:jar:1.7.25
CAPSULE: Downloading dependency io.nextflow:nf-commons:jar:21.04.3
CAPSULE: Downloading dependency org.jsoup:jsoup:jar:1.11.2
CAPSULE: Downloading dependency org.codehaus.groovy:groovy-templates:jar:3.0.7
CAPSULE: Downloading dependency org.codehaus.groovy:groovy-json:jar:3.0.7
CAPSULE: Downloading dependency ch.qos.logback:logback-core:jar:1.1.11
CAPSULE: Downloading dependency org.slf4j:jul-to-slf4j:jar:1.7.25
CAPSULE: Downloading dependency ch.qos.logback:logback-classic:jar:1.1.11
CAPSULE: Downloading dependency io.nextflow:nf-httpfs:jar:21.04.3
CAPSULE: Downloading dependency org.yaml:snakeyaml:jar:1.18
CAPSULE: Downloading dependency org.slf4j:jcl-over-slf4j:jar:1.7.25
CAPSULE: Downloading dependency org.codehaus.groovy:groovy-nio:jar:3.0.7
CAPSULE: Downloading dependency org.codehaus.groovy:groovy:jar:3.0.7
Removed /Users/mribeirodantas/work/b8/7c6c916a3e9701d22ddab4b30b8c03
Removed /Users/mribeirodantas/work/c8/185ae5b1426b02ef3ec44adfa818f4
Removed /Users/mribeirodantas/work/10/056cfb18a02b60dacf7b6a395d4598
Removed /Users/mribeirodantas/work/c8/d40ca0feed3aff003291255bc4974e

mribeirodantas avatar Nov 24 '22 00:11 mribeirodantas

It can be closed then

pditommaso avatar Nov 24 '22 07:11 pditommaso