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

Ensure docker is properly notified of NI #12443

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

hubertp
Copy link
Collaborator

@hubertp hubertp commented Mar 7, 2025

Pull Request Description

Looks like com.oracle.graalvm.isaot is not set properly when running in native image. Also, we must provide --jvm when we execute in JVM mode (the default mode for now).

This allows LS to start without any issues when invoked via docker.

Important Notes

I'd like to take a closer look at how we build the executable provided to docker and maybe avoid this band-aid but for now this unblocks staging. Tested locally by sending appropriate message to server's websocket.

Previously:
Screenshot from 2025-03-07 17-26-39

Now:
Screenshot from 2025-03-07 17-26-17

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.

Looks like `com.oracle.graalvm.isaot` is not set properly when running
in native image. Also, we must provide `--jvm` when we execute in JVM
mode (the default mode for now).

This allows LS to start without any issues when invoked via docker.
@hubertp hubertp added the CI: No changelog needed Do not require a changelog entry for this PR. label Mar 7, 2025
Copy link
Member

@JaroslavTulach JaroslavTulach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing the change, I guess we are not using com.oracle.graalvm.isaot properly elsewhere. There are other alternatives we should probably be using like ImageInfo.inImageRuntimeCode.


/opt/enso/bin/enso $PROFILING_OPTIONS --log-level "$LOG_LEVEL" --rpc-port $RPC_PORT --data-port $DATA_PORT --root-id "$LS_ROOT_ID" --interface "$INTERFACE" "$@"
/opt/enso/bin/enso $PROFILING_OPTIONS $NATIVE_PROP --log-level "$LOG_LEVEL" --rpc-port $RPC_PORT --data-port $DATA_PORT --root-id "$LS_ROOT_ID" --interface "$INTERFACE" "$@"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -17,5 +17,9 @@ PROFILING_OPTIONS=""
if [ "$PROFILING_FILENAME" != "" ] && [ "$PROFILING_TIME" != "" ]; then
PROFILING_OPTIONS="--profiling-path /opt/enso/profiling/$PROFILING_FILENAME --profiling-time=$PROFILING_TIME"
fi
NATIVE_PROP="--jvm"
if [ "$ENSO_LAUNCHER" != "" ] && [ "$ENSO_LAUNCHER" == "native" ]; then
NATIVE_PROP="-Dcom.oracle.graalvm.isaot=true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

@hubertp hubertp Mar 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the primary reason for using the property is unwillingness to add dependencies.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unwillingness to add dependencies

@JaroslavTulach
Copy link
Member

... should probably be using ImageInfo.inImageRuntimeCode.

@JaroslavTulach JaroslavTulach self-requested a review March 9, 2025 10:12
Copy link
Member

@JaroslavTulach JaroslavTulach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants