You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BPE_APPEND_JAVA_TOOL_OPTIONS Concatenation Issue with paketo-buildpacks/builder-jammy-java-tiny
Expected Behavior
The BPE_APPEND_JAVA_TOOL_OPTIONS environment variable should append new Java tool options to the existing JAVA_TOOL_OPTIONS with a space as a separator. For example, if JAVA_TOOL_OPTIONS is -XX:ExitOnOutOfMemoryError and BPE_APPEND_JAVA_TOOL_OPTIONS is -XX:UseSVE=0, the resulting options should be -XX:ExitOnOutOfMemoryError -XX:UseSVE=0.
Current Behavior
BPE_APPEND_JAVA_TOOL_OPTIONS concatenates the new options directly to the existing JAVA_TOOL_OPTIONSwithout a space. Using the same example, the result is -XX:ExitOnOutOfMemoryError-XX:UseSVE=0. This leads to the JVM failing to recognize the options.
Possible Solution
Modify the buildpack logic to include a space when appending the value of BPE_APPEND_JAVA_TOOL_OPTIONS to JAVA_TOOL_OPTIONS. A simple fix would be to ensure a space is added between the existing options and the appended options.
Steps to Reproduce
Use the paketobuildpacks/builder-jammy-java-tiny buildpack (or a buildpack that uses this builder).
Set the BPE_APPEND_JAVA_TOOL_OPTIONS environment variable to -XX:UseSVE=0.
Build the image.
Attempt to run the application. It will likely fail with an "Unrecognized VM option" error.
Unrecognized VM option 'ExitOnOutOfMemoryError-XX:UseSVE=0'
Did you mean '(+/-)ExitOnOutOfMemoryError'?
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Motivations
This issue is critical for running Java applications on M4 processors. The JDK on these processors often requires the -XX:UseSVE=0 option. Because of this bug, we cannot reliably deploy Java applications using the paketobuildpacks/builder-jammy-java-tiny buildpack on M4 architectures. This blocks us from utilizing these processors effectively. This issue is related to OpenJDK bug JDK-8345296.
The text was updated successfully, but these errors were encountered:
Thanks for reaching out. If you have not, please try setting BPE_DELIM_JAVA_TOOL_OPTIONS=' '. The default delimiter is an empty string, which is why I believe that you're seeing this behavior.
BPE_APPEND_JAVA_TOOL_OPTIONS Concatenation Issue with paketo-buildpacks/builder-jammy-java-tiny
Expected Behavior
The
BPE_APPEND_JAVA_TOOL_OPTIONS
environment variable should append new Java tool options to the existingJAVA_TOOL_OPTIONS
with a space as a separator. For example, ifJAVA_TOOL_OPTIONS
is-XX:ExitOnOutOfMemoryError
andBPE_APPEND_JAVA_TOOL_OPTIONS
is-XX:UseSVE=0
, the resulting options should be-XX:ExitOnOutOfMemoryError -XX:UseSVE=0
.Current Behavior
BPE_APPEND_JAVA_TOOL_OPTIONS
concatenates the new options directly to the existingJAVA_TOOL_OPTIONS
without a space. Using the same example, the result is-XX:ExitOnOutOfMemoryError-XX:UseSVE=0
. This leads to the JVM failing to recognize the options.Possible Solution
Modify the buildpack logic to include a space when appending the value of
BPE_APPEND_JAVA_TOOL_OPTIONS
toJAVA_TOOL_OPTIONS
. A simple fix would be to ensure a space is added between the existing options and the appended options.Steps to Reproduce
paketobuildpacks/builder-jammy-java-tiny
buildpack (or a buildpack that uses this builder).BPE_APPEND_JAVA_TOOL_OPTIONS
environment variable to-XX:UseSVE=0
.Unrecognized VM option 'ExitOnOutOfMemoryError-XX:UseSVE=0'
Did you mean '(+/-)ExitOnOutOfMemoryError'?
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Motivations
This issue is critical for running Java applications on M4 processors. The JDK on these processors often requires the
-XX:UseSVE=0
option. Because of this bug, we cannot reliably deploy Java applications using thepaketobuildpacks/builder-jammy-java-tiny
buildpack on M4 architectures. This blocks us from utilizing these processors effectively. This issue is related to OpenJDK bug JDK-8345296.The text was updated successfully, but these errors were encountered: