Skip to content

CancellationException when running with usePipelining := true #5929

@francisdb

Description

@francisdb

sbt 1.4.0 (N/A Java 14.0.1)

steps

add this to your build.sbt

ThisBuild / usePipelining := true

run clean then test:compile

problem

First I get some compile errors:

eg

Symbol 'type ....Update' is missing from the classpath.
[error] This symbol is required by 'value ....update'.
[error] Make sure that type Update is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
[error] A full rebuild may help if 'AkkaStreamsExecutionModel.sig' was compiled against an incompatible version of ....executionFlow(initialModel, update, runtime, ShutdownEvent)

Followed by

java.util.concurrent.CancellationException
  | => wat java.base/java.util.concurrent.FutureTask.report(FutureTask.java:121)
  | => eat java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
  | => eat sbt.ConcurrentRestrictions$$anon$4.take(ConcurrentRestrictions.scala:309)
  | => eat sbt.Execute.next$1(Execute.scala:117)remental 1s
  | => uat sbt.Execute.processAll(Execute.scala:127)
  | => aat sbt.Execute.runKeep(Execute.scala:95)
  | => uat sbt.EvaluateTask$.liftedTree1$1(EvaluateTask.scala:472)
	at sbt.EvaluateTask$.run$1(EvaluateTask.scala:471)
	at sbt.EvaluateTask$.runTask(EvaluateTask.scala:494)
	at sbt.internal.Aggregation$.$anonfun$timedRun$4(Aggregation.scala:101)
	at sbt.EvaluateTask$.withStreams(EvaluateTask.scala:388)
	at sbt.internal.Aggregation$.timedRun(Aggregation.scala:99)
	at sbt.internal.Aggregation$.runTasks(Aggregation.scala:113)
	at sbt.internal.Aggregation$.$anonfun$applyTasks$1(Aggregation.scala:68)
	at sbt.Command$.$anonfun$applyEffect$2(Command.scala:145)
	at sbt.internal.Aggregation$.$anonfun$evaluatingParser$11(Aggregation.scala:227)
	at sbt.internal.Act$.$anonfun$actParser0$4(Act.scala:436)
	at sbt.Command$.process(Command.scala:189)
	at sbt.MainLoop$.$anonfun$processCommand$5(MainLoop.scala:245)
	at scala.Option.getOrElse(Option.scala:189)
	at sbt.MainLoop$.process$1(MainLoop.scala:245)
	at sbt.MainLoop$.processCommand(MainLoop.scala:269)
	at sbt.MainLoop$.$anonfun$next$5(MainLoop.scala:162)
	at sbt.State$StateOpsImpl$.runCmd$1(State.scala:286)
	at sbt.State$StateOpsImpl$.process$extension(State.scala:322)
	at sbt.MainLoop$.$anonfun$next$4(MainLoop.scala:162)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
	at sbt.MainLoop$.next(MainLoop.scala:162)
	at sbt.MainLoop$.run(MainLoop.scala:143)
	at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:118)
	at sbt.io.Using.apply(Using.scala:27)
	at sbt.MainLoop$.runWithNewLog(MainLoop.scala:111)
	at sbt.MainLoop$.runAndClearLast(MainLoop.scala:65)
	at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:50)
	at sbt.MainLoop$.runLogged(MainLoop.scala:41)
	at sbt.StandardMain$.runManaged(Main.scala:188)
	at sbt.xMain$.$anonfun$run$6(Main.scala:100)
	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
	at scala.Console$.withIn(Console.scala:230)
	at sbt.internal.util.Terminal$.withIn(Terminal.scala:540)
	at sbt.internal.util.Terminal$.$anonfun$withStreams$2(Terminal.scala:335)
	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
	at scala.Console$.withOut(Console.scala:167)
	at sbt.internal.util.Terminal$.$anonfun$withOut$2(Terminal.scala:530)
	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
	at scala.Console$.withErr(Console.scala:196)
	at sbt.internal.util.Terminal$.withOut(Terminal.scala:530)
	at sbt.internal.util.Terminal$.withStreams(Terminal.scala:335)
	at sbt.xMain$.run(Main.scala:83)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at sbt.internal.XMainConfiguration.run(XMainConfiguration.scala:83)
	at sbt.xMain.run(Main.scala:46)
	at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:111)
	at xsbt.boot.Launch$.withContextLoader(Launch.scala:130)
	at xsbt.boot.Launch$.run(Launch.scala:111)
	at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:37)
	at xsbt.boot.Launch$.launch(Launch.scala:119)
	at xsbt.boot.Launch$.apply(Launch.scala:20)
	at xsbt.boot.Boot$.runImpl(Boot.scala:56)
	at xsbt.boot.Boot$.main(Boot.scala:18)
	at xsbt.boot.Boot.main(Boot.scala)
[error] java.util.concurrent.CancellationException
[error] Use 'last' for the full log.

expectation

test:compile to succeed as before adding the setting

notes

  • compile works as expected
  • test:compile works as expected with usePipelining := false
  • we have some modules in test scope depending on the test scope of other modules (eg modulex % "compile->compile;test->compile;test->test")

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions