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

Fix Oracle JDK8 support #2551

Merged
merged 4 commits into from
Apr 1, 2021
Merged

Fix Oracle JDK8 support #2551

merged 4 commits into from
Apr 1, 2021

Conversation

jbachorik
Copy link
Contributor

@jbachorik jbachorik commented Mar 26, 2021

There are two main problems in the first version of Oracle JDK 8 support:

  • Trying to initialize JFR in premain will deadlock - postponing the initialization after JMX has been initialized seems to work around this problem
  • Oracle JDK8 JFR is generating recordings which are compressed by default - this leads to taking a different branch in the stream-to-stream compression where a call to output stream close() is not overridden not to propagate to the underlying Okio output stream and this in turn will cause closing the Okio sink. Fixing the other branch to have the same handling of close() method will resolve this problem.

As a side effect I rewrote the profiling integration tests into JUnit5 when I realized that a whole portion of assertions in the spock test was not being evaluated because of a strange interplay between a condition guarding the assertions and the assertions themselves.

@jbachorik jbachorik changed the title WIP Fix Oracle JDK8 support Mar 26, 2021
@jbachorik jbachorik force-pushed the jb/fix_oracle8 branch 2 times, most recently from a11db49 to 547422f Compare March 29, 2021 14:16
- Initialize the profiling controller only after JMX has been initialized.
- Never propagate `close()` call to Okio output stream
@jbachorik jbachorik marked this pull request as ready for review April 1, 2021 09:47
@jbachorik jbachorik requested review from a team as code owners April 1, 2021 09:47
@bantonsson
Copy link
Contributor

BTW @jbachorik latest_8 is currently failing, but will be fixed after #2568 is merged.

@jbachorik jbachorik merged commit 2a7b04d into master Apr 1, 2021
@jbachorik jbachorik deleted the jb/fix_oracle8 branch April 1, 2021 13:57
@github-actions github-actions bot added this to the 0.78.0 milestone Apr 1, 2021
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

Successfully merging this pull request may close these issues.

3 participants