Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to start bloop server on armle using Debian 11 #1843

Closed
Flowdalic opened this issue Feb 9, 2023 · 0 comments · Fixed by #1845
Closed

Failed to start bloop server on armle using Debian 11 #1843

Flowdalic opened this issue Feb 9, 2023 · 0 comments · Fixed by #1845
Labels
bug Something isn't working

Comments

@Flowdalic
Copy link
Contributor

Flowdalic commented Feb 9, 2023

Using scala-cli 0.1.20 to execute a script on an armle machine running Debian 11 (Bullseye) with openjdk-jre-17-headless installed fails with blooprifle throwing a FailedToStartServerException.

flo@raspi:~$ scala-cli ./myscript.sc 
Starting compilation server                                          
Error: scala.build.blooprifle.FailedToStartServerException: Server didn't start
For more details, please see '/home/flo/.scala-build/stacktraces/1675934079-9520059747794623223.log'
Running                                                              
  scala-cli bloop output                                             
might give more details.
flo@raspi:~$  cat /home/flo/.scala-build/stacktraces/1675949061-6542722033418601453.log
scala.build.blooprifle.FailedToStartServerExitCodeException: Server failed with code 1
  scala.build.blooprifle.internal.Operations$.check0$1$$anonfun$1(Operations.scala:250)
  scala.build.blooprifle.BloopRifleLogger.runnable$$anonfun$1(BloopRifleLogger.scala:13)
  java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
  java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
  java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
  java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
  java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
  java.base/java.lang.Thread.run(Thread.java:833)

running scala-cli bloop output shows

flo@raspi:~$ scala-cli bloop output
Unrecognized VM option 'MaxInlineLevel=20'
Did you mean 'MaxForceInlineLevel=<value>'? Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

As I wrote in #1845, removing the MaxInlineLevel line in scala-cli's BloopRifleConfig.scala had no effect. So I suspect that this comes from https://github.com/scalacenter/bloop/blob/a249e0a710ce169ca05d0606778f96f44a398680/bloopgun/src/main/scala/bloop/bloopgun/util/Environment.scala#L87 ? Can someone more familiar with scala-cli's architecture shed some light into this?

In any case, I suspect that the JVM not understanding this option is the cause of the bloop server not starting. java version on the machine reports the following:

flo@raspi:~$ java -version
openjdk version "17.0.6" 2023-01-17
OpenJDK Runtime Environment (build 17.0.6+10-Debian-1deb11u1)
OpenJDK Zero VM (build 17.0.6+10-Debian-1deb11u1, interpreted mode)

This experience made me skeptic of hard coding non-standard JVM options. Obviously some JVMs bail out on unrecognized options (which is sensible behavior IMHO). So, at least, it appears that it should be checked if the receiving JVM supports the desired non-standard JVM options before issuing them.

FWIW scala-cli repl works as expected on that machine.

@Flowdalic Flowdalic added the bug Something isn't working label Feb 9, 2023
@Flowdalic Flowdalic changed the title Failed to start bloop server Failed to start bloop server on armle using Debian 11 Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant