VirtusLab / scala-cli

Scala CLI is a command-line tool to interact with the Scala language. It lets you compile, run, test, and package your Scala code (and more!)
https://scala-cli.virtuslab.org
Apache License 2.0
541 stars 128 forks source link

bloop.rifle.FailedToStartServerExitCodeException (perhaps due to confusion about which JDK to run?) #2451

Open bjornregnell opened 11 months ago

bjornregnell commented 11 months ago

Version(s) Scala CLI 1.0.4 Scala 3.3.0

Describe the bug When scala-cli run . it craches:

"bloop.rifle.FailedToStartServerExitCodeException: Server failed with exit code 1
  bloop.rifle.internal.Operations$.$anonfun$startServer$8(Operations.scala:263)
  bloop.rifle.BloopRifleLogger.$anonfun$runnable$1(BloopRifleLogger.scala:14)
  java.base@17.0.6/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
  java.base@17.0.6/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
  java.base@17.0.6/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
  java.base@17.0.6/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
  java.base@17.0.6/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
  java.base@17.0.6/java.lang.Thread.run(Thread.java:833)
  com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
  com.oracle.svm.core.windows.WindowsPlatformThreads.osThreadStartRoutine(WindowsPlatformThreads.java:178)"

To Reproduce

It was reproducible on the machine of a student of mine before we fixed it with this workaround:

scala-cli clean .
scala-cli run . --jvm 17

Prior to that it did not work with --jvm system and now I'm unsure if it can be reproduced.

A lot of thing was happening on the machine to try to fix it, including cs uninstall --all, nuking caches etc. But nothing helped until --jvm 17

It seems as if perhaps scala-cli picked up the system jvm but bloop couldn't, but I'm not sure.

Expected behaviour It should not crash and bloop should use the same JDK as scala-cli (if that was the actual problem).

bjornregnell commented 11 months ago

Perhaps related to https://github.com/oyvindberg/bleep/issues/355

JD557 commented 10 months ago

I'm getting a similar issue on CI:

Redacted logs:

cd examples/release
ls | grep .scala | xargs scala-cli compile
[...]
shell: /usr/bin/bash -e {0}
env:
  CI: true
  JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/8.0.382-5/x64
[...]
Error: Exception in thread "main" bloop.rifle.FailedToStartServerExitCodeException: Server failed with exit code 1
    at bloop.rifle.internal.Operations$.$anonfun$startServer$8(Operations.scala:263)
    at bloop.rifle.BloopRifleLogger.$anonfun$runnable$1(BloopRifleLogger.scala:14)
    at java.base@17.0.6/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base@17.0.6/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
    at java.base@17.0.6/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
    at java.base@17.0.6/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base@17.0.6/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base@17.0.6/java.lang.Thread.run(Thread.java:833)
    at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
    at com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203)
Error: Process completed with exit code 123.

So it seems that bloop is trying to run with Java 17, even though the Java home points to Java 8?

SethTisue commented 10 months ago

fwiw, this happens to me rather often on our Jenkins instance at scala-ci.typesafe.com — I have been sadly lax about reporting it or trying to troubleshoot it, sorry about that

here's an example log where it happened: https://scala-ci.typesafe.com/job/scala-2.13.x-jdk8-integrate-community-build/5801/console

our Jenkins workers routinely use different JDK versions ranging from 8 to 22, so it's quite plausible to me that it's related to running multiple JDKs on the same machine

I do not know how to force it to happen, and I wish I had some insight into conditions under which it tends to happen, but I don't

if there's some sort of troubleshooting I could do or diagnostic options I could enable to get more information about it, I'm happy to try to assist

also interested in workaround information — I guess I could try the --jvm 17 thing

SethTisue commented 10 months ago

Oh, I've been running with --bloop-jvm 17 for a long time now and that hasn't fixed it. Not sure whether to take that out

tgodzik commented 10 months ago

We'll take a look! The team is out until 4th though, so we will dig in then

tgodzik commented 10 months ago

I think the issue might happen if JAVA_HOME is set to a version lower than 17. We removed the support for running Bloop on lower versions, which is why this is breaking in some CIs. Previously, it might break from time to time as it would use less reliable sockets. At least I think that's the issue.

bjornregnell commented 10 months ago

Nice that you have a lead to investigate. Even if 17 is required I still think it should not crash with a strange error msg - at least it should be detected and explained to the user. But best of course if it can work regardless of if it is 17 or 11 or 8.

Squaess commented 10 months ago

I had the same issue. Following the comment above I looked at my JAVA_HOME env variable. It was pointing to java8. I switched to java17 and it started to work.

yadavan88 commented 10 months ago

I have the same problem. I am using the JDK 11 and getting this error. image

In JDK 17 it works fine, but since we are still on 11 in prod, I need to continue using 11.

holmsander commented 9 months ago

I have the same problem but running java 17. Has anyone found a fix that isn't updating to java 17?

yadavan88 commented 9 months ago

@holmsander For me the issue got resolved after upgrading scala-cli to 1.0.6. Did you try that?

holmsander commented 9 months ago

@yadavan88 yes I did try that. But It just started working after restarting my computer. This might fix it for some, but it should be noted I tried everything in this thread as well as updating java to 17.0.9 before restarting. So not sure if it is a combination of all these things or just the restart.

MaciejG604 commented 8 months ago

Well, if anyone can still reproduce this issue, could you please apply -v -v -v to the command you're using? E.g. scala-cli run MyApp.scala -v -v -v Maybe the full logs can point us in the right direction, since I can't reproduce this locally, no matter what the combination of my JVM is.

bjornregnell commented 8 months ago

I have just asked my students in our Discord if anyone still can reproduce this. The original problem was solved on that machine by re-install, after cleaning all relevant dot-files also in home and then using--jvm 17. If anyone can reproduce it I'll urge to send -v -v -v output here. (But it was a while ago now that it happened, so it might not happen...)

SethTisue commented 8 months ago

I am still seeing occasional FailedToStartServerExitCodeExceptions on the Scala 2 community build Jenkins, even on scala-cli 1.1.0.

I've just added -v -v -v to the script in question in the hopes of gathering some information on this in the coming days/weeks. (It seems to fail, idk, maybe 5% of the time, something like that.)

tgodzik commented 8 months ago

Thanks! It would be awesome figure that out, though I need to work through my backlog of bloop tech debt to probably fix this

AyaDiy commented 8 months ago

I still get this issue every now and then. The last time I encountered this issue I applied the following command, as suggested:

scala-cli run MyApp.scala -v -v -v

And here's the output that I got:

PS C:\Users\ayadi\workspace\Test> scala-cli run MyApp.scala -v -v -v
Checking for a running Bloop server at C:\Users\ayadi\AppData\Local\ScalaCli\data\bloop\daemon ...
Attempting to connect to Bloop server C:\Users\ayadi\AppData\Local\ScalaCli\data\bloop\daemon ...
Connection attempt result: None
Checking for a running Bloop server at C:\Users\ayadi\AppData\Local\ScalaCli\data\bloop\daemon ...
Attempting to connect to Bloop server C:\Users\ayadi\AppData\Local\ScalaCli\data\bloop\daemon ...
Connection attempt result: None
Bloop daemon status: not running
Starting compilation server
Starting Bloop 1.5.9-sc-1 at C:\Users\ayadi\AppData\Local\ScalaCli\data\bloop\daemon using JVM C:\Program Files (x86)\Eclipse Adoptium\jdk-17.0.8.7-hotspot\bin\java.exe
Fetching List(Dependency(io.github.alexarchambault.bleep:bloop-frontend_2.12, 1.5.9-sc-1, Configuration(), Set(), Publication(, Type(), Extension(), Classifier()), false, true))
Found 113 artifacts:
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\github\alexarchambault\bleep\bloop-frontend_2.12\1.5.9-sc-1\bloop-frontend_2.12-1.5.9-sc-1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\ch\epfl\scala\bloop-config_2.12\1.5.5\bloop-config_2.12-1.5.5.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\github\alexarchambault\case-app_2.12\2.0.6\case-app_2.12-2.0.6.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\github\alexarchambault\libdaemon\libdaemon_2.12\0.0.11\libdaemon_2.12-0.0.11.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\ch\qos\logback\logback-classic\1.4.6\logback-classic-1.4.6.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\ch\epfl\scala\scala-debug-adapter_2.12\3.1.3\scala-debug-adapter_2.12-3.1.3.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-lang\scala-library\2.12.18\scala-library-2.12.18.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\github\alexarchambault\bleep\bloop-backend_2.12\1.5.9-sc-1\bloop-backend_2.12-1.5.9-sc-1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\github\plokhotnyuk\jsoniter-scala\jsoniter-scala-core_2.12\2.13.3.2\jsoniter-scala-core_2.12-2.13.3.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\github\alexarchambault\case-app-annotations_2.12\2.0.6\case-app-annotations_2.12-2.0.6.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\github\alexarchambault\case-app-util_2.12\2.0.6\case-app-util_2.12-2.0.6.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\ch\qos\logback\logback-core\1.4.6\logback-core-1.4.6.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\slf4j\slf4j-api\2.0.6\slf4j-api-2.0.6.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\ch\epfl\scala\com-microsoft-java-debug-core\0.34.0%2B19\com-microsoft-java-debug-core-0.34.0%2B19.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-lang\scala-reflect\2.12.18\scala-reflect-2.12.18.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\ow2\asm\asm\9.5\asm-9.5.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\ow2\asm\asm-util\9.5\asm-util-9.5.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\test-agent\1.9.2\test-agent-1.9.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-lang\modules\scala-collection-compat_2.12\2.10.0\scala-collection-compat_2.12-2.10.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\zipkin\brave\brave\5.16.0\brave-5.16.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\googlecode\java-diff-utils\diffutils\1.3.0\diffutils-1.3.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\ch\epfl\scala\directory-watcher\0.8.0%2B6-f651bd93\directory-watcher-0.8.0%2B6-f651bd93.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\librarymanagement-ivy_2.12\1.9.1\librarymanagement-ivy_2.12-1.9.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\monix\monix_2.12\3.2.0\monix_2.12-3.2.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\github\alexarchambault\bleep\nailgun-server\1.0.7\nailgun-server-1.0.7.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\lihaoyi\pprint_2.12\0.8.1\pprint_2.12-0.8.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scalaz\scalaz-core_2.12\7.3.7\scalaz-core_2.12-7.3.7.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\lihaoyi\sourcecode_2.12\0.3.0\sourcecode_2.12-0.3.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\zipkin\reporter2\zipkin-sender-urlconnection\2.16.4\zipkin-sender-urlconnection-2.16.4.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\zeroturnaround\zt-zip\1.15\zt-zip-1.15.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\github\alexarchambault\bleep\bloop-shared_2.12\1.5.9-sc-1\bloop-shared_2.12-1.5.9-sc-1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\chuusai\shapeless_2.12\2.3.3\shapeless_2.12-2.3.3.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\apache\commons\commons-lang3\3.12.0\commons-lang3-3.12.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\google\code\gson\gson\2.10.1\gson-2.10.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\reactivex\rxjava2\rxjava\2.2.21\rxjava-2.2.21.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\reactivestreams\reactive-streams\1.0.4\reactive-streams-1.0.4.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\commons-io\commons-io\2.12.0\commons-io-2.12.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\ow2\asm\asm-tree\9.5\asm-tree-9.5.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\ow2\asm\asm-analysis\9.5\asm-analysis-9.5.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\test-interface\1.0\test-interface-1.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\zipkin\reporter2\zipkin-reporter-brave\2.16.3\zipkin-reporter-brave-2.16.3.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\net\java\dev\jna\jna\5.13.0\jna-5.13.0.jar  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\librarymanagement-core_2.12\1.9.1\librarymanagement-core_2.12-1.9.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\eed3si9n\sjson-new-core_2.12\0.9.1\sjson-new-core_2.12-0.9.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\ivy\ivy\2.3.0-sbt-a8f9eb5bf09d0539ea3658a2c2d4e09755b5133e\ivy-2.3.0-sbt-a8f9eb5bf09d0539ea3658a2c2d4e09755b5133e.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\monix\monix-execution_2.12\3.2.0\monix-execution_2.12-3.2.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\monix\monix-catnap_2.12\3.2.0\monix-catnap_2.12-3.2.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\monix\monix-eval_2.12\3.2.0\monix-eval_2.12-3.2.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\monix\monix-tail_2.12\3.2.0\monix-tail_2.12-3.2.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\monix\monix-reactive_2.12\3.2.0\monix-reactive_2.12-3.2.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\monix\monix-java_2.12\3.2.0\monix-java_2.12-3.2.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\net\java\dev\jna\jna-platform\5.13.0\jna-platform-5.13.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\lihaoyi\fansi_2.12\0.4.0\fansi_2.12-0.4.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\zipkin\reporter2\zipkin-reporter\2.16.4\zipkin-reporter-2.16.4.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\ch\epfl\scala\bsp4s_2.12\2.1.0-M5\bsp4s_2.12-2.1.0-M5.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\get-coursier\interface\1.0.13\interface-1.0.13.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\apache\logging\log4j\log4j-core\2.20.0\log4j-core-2.20.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\net\jpountz\lz4\lz4\1.3.0\lz4-1.3.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\zinc_2.12\1.9.2\zinc_2.12-1.9.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\typelevel\macro-compat_2.12\1.1.1\macro-compat_2.12-1.1.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-lang\scala-compiler\2.12.18\scala-compiler-2.12.18.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\jcraft\jsch\0.1.54\jsch-0.1.54.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\launcher-interface\1.4.2\launcher-interface-1.4.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\eed3si9n\gigahorse-apache-http_2.12\0.7.0\gigahorse-apache-http_2.12-0.7.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-lang\modules\scala-xml_2.12\2.1.0\scala-xml_2.12-2.1.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\io_2.12\1.9.1\io_2.12-1.9.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\util-logging_2.12\1.9.1\util-logging_2.12-1.9.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\util-position_2.12\1.9.1\util-position_2.12-1.9.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\util-cache_2.12\1.9.1\util-cache_2.12-1.9.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\monix\implicitbox_2.12\0.2.0\implicitbox_2.12-0.2.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\jctools\jctools-core\2.1.2\jctools-core-2.1.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\typelevel\cats-effect_2.12\2.1.3\cats-effect_2.12-2.1.3.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\zipkin\zipkin2\zipkin\2.23.2\zipkin-2.23.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\me\vican\jorge\jsonrpc4s_2.12\0.1.0\jsonrpc4s_2.12-0.1.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\apache\logging\log4j\log4j-api\2.20.0\log4j-api-2.20.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\zinc-core_2.12\1.9.2\zinc-core_2.12-1.9.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\zinc-persist_2.12\1.9.2\zinc-persist_2.12-1.9.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\zinc-compile-core_2.12\1.9.2\zinc-compile-core_2.12-1.9.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\zinc-classfile_2.12\1.9.2\zinc-classfile_2.12-1.9.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\eed3si9n\gigahorse-core_2.12\0.7.0\gigahorse-core_2.12-0.7.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\eed3si9n\shaded-apache-httpasyncclient\0.7.0\shaded-apache-httpasyncclient-0.7.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\swoval\file-tree-views\2.1.10\file-tree-views-2.1.10.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\util-interface\1.9.1\util-interface-1.9.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\collections_2.12\1.9.1\collections_2.12-1.9.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\core-macros_2.12\1.9.1\core-macros_2.12-1.9.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\jline\jline\2.14.7-sbt-a1b0ffbb8f64bb820f4f84a0c07a0c0964507493\jline-2.14.7-sbt-a1b0ffbb8f64bb820f4f84a0c07a0c0964507493.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\jline\jline-terminal\3.19.0\jline-terminal-3.19.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\jline\jline-terminal-jna\3.19.0\jline-terminal-jna-3.19.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\jline\jline-terminal-jansi\3.19.0\jline-terminal-jansi-3.19.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\lmax\disruptor\3.4.2\disruptor-3.4.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\eed3si9n\sjson-new-scalajson_2.12\0.9.1\sjson-new-scalajson_2.12-0.9.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\eed3si9n\sjson-new-murmurhash_2.12\0.9.1\sjson-new-murmurhash_2.12-0.9.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\typelevel\cats-core_2.12\2.1.1\cats-core_2.12-2.1.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\outr\scribe_2.12\3.5.5\scribe_2.12-3.5.5.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\zinc-apiinfo_2.12\1.9.2\zinc-apiinfo_2.12-1.9.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\zinc-classpath_2.12\1.9.2\zinc-classpath_2.12-1.9.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\compiler-interface\1.9.2\compiler-interface-1.9.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\zinc-persist-core-assembly\1.9.2\zinc-persist-core-assembly-1.9.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\util-relation_2.12\1.9.1\util-relation_2.12-1.9.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\sbinary_2.12\0.5.1\sbinary_2.12-0.5.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-lang\modules\scala-parser-combinators_2.12\1.1.2\scala-parser-combinators_2.12-1.1.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\net\openhft\zero-allocation-hashing\0.10.1\zero-allocation-hashing-0.10.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\util-control_2.12\1.9.1\util-control_2.12-1.9.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\typesafe\ssl-config-core_2.12\0.6.1\ssl-config-core_2.12-0.6.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\fusesource\jansi\jansi\2.1.0\jansi-2.1.0.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\eed3si9n\shaded-jawn-parser_2.12\0.9.1\shaded-jawn-parser_2.12-0.9.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\eed3si9n\shaded-scalajson_2.12\1.0.0-M4\shaded-scalajson_2.12-1.0.0-M4.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\typelevel\cats-macros_2.12\2.1.1\cats-macros_2.12-2.1.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\typelevel\cats-kernel_2.12\2.1.1\cats-kernel_2.12-2.1.1.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\outr\perfolation_2.12\1.2.8\perfolation_2.12-1.2.8.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\outr\moduload_2.12\1.1.5\moduload_2.12-1.1.5.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\scala-sbt\compiler-bridge_2.12\1.9.2\compiler-bridge_2.12-1.9.2.jar
  C:\Users\ayadi\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\com\typesafe\config\1.4.2\config-1.4.2.jar
Checking for a running Bloop server at C:\Users\ayadi\AppData\Local\ScalaCli\data\bloop\daemon ...
Attempting to connect to Bloop server C:\Users\ayadi\AppData\Local\ScalaCli\data\bloop\daemon ...
Error occurred during initialization of VM
Option -XX:+UseZGC not supported
Connection attempt result: None
Bloop server exited with code 1
Running
  C:\Program Files\scala-cli-x86_64-pc-win32\scala-cli.exe bloop output
might give more details.
Exception in thread "main" bloop.rifle.FailedToStartServerExitCodeException: Server failed with exit code 1
        at bloop.rifle.internal.Operations$.$anonfun$startServer$8(Operations.scala:263)
        at bloop.rifle.BloopRifleLogger.$anonfun$runnable$1(BloopRifleLogger.scala:14)
        at java.base@17.0.6/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
        at java.base@17.0.6/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
        at java.base@17.0.6/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
        at java.base@17.0.6/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base@17.0.6/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base@17.0.6/java.lang.Thread.run(Thread.java:833)
        at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775)
        at com.oracle.svm.core.windows.WindowsPlatformThreads.osThreadStartRoutine(WindowsPlatformThreads.java:178)
tgodzik commented 8 months ago

That looks super weird:

Error occurred during initialization of VM
Option -XX:+UseZGC not supported

looks like we still somehow pick up the wrong version of Java, but how would that be possible :/

@yadavan88 do you even have an older Java installed? Is it in you JAVA_HOME perhaps?

Alternatively, we should retry without the gc option.

bjornregnell commented 8 months ago

Alternatively, we should retry without the gc option.

It seems reasonable to try to recover from this error by tweaking the options, if nothing else helps.

JD557 commented 8 months ago

Could it be this: https://wiki.openjdk.org/display/zgc/Main#Main-SupportedPlatforms

Requires Windows version 1803 (Windows 10 or Windows Server 2019) or later.

yadavan88 commented 8 months ago

That looks super weird:

Error occurred during initialization of VM
Option -XX:+UseZGC not supported

looks like we still somehow pick up the wrong version of Java, but how would that be possible :/

@yadavan88 do you even have an older Java installed? Is it in you JAVA_HOME perhaps?

Alternatively, we should retry without the gc option.

For me, the issue got resolved once i upgraded to 1.1.0. My exact version info are as below:

OS - Mac 14
Java: AdoptOpenJDK-11.0.11+9
Scala-cli: 1.1.0
tgodzik commented 8 months ago

Ach sorry to ping you, I meant @AyaDiy . I hoped that Github would suggest the newest user and I haven't checked.

So two more questions to @AyaDiy:

What is the Java version you are using or have in JAVA_HOME ?

Requires Windows version 1803 (Windows 10 or Windows Server 2019) or later.

Could it be that you have an older Windows and that's why the particular GC option is not working?

bjornregnell commented 8 months ago

@AyaDiy I think you can see JAVA_HOME by opening the cmd terminal i Windows (press windows button and type cmd and press enter) and the type this (note the trailing %):

echo %JAVA_HOME%

What is then printed in the terminal?

bjornregnell commented 8 months ago

@AyaDiy And you can find your windows version with this command in cmd:

systeminfo | findstr /B /C:"OS Name" /C:"OS Version"

What does it print?

AyaDiy commented 8 months ago

It seems to be the right version.

Skärmbild 2023-12-18 221018
SethTisue commented 7 months ago

On my MacOS 14 laptop recently, bloop would not start. The problem persisted for days. Eventually I tried rm -rf ~/Library/Caches/ScalaCli and that fixed it immediately.

The verbose logging included

Caught libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 1639, trying again in 3 seconds
SethTisue commented 7 months ago

I'm also still getting this exception repeatedly on Linux. An example log where it occurred, with -v -v -v enabled, is at https://scala-ci.typesafe.com/view/scala-2.13.x/job/scala-2.13.x-jdk22-integrate-community-build/248/console

perhaps this section of the log is the important part?

Checking for a running Bloop server at /home/jenkins/.local/share/scalacli/bloop/daemon ...
Attempting to connect to Bloop server /home/jenkins/.local/share/scalacli/bloop/daemon ...
Connection attempt result: None
Exception in thread "main" java.lang.Exception: libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 770
    at bloop.Bloop$.loop$1(Bloop.scala:102)
    at bloop.Bloop$.main(Bloop.scala:114)
    at bloop.Bloop.main(Bloop.scala)
Caused by: libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 770

Then the problem goes away on subsequent runs.

It's a Jenkins server that routinely shuts itself down, then starts itself back up again later. It's something of a guess, but perhaps the problem is limited to the first run after a restart.

tgodzik commented 7 months ago

Hmm... this should have been fixed by https://github.com/scala-cli/bloop-core/pull/150/files

Although, I see something weird before that:

Connection attempt result: None
Bloop server PID: 975
Ignoring SIGINT

supposedly Bloop started under another PID before and was restarted, when it failed again,

SethTisue commented 7 months ago

fwiw, I've just upgraded the Linux machines in question from scala-cli 1.1.0 to 1.1.1, I'll keep an eye it on and see if that helps

SethTisue commented 7 months ago

(it might be nice if -v -v -v caused the Scala-CLI version to be printed)

SethTisue commented 7 months ago

The Linux machines in our Jenkins cluster have been on scala-cli 1.1.2 for a while now.

The good news is, I'm definitely seeing fewer FailedToStartServerExitCodeExceptions than in the past.

The bad news is, today I did get one, caused by a libdaemonjvm.server.LockError$ZombieFound. The log is at https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-jdk11-integrate-community-build/3286/console

JD557 commented 6 months ago

On my MacOS 14 laptop recently, bloop would not start. The problem persisted for days. Eventually I tried rm -rf ~/Library/Caches/ScalaCli and that fixed it immediately.

Just want to confirm that I had the same issue on my MacOS laptop and indeed this fixed it. 👍

lrytz commented 5 months ago

I'm running into this very often (macOS M1, scala-cli 1.1.3), and also for me rm -rf ~/Library/Caches/ScalaCli fixes it.

SethTisue commented 5 months ago

The bad news is, today I did get one

(and some weeks later I can now report that) I'm still seeing the ZombieFound errors on our Jenkins from time to time. Not 100% sure, but I think it tends to be on the first run after a worker node wakes up. I have not seen it happen two runs in a row (though that could be pure chance).

It's funny that unlike Lukas, I never have trouble locally :shrug:

SethTisue commented 5 months ago

I did hear from one other Scala contributor (on MacOS) who considers scala-cli --server=false to be reliable and useful, but plain scala-cli to be too unreliable to use, so he just always runs with --server=false.

tgodzik commented 2 months ago

I wonder if the cause for the zombie errors was undeleted socket files in .cache/scalacli/bsp-sockets :thinking:

Ot at least the problems with starting Bloop

lrytz commented 2 weeks ago

Logs from my machine from today:

Log... ``` ➜ sandbox scala compile -S 3 A.scala -v -v -v Checking for a running Bloop server at /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Attempting to connect to Bloop server /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Connection attempt result: Some(Left(libdaemonjvm.client.ConnectError$ZombieFound: Cannot connect to process 693)) Checking for a running Bloop server at /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Attempting to connect to Bloop server /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Connection attempt result: Some(Left(libdaemonjvm.client.ConnectError$ZombieFound: Cannot connect to process 693)) Bloop daemon status: not running Fetching List(Dependency(io.github.alexarchambault.bleep:bloop-frontend_2.12, 1.5.17-sc-2, Configuration(), Set(), Publication(, Type(), Extension(), Classifier()), false, true)) Found 121 artifacts: /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/github/alexarchambault/bleep/bloop-frontend_2.12/1.5.17-sc-2/bloop-frontend_2.12-1.5.17-sc-2.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/ch/epfl/scala/bloop-config_2.12/2.0.0/bloop-config_2.12-2.0.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/github/alexarchambault/case-app_2.12/2.0.6/case-app_2.12-2.0.6.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/github/alexarchambault/libdaemon/libdaemon_2.12/0.0.11/libdaemon_2.12-0.0.11.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/ch/qos/logback/logback-classic/1.4.14/logback-classic-1.4.14.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/ch/epfl/scala/scala-debug-adapter_2.12/4.1.1/scala-debug-adapter_2.12-4.1.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.19/scala-library-2.12.19.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/github/alexarchambault/bleep/bloop-backend_2.12/1.5.17-sc-2/bloop-backend_2.12-1.5.17-sc-2.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/github/plokhotnyuk/jsoniter-scala/jsoniter-scala-core_2.12/2.13.5/jsoniter-scala-core_2.12-2.13.5.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/github/alexarchambault/case-app-annotations_2.12/2.0.6/case-app-annotations_2.12-2.0.6.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/github/alexarchambault/case-app-util_2.12/2.0.6/case-app-util_2.12-2.0.6.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/ch/qos/logback/logback-core/1.4.14/logback-core-1.4.14.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/slf4j/slf4j-api/2.0.7/slf4j-api-2.0.7.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/ch/epfl/scala/com-microsoft-java-debug-core/0.34.0%2B30/com-microsoft-java-debug-core-0.34.0%2B30.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.12.19/scala-reflect-2.12.19.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/ow2/asm/asm/9.7/asm-9.7.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/ow2/asm/asm-util/9.7/asm-util-9.7.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/test-agent/1.10.0/test-agent-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scalameta/parsers_2.12/4.9.5/parsers_2.12-4.9.5.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-collection-compat_2.12/2.12.0/scala-collection-compat_2.12-2.12.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/zipkin/brave/brave/5.18.1/brave-5.18.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/ch/epfl/scala/directory-watcher/0.8.0%2B6-f651bd93/directory-watcher-0.8.0%2B6-f651bd93.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/librarymanagement-ivy_2.12/1.10.0/librarymanagement-ivy_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/monix/monix_2.12/3.2.0/monix_2.12-3.2.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/github/alexarchambault/bleep/nailgun-server/1.0.7/nailgun-server-1.0.7.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/pprint_2.12/0.9.0/pprint_2.12-0.9.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scalaz/scalaz-core_2.12/7.3.8/scalaz-core_2.12-7.3.8.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/sourcecode_2.12/0.4.1/sourcecode_2.12-0.4.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/zipkin/reporter2/zipkin-sender-urlconnection/2.17.2/zipkin-sender-urlconnection-2.17.2.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/zeroturnaround/zt-zip/1.17/zt-zip-1.17.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/github/alexarchambault/bleep/bloop-shared_2.12/1.5.17-sc-2/bloop-shared_2.12-1.5.17-sc-2.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/chuusai/shapeless_2.12/2.3.3/shapeless_2.12-2.3.3.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.14.0/commons-lang3-3.14.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/google/code/gson/gson/2.11.0/gson-2.11.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/reactivex/rxjava2/rxjava/2.2.21/rxjava-2.2.21.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/reactivestreams/reactive-streams/1.0.4/reactive-streams-1.0.4.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/commons-io/commons-io/2.16.1/commons-io-2.16.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/ow2/asm/asm-tree/9.7/asm-tree-9.7.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/ow2/asm/asm-analysis/9.7/asm-analysis-9.7.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/test-interface/1.0/test-interface-1.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scalameta/trees_2.12/4.9.5/trees_2.12-4.9.5.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/zipkin/reporter2/zipkin-reporter-brave/2.17.2/zipkin-reporter-brave-2.17.2.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/zipkin/zipkin2/zipkin/2.27.0/zipkin-2.27.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/net/java/dev/jna/jna/5.13.0/jna-5.13.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/librarymanagement-core_2.12/1.10.0/librarymanagement-core_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/eed3si9n/sjson-new-core_2.12/0.9.1/sjson-new-core_2.12-0.9.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/ivy/ivy/2.3.0-sbt-396a783bba347016e7fe30dacc60d355be607fe2/ivy-2.3.0-sbt-396a783bba347016e7fe30dacc60d355be607fe2.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/monix/monix-execution_2.12/3.2.0/monix-execution_2.12-3.2.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/monix/monix-catnap_2.12/3.2.0/monix-catnap_2.12-3.2.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/monix/monix-eval_2.12/3.2.0/monix-eval_2.12-3.2.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/monix/monix-tail_2.12/3.2.0/monix-tail_2.12-3.2.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/monix/monix-reactive_2.12/3.2.0/monix-reactive_2.12-3.2.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/monix/monix-java_2.12/3.2.0/monix-java_2.12-3.2.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/net/java/dev/jna/jna-platform/5.13.0/jna-platform-5.13.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/fansi_2.12/0.5.0/fansi_2.12-0.5.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/zipkin/reporter2/zipkin-reporter/2.17.2/zipkin-reporter-2.17.2.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/ch/epfl/scala/bsp4s_2.12/2.1.1/bsp4s_2.12-2.1.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/github/alexarchambault/bleep/jsonrpc4s_2.12/0.1.1/jsonrpc4s_2.12-0.1.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/get-coursier/interface/1.0.13/interface-1.0.13.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.23.0/log4j-core-2.23.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/net/jpountz/lz4/lz4/1.3.0/lz4-1.3.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/zinc_2.12/1.10.0/zinc_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/macro-compat_2.12/1.1.1/macro-compat_2.12-1.1.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.27.0/error_prone_annotations-2.27.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scalameta/common_2.12/4.9.5/common_2.12-4.9.5.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.19/scala-compiler-2.12.19.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/github/mwiede/jsch/0.2.17/jsch-0.2.17.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/launcher-interface/1.4.2/launcher-interface-1.4.2.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/eed3si9n/gigahorse-apache-http_2.12/0.7.0/gigahorse-apache-http_2.12-0.7.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-xml_2.12/2.3.0/scala-xml_2.12-2.3.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/io_2.12/1.10.0/io_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/util-logging_2.12/1.10.0/util-logging_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/util-position_2.12/1.10.0/util-position_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/util-cache_2.12/1.10.0/util-cache_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/monix/implicitbox_2.12/0.2.0/implicitbox_2.12-0.2.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/jctools/jctools-core/2.1.2/jctools-core-2.1.2.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-effect_2.12/2.1.3/cats-effect_2.12-2.1.3.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/outr/scribe_2.12/3.5.5/scribe_2.12-3.5.5.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.23.0/log4j-api-2.23.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/zinc-core_2.12/1.10.0/zinc-core_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/zinc-persist_2.12/1.10.0/zinc-persist_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/zinc-compile-core_2.12/1.10.0/zinc-compile-core_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/zinc-classfile_2.12/1.10.0/zinc-classfile_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/thesamet/scalapb/scalapb-runtime_2.12/0.11.15/scalapb-runtime_2.12-0.11.15.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/eed3si9n/gigahorse-core_2.12/0.7.0/gigahorse-core_2.12-0.7.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/eed3si9n/shaded-apache-httpasyncclient/0.7.0/shaded-apache-httpasyncclient-0.7.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/swoval/file-tree-views/2.1.12/file-tree-views-2.1.12.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/util-interface/1.10.0/util-interface-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/collections_2.12/1.10.0/collections_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/core-macros_2.12/1.10.0/core-macros_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/jline/jline/2.14.7-sbt-9c3b6aca11c57e339441442bbf58e550cdfecb79/jline-2.14.7-sbt-9c3b6aca11c57e339441442bbf58e550cdfecb79.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/jline/jline-terminal/3.24.1/jline-terminal-3.24.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/jline/jline-terminal-jna/3.24.1/jline-terminal-jna-3.24.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/jline/jline-terminal-jansi/3.24.1/jline-terminal-jansi-3.24.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lmax/disruptor/3.4.2/disruptor-3.4.2.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/eed3si9n/sjson-new-scalajson_2.12/0.9.1/sjson-new-scalajson_2.12-0.9.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/eed3si9n/sjson-new-murmurhash_2.12/0.9.1/sjson-new-murmurhash_2.12-0.9.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-core_2.12/2.1.1/cats-core_2.12-2.1.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/outr/perfolation_2.12/1.2.8/perfolation_2.12-1.2.8.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/outr/moduload_2.12/1.1.5/moduload_2.12-1.1.5.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/zinc-apiinfo_2.12/1.10.0/zinc-apiinfo_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/zinc-classpath_2.12/1.10.0/zinc-classpath_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/compiler-interface/1.10.0/compiler-interface-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/zinc-persist-core-assembly/1.10.0/zinc-persist-core-assembly-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/util-relation_2.12/1.10.0/util-relation_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/sbinary_2.12/0.5.1/sbinary_2.12-0.5.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-parser-combinators_2.12/1.1.2/scala-parser-combinators_2.12-1.1.2.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/net/openhft/zero-allocation-hashing/0.16/zero-allocation-hashing-0.16.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/util-control_2.12/1.10.0/util-control_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/thesamet/scalapb/lenses_2.12/0.11.15/lenses_2.12-0.11.15.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.19.6/protobuf-java-3.19.6.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/typesafe/ssl-config-core_2.12/0.6.1/ssl-config-core_2.12-0.6.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/fusesource/jansi/jansi/2.4.1/jansi-2.4.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/jline/jline-native/3.24.1/jline-native-3.24.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/eed3si9n/shaded-jawn-parser_2.12/0.9.1/shaded-jawn-parser_2.12-0.9.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/eed3si9n/shaded-scalajson_2.12/1.0.0-M4/shaded-scalajson_2.12-1.0.0-M4.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-macros_2.12/2.1.1/cats-macros_2.12-2.1.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-kernel_2.12/2.1.1/cats-kernel_2.12-2.1.1.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-sbt/compiler-bridge_2.12/1.10.0/compiler-bridge_2.12-1.10.0.jar /Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/typesafe/config/1.4.2/config-1.4.2.jar Starting compilation server Starting Bloop 1.5.17-sc-2 at /Users/luc/Library/Caches/ScalaCli/bloop/daemon using JVM /Users/luc/.jabba/jdk/adopt@21/Contents/Home/bin/java Checking for a running Bloop server at /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Attempting to connect to Bloop server /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Connection attempt result: Some(Left(libdaemonjvm.client.ConnectError$ZombieFound: Cannot connect to process 693)) Checking for a running Bloop server at /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Attempting to connect to Bloop server /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Connection attempt result: Some(Left(libdaemonjvm.client.ConnectError$ZombieFound: Cannot connect to process 693)) Bloop server PID: 48982 Ignoring SIGINT Will truncate output file /Users/luc/Library/Caches/ScalaCli/bloop/daemon/output every 5 minutes Checking for a running Bloop server at /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Attempting to connect to Bloop server /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Connection attempt result: Some(Left(libdaemonjvm.client.ConnectError$ZombieFound: Cannot connect to process 693)) Checking for a running Bloop server at /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Attempting to connect to Bloop server /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Connection attempt result: Some(Left(libdaemonjvm.client.ConnectError$ZombieFound: Cannot connect to process 693)) Caught libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 693, trying again in 3 seconds Checking for a running Bloop server at /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Attempting to connect to Bloop server /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Connection attempt result: Some(Left(libdaemonjvm.client.ConnectError$ZombieFound: Cannot connect to process 693)) Checking for a running Bloop server at /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Attempting to connect to Bloop server /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Connection attempt result: Some(Left(libdaemonjvm.client.ConnectError$ZombieFound: Cannot connect to process 693)) ... Connection attempt result: Some(Left(libdaemonjvm.client.ConnectError$ZombieFound: Cannot connect to process 693)) Checking for a running Bloop server at /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Attempting to connect to Bloop server /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Connection attempt result: Some(Left(libdaemonjvm.client.ConnectError$ZombieFound: Cannot connect to process 693)) Checking for a running Bloop server at /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Attempting to connect to Bloop server /Users/luc/Library/Caches/ScalaCli/bloop/daemon ... Connection attempt result: Some(Left(libdaemonjvm.client.ConnectError$ZombieFound: Cannot connect to process 693)) Exception in thread "main" java.lang.Exception: libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 693 at bloop.Bloop$.loop$1(Bloop.scala:102) at bloop.Bloop$.main(Bloop.scala:114) at bloop.Bloop.main(Bloop.scala) Caused by: libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 693 at libdaemonjvm.server.Lock$.ifProcessRunning$1(Lock.scala:59) at libdaemonjvm.server.Lock$.$anonfun$tryAcquire$6(Lock.scala:76) at libdaemonjvm.server.Lock$.$anonfun$tryAcquire$6$adapted(Lock.scala:75) at scala.Option.flatMap(Option.scala:271) at libdaemonjvm.server.Lock$.ifFiles$1(Lock.scala:75) at libdaemonjvm.server.Lock$.tryAcquire(Lock.scala:94) at bloop.Bloop$.loop$1(Bloop.scala:93) ... 2 more Caused by: java.net.ConnectException: Connection refused at java.base/sun.nio.ch.UnixDomainSockets.connect0(Native Method) at java.base/sun.nio.ch.UnixDomainSockets.connect(UnixDomainSockets.java:154) at java.base/sun.nio.ch.UnixDomainSockets.connect(UnixDomainSockets.java:150) at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:878) at libdaemonjvm.internal.Java16SocketHandler$.client(Java16SocketHandler.scala:22) at libdaemonjvm.internal.SocketHandler$.client(SocketHandler.scala:18) at libdaemonjvm.internal.SocketFile$.connect(SocketFile.scala:23) at libdaemonjvm.internal.SocketFile$.canConnect(SocketFile.scala:14) at libdaemonjvm.server.Lock$.ifProcessRunning$1(Lock.scala:57) ... 8 more Bloop server exited with code 1 Running scala-cli --power bloop output might give more details. Exception in thread "main" bloop.rifle.FailedToStartServerExitCodeException: Server failed with exit code 1 at bloop.rifle.internal.Operations$.$anonfun$startServer$8(Operations.scala:264) at bloop.rifle.BloopRifleLogger.$anonfun$runnable$1(BloopRifleLogger.scala:14) at java.base@17.0.6/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base@17.0.6/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) at java.base@17.0.6/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) at java.base@17.0.6/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base@17.0.6/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base@17.0.6/java.lang.Thread.run(Thread.java:833) at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:775) at com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:203) ```

From the cache directory:

➜ sandbox ls -al /Users/luc/Library/Caches/ScalaCli/bloop/
-rw-r--r--  1 luc  staff   540B Apr 19 10:38 args.txt
drwx------  6 luc  staff   192B Aug 12 16:11 daemon
➜ sandbox cat /Users/luc/Library/Caches/ScalaCli/bloop/args.txt
-bootclasspath
/Users/luc/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.13/scala-library-2.13.13.jar
-classpath
/Users/luc/code/scala/scala13/sandbox/.scala-build/.bloop/sandbox_a120e9abc4-0260291f95/bloop-internal-classes/main-kNa1XXb4TbOXb1twJKxyvg==:/Users/luc/code/scala/scala13/sandbox/.scala-build/sandbox_a120e9abc4-0260291f95/classes/classes-empty-sandbox_a120e9abc4-0260291f95
-Ycache-plugin-class-loader:last-modified
-Vprint-args
args.txt
/Users/luc/code/scala/scala13/sandbox/C.scala
➜ sandbox ls -al /Users/luc/Library/Caches/ScalaCli/bloop/daemon
-rw-r--r--  1 luc  staff     0B Mar 14 14:05 lock
-rw-r--r--  1 luc  staff   565B Aug 19 14:01 output
-rw-r--r--  1 luc  staff     3B Aug 12 16:11 pid
srwxr-xr-x  1 luc  staff     0B Aug 12 16:11 socket
➜ sandbox cat /Users/luc/Library/Caches/ScalaCli/bloop/daemon/pid
693
➜ sandbox ps -p 693 -ww
  PID TTY           TIME CMD
  693 ??         0:00.89 /System/Library/Frameworks/QuickLookThumbnailing.framework/Versions/A/PlugIns/ThumbnailExtension_macOS.appex/Contents/MacOS/ThumbnailExtension_macOS -AppleLanguages ("en-CH", "en-US", "de-CH", "ro-CH")
➜ sandbox cat /Users/luc/Library/Caches/ScalaCli/bloop/daemon/output
Bloop server PID: 49297
Ignoring SIGINT
Will truncate output file /Users/luc/Library/Caches/ScalaCli/bloop/daemon/output every 5 minutes
Caught libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 693, trying again in 3 seconds
Caught libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 693, trying again in 3 seconds
Caught libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 693, trying again in 3 seconds
Caught libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 693, trying again in 3 seconds
Caught libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 693, trying again in 3 seconds
Caught libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 693, trying again in 3 seconds
Caught libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 693, trying again in 3 seconds
Caught libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 693, trying again in 3 seconds
Caught libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 693, trying again in 3 seconds
Caught libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 693, trying again in 3 seconds
Exception in thread "main" java.lang.Exception: libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 693
    at bloop.Bloop$.loop$1(Bloop.scala:102)
    at bloop.Bloop$.main(Bloop.scala:114)
    at bloop.Bloop.main(Bloop.scala)
Caused by: libdaemonjvm.server.LockError$ZombieFound: Cannot connect to process 693
    at libdaemonjvm.server.Lock$.ifProcessRunning$1(Lock.scala:59)
    at libdaemonjvm.server.Lock$.$anonfun$tryAcquire$6(Lock.scala:76)
    at libdaemonjvm.server.Lock$.$anonfun$tryAcquire$6$adapted(Lock.scala:75)
    at scala.Option.flatMap(Option.scala:271)
    at libdaemonjvm.server.Lock$.ifFiles$1(Lock.scala:75)
    at libdaemonjvm.server.Lock$.tryAcquire(Lock.scala:94)
    at bloop.Bloop$.loop$1(Bloop.scala:93)
    ... 2 more
Caused by: java.net.ConnectException: Connection refused
    at java.base/sun.nio.ch.UnixDomainSockets.connect0(Native Method)
    at java.base/sun.nio.ch.UnixDomainSockets.connect(UnixDomainSockets.java:154)
    at java.base/sun.nio.ch.UnixDomainSockets.connect(UnixDomainSockets.java:150)
    at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:878)
    at libdaemonjvm.internal.Java16SocketHandler$.client(Java16SocketHandler.scala:22)
    at libdaemonjvm.internal.SocketHandler$.client(SocketHandler.scala:18)
    at libdaemonjvm.internal.SocketFile$.connect(SocketFile.scala:23)
    at libdaemonjvm.internal.SocketFile$.canConnect(SocketFile.scala:14)
    at libdaemonjvm.server.Lock$.ifProcessRunning$1(Lock.scala:57)
    ... 8 more
➜ sandbox

Could it be that the issue is caused by a stale pid file with an old process id that now happens to match the id of some completely unrelated other process that is currently running on my system?

benhutchison commented 2 weeks ago

Could it be that the issue is caused by a stale pid file with an old process id that now happens to match the id of some completely unrelated other process that is currently running on my system?

That'd be consistent with my experience. Haven't used Scala CLI for a while (😢) and when I came back to a project I suddenly started getting this error.

Deleting the cached pid fixed it, rm ~/Library/Caches/ScalaCli/bloop/daemon/pid

tgodzik commented 1 day ago

Did you maybe update to 1.5.0? I added some handling and removing of PID automatically. Should help with your case at least.