sbt / sbt-remote-control

Create and manage sbt process using unicorns and forks
Other
74 stars 14 forks source link

Some kind of race in CanLoadSimpleProject #216

Open havocp opened 9 years ago

havocp commented 9 years ago

Saved at https://gist.githubusercontent.com/havocp/3b4866ea03e4545a7e2a/raw/gistfile1.txt

Note "registered more than once?" which is from https://github.com/sbt/sbt-remote-control/blob/dde58a811bd6de1b875b5d8682c1c9514b70b1aa/server/src/main/scala/sbt/server/TaskIdRecorder.scala#L55

The logs just before the error

[info] CoreLogEvent(LogMessage(debug,> server-handle-next-server-request))
[info] ExecutionStarting(6)
[info] CoreLogEvent(LogMessage(debug,> {file:/home/travis/build/sbt/sbt-remote-control/it-runner/target/integration-test/com-typesafe-sbtrc-it-loading-CanLoadSimpleProject/scratch/test/}test/compile:unmanagedSources))
[info] CoreLogEvent(LogMessage(debug,Evaluating tasks: compile:unmanagedSources))
[info] CoreLogEvent(LogMessage(debug,Running task... Cancel: sbt.server.ServerTaskCancellation@256d06ac, check cycles: false))
[info] CoreLogEvent(LogMessage(debug,cancel strategy start enabled=true lastCommand=Some(LastCommand(CommandExecutionWork(ExecutionId(6),{file:/home/travis/build/sbt/sbt-remote-control/it-runner/target/integration-test/com-typesafe-sbtrc-it-loading-CanLoadSimpleProject/scratch/test/}test/compile:unmanagedSources,Set(LiveClient(sbt-client-test 7db84039-e1c7-41fb-8a97-692a180b1105)),sbt.server.WorkCancellationStatus$$anon$1@18d11966)))))
[info] CoreLogEvent(LogMessage(debug,cancel strategy finish enabled=false lastCommand=Some(LastCommand(CommandExecutionWork(ExecutionId(6),{file:/home/travis/build/sbt/sbt-remote-control/it-runner/target/integration-test/com-typesafe-sbtrc-it-loading-CanLoadSimpleProject/scratch/test/}test/compile:unmanagedSources,Set(LiveClient(sbt-client-test 7db84039-e1c7-41fb-8a97-692a180b1105)),sbt.server.WorkCancellationStatus$$anon$1@18d11966)))))
[info] CoreLogEvent(LogTrace(RuntimeException,registered more than once? Task((taskDefinitionKey: ScopedKey(Scope(Select(ProjectRef(file:/home/travis/build/sbt/sbt-remote-control/it-runner/target/integration-test/com-typesafe-sbtrc-it-loading-CanLoadSimpleProject/scratch/test/,test)),Select(ConfigKey(compile)),Global,Global),unmanagedSources)))))
[info] CoreLogEvent(LogMessage(error,registered more than once? Task((taskDefinitionKey: ScopedKey(Scope(Select(ProjectRef(file:/home/travis/build/sbt/sbt-remote-control/it-runner/target/integration-test/com-typesafe-sbtrc-it-loading-CanLoadSimpleProject/scratch/test/,test)),Select(ConfigKey(compile)),Global,Global),unmanagedSources)))))
[info] CoreLogEvent(LogMessage(error,Use 'last' for the full log.))
[info] CoreLogEvent(LogMessage(debug,> server-post-command-error-handler))
[info] ExecutionFailure(6)
[info] CoreLogEvent(LogMessage(debug,> server-post-command-cleanup))
[info] CoreLogEvent(LogMessage(debug,> server-handle-next-server-request))
[info] log file is /home/travis/build/sbt/sbt-remote-control/it-runner/target/integration-test/com-typesafe-sbtrc-it-loading-CanLoadSimpleProject/scratch/test/.sbtserver/connections/sbt-client-test-7db84039-e1c7-41fb-8a97-692a180b1105.log, you can uncomment some code in SbtClientTest.scala to dump this if you need to
[info] ClosedEvent()
[info] Not executing runnable because we only run one thing: Runnable(onError(reconnecting=true, Connection closed))
[error] Test failed: java.lang.RuntimeException: Never received watch task key first value
[info] Waiting for client to close
[error] java.lang.RuntimeException: Never received watch task key first value
[info] log file is /home/travis/build/sbt/sbt-remote-control/it-runner/target/integration-test/com-typesafe-sbtrc-it-loading-CanLoadSimpleProject/scratch/test/.sbtserver/master.log, you can uncomment some code in SbtClientTest.scala to dump this if you need to
[error]    at scala.sys.package$.error(package.scala:27)
[error]    at com.typesafe.sbtrc.it.SbtClientTest$class.waitWithError(SbtClientTest.scala:33)
[error]    at com.typesafe.sbtrc.it.loading.CanLoadSimpleProject.waitWithError(CanLoadSimpleProject.scala:15)
[error]    at com.typesafe.sbtrc.it.loading.CanLoadSimpleProject$$anonfun$1.apply(CanLoadSimpleProject.scala:172)
[error]    at com.typesafe.sbtrc.it.loading.CanLoadSimpleProject$$anonfun$1.apply(CanLoadSimpleProject.scala:40)
[error]    at com.typesafe.sbtrc.it.SbtClientTest$$anonfun$8.apply(SbtClientTest.scala:187)
[error]    at com.typesafe.sbtrc.it.SbtClientTest$$anonfun$8.apply(SbtClientTest.scala:161)
[error]    at sbt.client.impl.SimpleConnector$OpenListener$$anon$2.run(SimpleConnector.scala:152)
[error]    at com.typesafe.sbtrc.it.SbtClientTest$runOneThingExecutor$2$.runWhenReady(SbtClientTest.scala:144)
[error]    at com.typesafe.sbtrc.it.SbtClientTest$class.withSbt(SbtClientTest.scala:216)
[error]    at com.typesafe.sbtrc.it.loading.CanLoadSimpleProject.withSbt(CanLoadSimpleProject.scala:15)
[error]    at com.typesafe.sbtrc.it.loading.CanLoadSimpleProject.delayedEndpoint$com$typesafe$sbtrc$it$loading$CanLoadSimpleProject$1(CanLoadSimpleProject.scala:40)
[error]    at com.typesafe.sbtrc.it.loading.CanLoadSimpleProject$delayedInit$body.apply(CanLoadSimpleProject.scala:15)
[error]    at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
[error]    at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
[error]    at com.typesafe.sbtrc.it.IntegrationTest$$anonfun$run$1.apply(IntegrationTest.scala:32)
[error]    at com.typesafe.sbtrc.it.IntegrationTest$$anonfun$run$1.apply(IntegrationTest.scala:29)
[error]    at com.typesafe.sbtrc.it.package$.withContextClassloader(package.scala:12)
[error]    at com.typesafe.sbtrc.it.IntegrationTest.run(IntegrationTest.scala:29)
[error]    at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error]    at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error]    at xsbt.boot.Launch$.run(Launch.scala:109)
[error]    at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error]    at xsbt.boot.Launch$.launch(Launch.scala:117)
[error]    at xsbt.boot.Launch$.apply(Launch.scala:18)
[error]    at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error]    at xsbt.boot.Boot$.main(Boot.scala:17)
[error]    at xsbt.boot.Boot.main(Boot.scala)
[error]  [IT] com.typesafe.sbtrc.it.loading.CanLoadSimpleProject result: FAILURE