Increase default stack size used by launcher when .jvmopts does not specify -Xss
See original GitHub issueI’m running Bloop 1.4.0-RC1 on linux.
Step 1. bloop clean
- works great, np
Step 2. bloop compile root-test
- compiles everything doesn’t exit at the end. Zipkin shows that all modules are compiled successfully.
Output looks normal, like this:
> bloop compile root-test
Compiling base-util-jvm (65 Scala sources)
Compiling base-util-js (57 Scala sources)
Compiled base-util-jvm (12100ms)
...
Compiled benchmark-jvm (2953ms)
Compiling benchmark-jvm-test (1 Scala source)
Compiled benchmark-jvm-test (151ms)
and then it hangs and I have to ctrl-C to kill it.
What’s really, really bad about this is that after I ctrl-C, if I run the same command again it recompiles everything (!).
> bloop compile root-test
Compiling base-util-js (57 Scala sources)
Compiling base-util-jvm (65 Scala sources)
Compiled base-util-jvm (4013ms)
...
Deduplicating compilation of base-test from cli client 'bloop-cli' (since 6m 51.545s)
...
Compiled benchmark-jvm (2593ms)
Compiling benchmark-jvm-test (1 Scala source)
Compiled benchmark-jvm-test (116ms)
and then it’s stuck again.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Configuring Stack Sizes in the JVM | Baeldung
Learn how to configure the thread stack sizes in the HotSpot JVM. ... To change the stack size, we can use the -Xss...
Read more >9.2 Increasing the Stack Size for Recursive Workflows
To increase the stack size, define the new value in the -Xss setting in the JAVA_OPTS entry in your Tomcat start script file...
Read more >What is the difference between -Xss and -XX:ThreadStackSize?
When I set JAVA_OPTS to -XX:ThreadStackSize=2m , I get about 1000 started threads until the memory is consumed. But, when I use JAVA_OPTS='- ......
Read more >Java launcher should create JVM from non-primordial thread
On Windows primordial thread stack size is controlled by PE header in the executable. There is no way for user to change it...
Read more >Increasing the JVM memory allocation and thread stack size
Use one of the following procedures to increase the JVM memory allocation ... Xmx is the maximum memory pool; Xss is the thread...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I wonder if the bloop launcher should by default increase the stack size if it’s not defined in
.jvmopts
? It’s normal that compilation requires a deeper stack size than the default and the error is currently quite cryptic when the stack overflows.Fixed by https://github.com/scalacenter/bloop/pull/1174