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

Exception when using SeparateJvmsExecutor with verbose key set to false. #136

Closed
kjanosz opened this issue Jul 8, 2015 · 2 comments · Fixed by #137
Closed

Exception when using SeparateJvmsExecutor with verbose key set to false. #136

kjanosz opened this issue Jul 8, 2015 · 2 comments · Fixed by #137

Comments

@kjanosz
Copy link
Contributor

kjanosz commented Jul 8, 2015

(I'm rewriting the last comment from #135)

I've encountered into some strange behaviour when spawning new JVM with default jvmflags ("-Xmx2048m -Xms2048m -XX:CompileThreshold=100")

Error: Could not find or load main class  -Xmx2048m -Xms2048m -XX:CompileThreshold=100

Note the extra space before -Xmx2048m.

Changing line 27 in SeparateJvmsExecutor from:
val flags = s"${if (currentContext(Key.verbose)) "-verbose:gc " else ""}" + existingFlags
to:
val flags = s"${if (currentContext(Key.verbose)) "-verbose:gc" else ""} " + existingFlags
changes only error msg:

Invalid maximum heap size: -Xmx2048m -Xms2048m -XX:CompileThreshold=100
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit
@kjanosz
Copy link
Contributor Author

kjanosz commented Jul 8, 2015

@axel22: I've done some quickfix and changing jvmflags key type from String to List[String] works. I could make a PR if you want.

Alternatively splitting over jvmflags before creation of commands sequence in JvmRunner.runJvm should work too, but won't it break usages when any of flags contain whitepsace? (don't know if this is allowed behaviour)

@kjanosz kjanosz changed the title Exception when using SeparateJvmsExecutor with Key.verbose set to false. Exception when using SeparateJvmsExecutor with verbose key set to false. Jul 8, 2015
@axel22
Copy link
Member

axel22 commented Jul 8, 2015

It sounds as if the multiple command-line arguments were merged into a single argument. This could be related to the recent whitespace-related refactoring.

About List[String] - yes, please! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants