-
Notifications
You must be signed in to change notification settings - Fork 326
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
base: develop
Are you sure you want to change the base?
Conversation
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.
There was a problem hiding this 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" "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This is strange: Where do we process
-D
? - I know we do process
--vm.D
, but I never heard of-D
: - Add --vm.D cmdline option #10798
@@ -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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- manually setting this property is unfortunate
- it is probably result of this request of mine
- where I wanted to drop dependency on Truffle API
- we have already faced that issue once here
- I assume we are doing something wrong (per my guidance)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unwillingness to add dependencies
- the dependencies are already included
- Avoid usage of isaot property in favor of ImageInfo #12445 doesn't add any new dependency
- we seem to be using
com.oracle.graalvm.isaot
improperly - better to use
ImageInfo
as Avoid usage of isaot property in favor of ImageInfo #12445 demonstrates
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- assuming Avoid usage of isaot property in favor of ImageInfo #12445 renders this PR unnecessary
- I prefer to integrate just Avoid usage of isaot property in favor of ImageInfo #12445
- and close this PR unmerged
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:

Now:

Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.