-
Notifications
You must be signed in to change notification settings - Fork 722
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
Enable JITServer post-restore only if explicitly specified #17205
Conversation
kill -9 $JITSERVER_PID | ||
# Running pkill seems to cause a hang... | ||
#pkill -9 -xf "$TEST_JDK_BIN/jitserver $JITSERVER_OPTIONS" |
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.
Something about how the cmdLineTester tokenizes the args passed to this script causes it to hang at this point if I use pkill -xf
(when I run this script manually there's no issue with pkill -xf
). As such, I just stuck with kill
.
|
||
random_port () { | ||
RANDOM_PORT=$(($(($RANDOM%$DIFF))+$START_PORT)) | ||
out=$(lsof -i -P -n | grep LISTEN | grep $RANDOM_PORT) |
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.
When I was looking for this online, all examples use sudo
, I suppose to list out every single port. However, I'm pretty sure that's not needed here since the ports we're searching should only be used by processes that don't have elevated privileges.
I would like to better understand the goal of these changes. Here's my take: Non-portable restore mode (the default) Portable restore mode |
Yeah this is all accurate.
Ah yeah this is something that's not currently handled. I think if a user specified
You're right in that there could be several checkpoint/restore operations, but there's still going to be the post-restore hook that's called at each restore, and so options will still be processed post-restore.
Yes, this is correct; this would be the
At the moment I don't think we have a good story for multiple checkpoint/restore points in that we're still going to call the post-restore options processing each time we restore. I think dealing with that is something we're gonna have to think about for options in general.
Yes this is correct. |
If options are processed after each restore in portable mode, then some users might provide |
There's a test for this scenario:
Yeah I'll add documentation to this PR, and open another issue to keep track of all the things we need to document on the openj9 docs. |
Should this test run in the JITAAS test build? In JITAAS test build, the test framework starts jitserver and sets -XX:+UseJITServer to all tests. So the above test will have See criu test in Test_openjdk11_j9_sanity.functional_x86-64_linux_jit as example:
|
I don't think so; that's the reason I added the code for the random port. I was essentially following the same principle as openj9/test/functional/JIT_Test/playlist.xml Lines 721 to 761 in ea2117e
which runs even in a non JITAAS test build. It deals with the JITAAS build by using a random port so that it doesn't clash with the port used by the jitserver instance started by the infrastructure. |
With the current setup, it will run in JITAAS test build. If we want to disable it in JITAAS build, we need to use
FYI @renfeiw |
I'm ok with it running in a JITAAS build since even the |
If it is ok to run in JITAAS build, then #17205 (comment) is not needed. |
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.
Other than the typo in copyright, the test change lgtm.
Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
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.
LGTM
jenkins test sanity plinux,xlinux,zlinux jdk17 |
zlinux failed cmdLineTester_criu_jitserverPostRestore_2
|
Given that The x86 test failed because I guess the error given by |
Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
I manually ran the test on two separate zlinux machines and it passed. I think because the restore did succeed but the test didn't see the client connect, it's more than likely that something prevented the jitserver instance from starting up. The force push should also fix the x86 test failure caused by the change in the curl output. |
jenkins test sanity plinux,xlinux,zlinux jdk17 |
@mpirvu looks like all jobs passed. |
@dsouzai - What do the columns in the table indicate exactly (Non-Portable CRIU Pre-Checkpoint, Non-Portable CRIU Post-Restore, etc.)? |
The table indicates how JITServer behaves pre-checkpoint and post-restore in Portable CRIU Mode and Non-Portable CRIU mode. So |
This PR updates the how a JVM Client will connect to a JITServer in the context of CRIU as outlined in the following table; ✅ means the JVM will connect to a JITServer instance and ❌ means it won't.
-XX:+UseJITServer
Post-Restore-XX:+UseJITServer
Pre-Checkpoint; No Options Post-Restore-XX:+UseJITServer
Pre-Checkpoint;-XX:-UseJITServer
Post-Restore-XX:-UseJITServer
Pre-Checkpoint;-XX:+UseJITServer
Post-RestoreThis PR also adds cmdLineTester tests for jitserver, both by itself and in the context of CRIU.