scheduling icon indicating copy to clipboard operation
scheduling copied to clipboard

Node logs are flooded with SigarExceptions on some windows machines

Open fviale opened this issue 8 years ago • 0 comments

The following errors are printed over and over on some windows machine.

2018-01-03 14:26:01,985 - org.hyperic.sigar.SigarException: Array index 20 out of bounds 16
2018-01-03 14:26:01,985 - 	at org.hyperic.sigar.SigarInvoker.invoke(SigarInvoker.java:267)
2018-01-03 14:26:01,985 - 	at org.hyperic.sigar.SigarInvoker.invoke(SigarInvoker.java:215)
2018-01-03 14:26:01,985 - 	at org.hyperic.sigar.jmx.SigarInvokerJMX.invoke(SigarInvokerJMX.java:199)
2018-01-03 14:26:01,985 - 	at org.hyperic.sigar.jmx.ReflectedMBean.getAttribute(ReflectedMBean.java:137)
2018-01-03 14:26:01,985 - 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647)
2018-01-03 14:26:01,985 - 	at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678)
2018-01-03 14:26:01,985 - 	at org.ow2.proactive.resourcemanager.utils.RRDSigarDataStore.sample(RRDSigarDataStore.java:174)
2018-01-03 14:26:01,985 - 	at org.ow2.proactive.resourcemanager.utils.RRDSigarDataStore.run(RRDSigarDataStore.java:153)

The problem comes from the sigar code, which outputs stack traces to stderr directly:

https://github.com/hyperic/sigar/blob/master/bindings/java/src/org/hyperic/sigar/jmx/ReflectedMBean.java#L155

The only workaround is to redirect stderr to a temporary string before calling getAttribute (and then decide what to do with the exception)

fviale avatar Jan 03 '18 14:01 fviale