Hide Forgot
I'm fairly sure this is due to the following SIGAR bug: http://jira.hyperic.com/browse/SIGAR-216
This issue can be reproduced with the Sigar test shell: - Using a Linux machine with multiple CPU(s) - Execute: java -jar lib/sigar-1.6.3.82.jar - sigar> cpuinfo ... output shows 2 CPUs - From another terminal: echo 0 > /sys/devices/system/cpu/cpu1/online - sigar> cpuinfo ... output shows 1 CPU - From another terminal: echo 1 > /sys/devices/system/cpu/cpu1/online - sigar> cpuinfo Unexpected exception processing command 'cpuinfo': java.lang.ArrayIndexOutOfBoundsException: 1 java.lang.ArrayIndexOutOfBoundsException: 1 at org.hyperic.sigar.Sigar.getCpuPercList(Sigar.java:379) at org.hyperic.sigar.cmd.CpuInfo.output(CpuInfo.java:64) at org.hyperic.sigar.cmd.SigarCommandBase.processCommand(SigarCommandBase.java:188) at org.hyperic.sigar.shell.ShellBase.processCommand(ShellBase.java:397) at org.hyperic.sigar.cmd.Shell.processCommand(Shell.java:122) at org.hyperic.sigar.shell.ShellBase.handleCommand(ShellBase.java:364) at org.hyperic.sigar.shell.ShellBase.handleCommand(ShellBase.java:310) at org.hyperic.sigar.shell.ShellBase.run(ShellBase.java:289) at org.hyperic.sigar.cmd.Shell.main(Shell.java:222) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.hyperic.sigar.cmd.Runner.main(Runner.java:214)
Any word on getting a new 1.6 version of Sigar with the fix indicated in the upstream JIRA?
If you are comfortable that the fix works, I will go ahead and ask Doug from Hyperic to cut a 1.6.5 release for us. Let me know.
(In reply to comment #4) Yes. The fix does work and seems very valid so I think it is safe to proceed. I have not looked at the commit history since 1.6.3 so am not sure what else may be impacted so you may want to confirm before we look into that.
We actually already upgraded RHQ to SIGAR 1.6.4 last week in order to obtain several other bug fixes. The regression test suite passed after the upgrade, so it's looking promising. I don't think 1.6.5 is going to add much besides this ArrayIndexOutOfBoundsException fix, since 1.6.4. was just released a couple weeks ago and most new development is happening on 1.7.0 now. I'll go ahead and ask Doug for a 1.6.5.
Upgraded to SIGAR 1.6.5 (git commit d6abc10) - pushed to master branch. TEST STEPS ========== 1) Install RHQ Agent on a Linux machine with multiple CPUs. 2) Verify that CPU Resources (one for each of the CPUs) are in RHQ inventory and are green. 3) On the CPU Resources, enable all metrics and change the collection interval to 1 minute. Wait a couple minutes and verify that all the metrics are being collected successfully. 4) From a terminal on the Agent box, disable CPU 1: sudo echo 0 > /sys/devices/system/cpu/cpu1/online 5) Wait a couple minutes and verify that all the metrics are still being collected successfully. Grep the Agent log for ArrayIndexOutOfBoundsException (the tack trace in Comment 1 above) and verify you don't see any occurrences. 6) From a terminal on the Agent box, re-enable CPU 1: sudo echo 1 > /sys/devices/system/cpu/cpu1/online 7) Wait a couple minutes and verify that all the metrics are still being collected successfully. Grep the Agent log for ArrayIndexOutOfBoundsException (the stack trace in Comment 1 above) and verify you don't see any occurrences.
QA Verified.
Mass-closure of verified bugs against JON.