Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running sbt fails - java.io.IOException: No space left on device

Really stuck with this one... all im doing is running 'sbt' to get to the interactive mode so I can compile my scala program and I run into this:

java.io.IOException: No space left on device
        at java.io.FileOutputStream.close0(Native Method)
        at java.io.FileOutputStream.close(FileOutputStream.java:362)
        at java.io.FilterOutputStream.close(FilterOutputStream.java:160)
        at java.io.FilterOutputStream.close(FilterOutputStream.java:160)
        at scala.tools.nsc.backend.jvm.BytecodeWriters$ClassBytecodeWriter$class.writeClass(BytecodeWriters.scala:93)
        at scala.tools.nsc.backend.jvm.GenASM$AsmPhase$$anon$4.writeClass(GenASM.scala:67)
        at scala.tools.nsc.backend.jvm.GenASM$JBuilder.writeIfNotTooBig(GenASM.scala:459)
        at scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.genClass(GenASM.scala:1413)
        at scala.tools.nsc.backend.jvm.GenASM$AsmPhase.run(GenASM.scala:120)
        at sbt.compiler.Eval$$anonfun$compile$1$1.apply$mcV$sp(Eval.scala:177)
        at sbt.compiler.Eval$$anonfun$compile$1$1.apply(Eval.scala:177)
        at sbt.compiler.Eval$$anonfun$compile$1$1.apply(Eval.scala:177)
        at scala.reflect.internal.SymbolTable.atPhase(SymbolTable.scala:207)
        at sbt.compiler.Eval.compile$1(Eval.scala:177)
        at sbt.compiler.Eval.compileAndLoad(Eval.scala:182)
        at sbt.compiler.Eval.evalCommon(Eval.scala:152)
        at sbt.compiler.Eval.eval(Eval.scala:96)
        at sbt.EvaluateConfigurations$.evaluateDslEntry(EvaluateConfigurations.scala:177)
        at sbt.EvaluateConfigurations$$anonfun$9.apply(EvaluateConfigurations.scala:117)
        at sbt.EvaluateConfigurations$$anonfun$9.apply(EvaluateConfigurations.scala:115)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
        at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
        at scala.collection.immutable.List.foreach(List.scala:318)
        at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
        at scala.collection.AbstractTraversable.map(Traversable.scala:105)
        at sbt.EvaluateConfigurations$.evaluateSbtFile(EvaluateConfigurations.scala:115)
        at sbt.Load$.sbt$Load$$loadSettingsFile$1(Load.scala:710)
        at sbt.Load$$anonfun$sbt$Load$$memoLoadSettingsFile$1$1.apply(Load.scala:715)
        at sbt.Load$$anonfun$sbt$Load$$memoLoadSettingsFile$1$1.apply(Load.scala:714)
        at scala.Option.getOrElse(Option.scala:120)
        at sbt.Load$.sbt$Load$$memoLoadSettingsFile$1(Load.scala:714)
        ...

Followed by:

[error] java.io.IOException: No space left on device
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q

I have never run into this before and google searches have not helped.

Is it the JVM that is running out of space? What device is it referring? I tried deleting all scala related target folders (basically trying to do a manual sbt clean) but that did not help.

Any help would be greatly appreciated!!

The df results are:

1K-blocks      Used Available Use% Mounted on

10157368   1414320   8218864  15% /var
2097152     11284   2085868   1% /tmp

So its something else

like image 461
user3376961 Avatar asked Nov 09 '22 10:11

user3376961


1 Answers

You get the No space left on device error when the jvm tries to write a file. The hard drive partition that the jvm is trying to write to is probably out of free space. Since you have tried deleting folders without success, check if for example /tmp or /var is full. (I don't know where the Scala tools writes these compiled classes unfortunately, but it sounds reasonable that it would use /tmp for this).

like image 106
K Erlandsson Avatar answered Nov 14 '22 22:11

K Erlandsson