Skip to content

6.3.0 throws exception on AIX from AixCentralProcessor.java:113 #2228

@mnellemann

Description

@mnellemann

Hi,

After upgrading oshi-core from 6.2.2 to 6.3.0 I started getting errors when running on AIX:

java.lang.ArithmeticException: divide by zero
        at oshi.hardware.platform.unix.aix.AixCentralProcessor.initProcessorCounts(AixCentralProcessor.java:113)
        at oshi.hardware.common.AbstractCentralProcessor.<init>(AbstractCentralProcessor.java:65)
        at oshi.hardware.platform.unix.aix.AixCentralProcessor.<init>(AixCentralProcessor.java:38)
        at oshi.hardware.platform.unix.aix.AixHardwareAbstractionLayer.createProcessor(AixHardwareAbstractionLayer.java:55)
        at oshi.util.Memoizer$1.get(Memoizer.java:61)
        at oshi.hardware.common.AbstractHardwareAbstractionLayer.getProcessor(AbstractHardwareAbstractionLayer.java:48)
        at sysmon.plugins.os_base.BaseProcessorExtension.getMetrics(BaseProcessorExtension.java:84)

Call in my code is from BaseProcessorExtension.java:84, which works as expected with 6.2.2.

Code is tested on a Power9 LPAR (VM/Guest) running AIX 7200-05-04-2220.
System configuration: type=Dedicated mode=Capped smt=8 lcpu=8 mem=4096MB

Works fine on Linux - have not tested on any other OS.

Have I missed something important in the release notes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed bugConfirmed bugs. Highest priority to fix.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions