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

DRILL-8446: Incorrect use of OperatingSystemMXBean #2843

Merged
merged 2 commits into from
Nov 7, 2023

Conversation

jnturton
Copy link
Contributor

@jnturton jnturton commented Nov 1, 2023

DRILL-8446: Incorrect use of OperatingSystemMXBean

Description

Simplify CpuGaugeSet fixing the non-Sun/Oracle code path in the process.

The com.sun.management internal implementation of OperatingSystemMXBean is used by Drill to report a CPU metric that is not available in the public interface. Even though code to handle non-Sun/Oracle runtimes for the OperatingSystemMXBean was present, it would still cause them to attempt to load a class from com.sun.management causing a NoClassDefFoundError.

Documentation

N/A

Testing

Launch Drill and check the affected gauges in

  • OpenJDK 64-Bit Server VM (build 17.0.9+9-Debian-1, mixed mode, sharing)
  • IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20230817_56476 (JIT enabled, AOT enabled)

@jnturton jnturton added bug backport-to-stable This bug fix is applicable to the latest stable release and should be considered for inclusion there labels Nov 1, 2023
@jnturton jnturton self-assigned this Nov 1, 2023
@jnturton jnturton force-pushed the 8446-sun-mx-bean branch 2 times, most recently from 80f1c48 to 6f2966f Compare November 1, 2023 06:53
The com.sun.management internal implementation of OperatingSystemMXBean is
used by Drill to report a CPU metric that is not available in the public
interface. Even though code to handle non-Sun/Oracle runtimes for the
OperatingSystemMXBean was present, it would still cause them to attempt to
load a class from com.sun.management causing a NoClassDefFoundError.
Copy link
Contributor

@cgivre cgivre left a comment

Choose a reason for hiding this comment

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

LGTM +1

@jnturton Does this fix the Splunk flaky test?

@jnturton
Copy link
Contributor Author

jnturton commented Nov 7, 2023

LGTM +1

@jnturton Does this fix the Splunk flaky test?

Hopefully.

@jnturton jnturton merged commit 75b1f2a into apache:master Nov 7, 2023
jnturton added a commit that referenced this pull request Dec 31, 2023
* Simplify CpuGaugeSet fixing the non-Sun/Oracle code path in the process.

* Prevent flaky Splunk test from failing the CI test run.
jnturton added a commit to jnturton/drill that referenced this pull request Dec 31, 2023
* Simplify CpuGaugeSet fixing the non-Sun/Oracle code path in the process.

* Prevent flaky Splunk test from failing the CI test run.
jnturton added a commit to jnturton/drill that referenced this pull request Dec 31, 2023
* Simplify CpuGaugeSet fixing the non-Sun/Oracle code path in the process.

* Prevent flaky Splunk test from failing the CI test run.
jnturton added a commit to jnturton/drill that referenced this pull request Jan 3, 2024
* Simplify CpuGaugeSet fixing the non-Sun/Oracle code path in the process.

* Prevent flaky Splunk test from failing the CI test run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-stable This bug fix is applicable to the latest stable release and should be considered for inclusion there bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants