-
Notifications
You must be signed in to change notification settings - Fork 942
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
Overriding stack size (-Xss) fails except via SBT_OPTS #5181
Comments
I'll admit I was a bit confused on how this behavior should work, when I was doing the windows All of the memory arguments probably need a better set of tests to help explicitly document how the memory overrides should interact with each other (https://github.com/sbt/sbt-launcher-package/blob/master/integration-test/src/test/scala/RunnerTest.scala) - and those tests themselves probably need to be discussed if they are actually desireable, since it's not obvious to me what should be overridden when. The comment here is especially confusing with how the overrides should work (or as it's written, the default memory settings SHOULD NOT be getting applied if you have a
If they are, then definitely a bug. |
I agree it's a bug. We do check for heap size related settings to prevent conflict with user-provided parameters, but stack size setting |
Similar/same issue
|
Pending fix: sbt/sbt-launcher-package#346 |
Fixed in sbt/sbt-launcher-package#346 by @ericdotdata |
Fix sbt#5181 - add -Xss to java_options ignore
steps
sbt version: 1.3.2
problem
Overriding the stack size via
.jvmopts
, or the-J
flag fails. Stack size is set to the default 4M value even when overridden.expectation
Overriding the stack size by itself should work no matter the method.
notes
Using
SBT_OPTS
works correctly. I've traced this down to the launcher script for sbt and have identified a workaround for the time being. If you specify a memory option (-Xm*
) then the portion of code in the launcher script that sets the stack size will not be called.A couple ideas on how this could be fixed:
-Xss
if the argument is present when launching sbtSBT_OPTS
currently when changing the stack size)To reproduce: open any SBT project and set the stack size via
-J
or.jvm/sbtopts
. Runsbt -d
to see the order of JVM args as they are applied. Note that the stack size parameter is applied before the defaults which override it. Now set it viaSBT_OPTS
and see that your option is specified after the default argument, overriding it.The text was updated successfully, but these errors were encountered: