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

Improve JITServer/test compatibility with JITAAS #19629

Open
cjjdespres opened this issue Jun 5, 2024 · 1 comment
Open

Improve JITServer/test compatibility with JITAAS #19629

cjjdespres opened this issue Jun 5, 2024 · 1 comment

Comments

@cjjdespres
Copy link
Contributor

From what I've observed, when the JITServer tests are run with TEST_FLAG=JITAAS a single JITServer instance is started at the beginning of the test run, and that instance stays around until the end of the run. This does not interact well with the -X[no]compressedrefs options; since the JITServer and client must agree on whether or not -Xcompressedrefs is enabled in order to connect with each other, any test with -Xnocompressedrefs as a JVM option will not use the JITServer at all. This is the only option that can cause a client/server incompatibility - the other sources of incompatibility are the JITServer protocol version and the JDK version, and both of those will always match in a given test run.

To fix this, a better approach would be to do the following for each test individually:

  1. Check if -Xnocompressedrefs is in the JVM options
  2. Start a fresh JITServer instance, passing in -Xnocompressedrefs if necessary
  3. Run the test
  4. Kill the JITServer after the test finishes

If we ever add more runtime options that change client/server compatibility, we could add a check for those in (1) as well.

In (4) we might also consider checking to see if the server is still running before killing it and cause the test to fail if it isn't, just to make sure it didn't crash partway through the test. That might be a separate issue, though.

@cjjdespres
Copy link
Contributor Author

@llxia Is my understanding of how the JITAAS tests are run correct, and is this sort of change feasible?

@mpirvu FYI

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

No branches or pull requests

1 participant