Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8193807

AIX: avoid UnsatisfiedLinkError by providing empty basic implementations of getSystemCpuLoad and getProcessCpuLoad

XMLWordPrintable

        The following has been reported on the ppc-aix-port-dev mailing list about running openjdk8 on AIX :
        http://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/2017-December/003303.html

        I'm getting an unsatisfied link error when using logstash on AIX but I suspect the issue is with AIX or the JRE, the exception is:

        java.lang.UnsatisfiedLinkError: sun.management.OperatingSystemImpl.getProcessCpuLoad()D
                          getProcessCpuLoad at sun/management/OperatingSystemImpl.java:-2
                                     <init> at org/logstash/instrument/monitors/ProcessMonitor.java:40
                                     detect at org/logstash/instrument/monitors/ProcessMonitor.java:79
                                   generate at org/logstash/instrument/reports/ProcessReport.java:15

        this is the line in logstash:

        this.cpuProcessPercent = scaleLoadToPercent(unixOsBean.getProcessCpuLoad());

        https://github.com/elastic/logstash/blob/master/logstash-core/src/main/java/org/logstash/instrument/monitors/ProcessMonitor.java

        Could anybody help steer me in the right direction?
        ---------------------------------------------------------------------------------------------
        An investigation of the issue shows that the native methods
        Java_sun_management_OperatingSystemImpl_getProcessCpuLoad
        Java_sun_management_OperatingSystemImpl_getSystemCpuLoad
        are missing for AIX in jdk8.
        In jdk9 the problem is not present because AIX has 9/jdk/src/jdk.management/aix/native/libmanagement_ext/UnixOperatingSystem.c containing empty basic implementations.
        The fix will provide empty basic implementations as well for AIX in 8.

              mbaesken Matthias Baesken
              mbaesken Matthias Baesken
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: