Closed neurolabs closed 9 years ago
Thanks for the report, but unfortunately I can't figure out what causes it from the output. Sometimes there are Linter classes mentioned at the bottom of the stacktrace -- if there are any, please post them.
I will think about adding file exclude patterns in the future, for projects which have autogenerated code, or other code they'd prefer not to check. Also, Linter should catch all its own exceptions, and only issue a "please report this bug" kind of warning -- crashing the build is not acceptable, and I'm sorry about that.
Sorry, no more info in the output. Can I use debug flags to turn up verbosity?
An exclude pattern would indeed be a nice workaround, as well as making the checks configurable.
Thanks for your work.
I don't think there are extra verbosity flags - the above crash output is generated by the Scala compiler itself.
I'll try to do the workarounds over the weekend, and leifwickland is working on making the checks configurable.
Oh my, I'm really sorry... I promised the workaround 6 months ago!
If you're still working on this project and are interested, you can test if it works now, otherwise please close the ticket, because I can't reproduce the issue.
Since then, we've upgraded to play 2.2.
Tried 0.1-SNAPSHOT, and can't reproduce the issue.
But compiling our tests hasn't finished yet, probably not a dead/livelock. Exemplary Thread Dump:
Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode):
"pool-15-thread-8" prio=10 tid=0x00007f43c47fa800 nid=0x7996 runnable [0x00007f43aae38000]
java.lang.Thread.State: RUNNABLE
at java.security.AccessController.doPrivileged(Native Method)
at java.io.PrintWriter.
"Scala Presentation Compiler []" daemon prio=10 tid=0x00007f437411a000 nid=0x7907 in Object.wait() [0x00007f43a9bec000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method)
"Scala Presentation Compiler []" daemon prio=10 tid=0x00007f4374115000 nid=0x7810 in Object.wait() [0x00007f43aaa54000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method)
"Scala Presentation Compiler []" daemon prio=10 tid=0x00007f43740cd000 nid=0x76fe in Object.wait() [0x00007f43aa476000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method)
"Service Thread" daemon prio=10 tid=0x00007f43c415e800 nid=0x7691 runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE
"C2 CompilerThread1" daemon prio=10 tid=0x00007f43c415c000 nid=0x7690 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" daemon prio=10 tid=0x00007f43c4159000 nid=0x768f waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=10 tid=0x00007f43c414f000 nid=0x768e waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=10 tid=0x00007f43c4137000 nid=0x768d in Object.wait() [0x00007f43abefd000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method)
"Reference Handler" daemon prio=10 tid=0x00007f43c4133000 nid=0x768c in Object.wait() [0x00007f43abffe000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method)
"main" prio=10 tid=0x00007f43c4009800 nid=0x7686 waiting on condition [0x00007f43c95b5000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method)
"VM Thread" prio=10 tid=0x00007f43c4130800 nid=0x768b runnable
"GC task thread#0 (ParallelGC)" prio=10 tid=0x00007f43c401f800 nid=0x7687 runnable
"GC task thread#1 (ParallelGC)" prio=10 tid=0x00007f43c4021800 nid=0x7688 runnable
"GC task thread#2 (ParallelGC)" prio=10 tid=0x00007f43c4023000 nid=0x7689 runnable
"GC task thread#3 (ParallelGC)" prio=10 tid=0x00007f43c4025000 nid=0x768a runnable
"VM Periodic Task Thread" prio=10 tid=0x00007f43c4169000 nid=0x7692 waiting on condition
JNI global references: 214
Heap PSYoungGen total 349184K, used 83897K [0x00000000eaa80000, 0x0000000100000000, 0x0000000100000000) eden space 348672K, 24% used [0x00000000eaa80000,0x00000000efc5e658,0x00000000fff00000) from space 512K, 12% used [0x00000000fff00000,0x00000000fff10000,0x00000000fff80000) to space 512K, 0% used [0x00000000fff80000,0x00000000fff80000,0x0000000100000000) ParOldGen total 699392K, used 602099K [0x00000000bff80000, 0x00000000eaa80000, 0x00000000eaa80000) object space 699392K, 86% used [0x00000000bff80000,0x00000000e4b7cef8,0x00000000eaa80000) PSPermGen total 206336K, used 104319K [0x00000000aff80000, 0x00000000bc900000, 0x00000000bff80000) object space 206336K, 50% used [0x00000000aff80000,0x00000000b655fc98,0x00000000bc900000)
I've pushed a small possible fix. I'm guessing that the same part of the tree was being traversed over and over. Another thing that might fix this is increasing the stack size (-J-Xss switch for the play command).
Do you perhaps know of any large play projects on github? I'll try finding and experimenting on a few, and hopefully reproduce the issue.
I've pushed a small possible fix. I'm guessing that the same part of the tree was being traversed over and over.
Still happening with current master (a2784f0c45a8834452cc88e2bdbcdfd8f0bf739e)
Another thing that might fix this is increasing the stack size (-J-Xss switch for the play command).
Tried it with Xss16M, no dice.
Do you perhaps know of any large play projects on github? I'll try finding and experimenting on a few, and hopefully reproduce the issue.
Nope, sorry. But I can run a debug version and interpret the output.
Works in version 0.1.9 with play 2.3.4
I tried your project in our play app (2.1.1, scala 2.10) and am getting a StackOverflowError when compiling, specifically on the generated reverse routes.
The relevant output:
[error] [error] while compiling: something/routesreverseRouting.scala [error] during phase: linter-typed [error] library version: version 2.10.2 [error] compiler version: version 2.10.2 [error] reconstructed args: -encoding utf8 -deprecation -feature -bootclasspath something -Xplugin:lib/linter.jar [error] [error] last tree to typer: Select(This(package txt), foo) [error] symbol: object foo in package txt (flags: )
[error] symbol definition: object foo
[error] tpe: views.txt.foo.type
[error] symbol owners: object foo -> package txt
[error] context owners: method readResolve -> object foo -> package txt
[error]
[error] == Enclosing template or block ==
[error]
[error] DefDef( // private def readResolve(): Object in object foo
[error] private
[error] "readResolve"
[error] []
[error] List(Nil)
[error] // tree.tpe=Object
[error] txt.this."foo" // object foo in package txt, tree.tpe=views.txt.foo.type
[error] )
[error]
[error] == Expanded type of tree ==
[error]
[error] TypeRef(
[error] TypeSymbol(
[error] class foo extends BaseScalaTemplate[play.api.templates.Txt,play.templates.Format[play.api.templates.Txt]] with Template4[Option[String],Option[String],Boolean,util.EnhancedRequest[ ],play.api.templates.Txt]
[error]
[error] ) [error] ) [error] [error] uncaught exception during compilation: java.lang.StackOverflowError error java.lang.StackOverflowError