Heads up:
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
Update: July 26, 2019
This section of the forum is now closed; we are working on a new support model for WDL that we will share here shortly. For Cromwell-specific issues, see the Cromwell docs and post questions on Github.
This section of the forum is now closed; we are working on a new support model for WDL that we will share here shortly. For Cromwell-specific issues, see the Cromwell docs and post questions on Github.
Crashing wdltools

Hi all,
Somehow I've been able to create a workflow that crashes wdltools
when you try to validate it. I'm not sure I like what that says about my coding, but I have been able to boil it down to the minimal example shown below.
It crashes every action of wdltools
, with the exception of parse
.
The file crash_wdltool.wdl
import "report.wdl" as report workflow wf { String user call report.makeReport as Report { input: user = user } output { File report = Report.report } }
The file report.wdl
workflow makeReport { String user call Report { input: user = user } output { File report = Report.report } }
When I try to validate is using wdltool version 0.10
$ wdltool validate crash_wdltool.wdl Exception in thread "main" java.lang.StackOverflowError at scala.collection.immutable.List$.newBuilder(List.scala:450) at scala.collection.generic.GenericTraversableTemplate.genericBuilder(GenericTraversableTemplate.scala:70) at scala.collection.generic.GenericTraversableTemplate.genericBuilder$(GenericTraversableTemplate.scala:70) at scala.collection.AbstractTraversable.genericBuilder(Traversable.scala:104) at scala.collection.generic.GenTraversableFactory$GenericCanBuildFrom.apply(GenTraversableFactory.scala:57) at scala.collection.generic.GenTraversableFactory$GenericCanBuildFrom.apply(GenTraversableFactory.scala:52) at scala.collection.TraversableLike.collect(TraversableLike.scala:270) at scala.collection.TraversableLike.collect$(TraversableLike.scala:269) at scala.collection.immutable.List.collect(List.scala:313) at wdl4s.Scope.resolveVariable(Scope.scala:159) at wdl4s.Scope.resolveVariable$(Scope.scala:153) at wdl4s.WorkflowOutput.resolveVariable(WorkflowOutput.scala:16) at wdl4s.WdlNamespace$.lookupType(WdlNamespace.scala:438) at wdl4s.WdlNamespace$.$anonfun$typeCheckDeclaration$2(WdlNamespace.scala:453) at wdl4s.expression.TypeEvaluator.$anonfun$evaluate$1(TypeEvaluator.scala:16) at scala.util.Try$.apply(Try.scala:209) at wdl4s.expression.TypeEvaluator.evaluate(TypeEvaluator.scala:16) at wdl4s.expression.TypeEvaluator.evaluate(TypeEvaluator.scala:75) at wdl4s.expression.TypeEvaluator.$anonfun$evaluate$41(TypeEvaluator.scala:80) at scala.Option.map(Option.scala:146) at wdl4s.expression.TypeEvaluator.$anonfun$evaluate$39(TypeEvaluator.scala:79) at scala.util.Success.flatMap(Try.scala:247) at wdl4s.expression.TypeEvaluator.evaluate(TypeEvaluator.scala:75) at wdl4s.expression.TypeEvaluator.$anonfun$evaluate$41(TypeEvaluator.scala:80) at scala.Option.map(Option.scala:146) at wdl4s.expression.TypeEvaluator.$anonfun$evaluate$39(TypeEvaluator.scala:79) at scala.util.Success.flatMap(Try.scala:247) at wdl4s.expression.TypeEvaluator.evaluate(TypeEvaluator.scala:75) at wdl4s.expression.TypeEvaluator.$anonfun$evaluate$41(TypeEvaluator.scala:80) at scala.Option.map(Option.scala:146) at wdl4s.expression.TypeEvaluator.$anonfun$evaluate$39(TypeEvaluator.scala:79) at scala.util.Success.flatMap(Try.scala:247) at wdl4s.expression.TypeEvaluator.evaluate(TypeEvaluator.scala:75) at wdl4s.expression.TypeEvaluator.$anonfun$evaluate$41(TypeEvaluator.scala:80) at scala.Option.map(Option.scala:146) at wdl4s.expression.TypeEvaluator.$anonfun$evaluate$39(TypeEvaluator.scala:79) at scala.util.Success.flatMap(Try.scala:247) at wdl4s.expression.TypeEvaluator.evaluate(TypeEvaluator.scala:75) at wdl4s.expression.TypeEvaluator.$anonfun$evaluate$41(TypeEvaluator.scala:80) at scala.Option.map(Option.scala:146) at wdl4s.expression.TypeEvaluator.$anonfun$evaluate$39(TypeEvaluator.scala:79) at scala.util.Success.flatMap(Try.scala:247) at wdl4s.expression.TypeEvaluator.evaluate(TypeEvaluator.scala:75) <SNIPPED REST OF THE OUTPUT>
Tagged:
Answers
I should add, to fix it you need to change the workflow output for
makeReport
to any other filename, as long as it isn'treport
.I tried validating the exact files you present here using the wdltool-0.10.jar release jar and got back an error that reads:
```
ERROR: Call references a task (Report) that doesn't exist (line 4, col 10)
``
In terms of why wdltool isn't reporting back anything, based on your stacktrace it seems like you tried running the command:
$ wdltool validate crash_wdltool.wdl
but could you please try `$ java -jar <wdltool.jar> validate crash_wdltool.wdl instead?My mistake, I did not include the full
report.wdl
file in my pasteThe
wdtool
command is just a wrapper that calls thewdltool.jar
file.I found a second wdl that causes wdltool problems, here it just prints
null
when youvalidate
it, and crashes when you callgraph
.Thanks for these reports @Redmar_van_den_Berg!
I just tried these out myself. I can reproduce what you're seeing with
null.wdl
and agree that the error reporting could be improved (you should be getting a "no such variable" exception). I've raised this as an issue you can track in the WDL4S repo: https://github.com/broadinstitute/wdl4s/issues/112When I tried your makeReport example I couldn't recreate the problem (I'm using wdltool 0.11):
I'm still using wdltool 0.10, that is the latest release that is available on the github page https://github.com/broadinstitute/wdltool/releases. Is 0.11 still in beta or should I download wdltool from somewhere else?
My mistake. 0.11 is the current development branch. Having said that, there's been no code changes to the project since 0.10 was released so it should be functionally identical. When you run your test, is it against the importing version or the all-in-one version of your workflow?
My success was with the all-in-one workflow.
@ChrisL
The all in one workflow works here as well, but the code that has
import "report.wdl" as report
does not validate and crashes wdltool.