简体   繁体   中英

Sigar 1.6.4 is crashing: EXCEPTION_ACCESS_VIOLATION

I'm using the Sigar library for Java and I'm getting this error:

A fatal error has been detected by the Java Runtime Environment: EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000010014ed4, pid=1560, tid=4812

Here you can see the generated error log. (As well as my machine specs)

This happens randomly after the program is running for some hours. Then, it crashes and I can not monitor any parameter (cpu, ram, disk... ) anymore. It is so annoying and makes SIGAR totally useless as you can not trust on whether it is going to crash or not.

I've been reading this two topics about it, but it seems a problem of the library an no proper solutions are proposed (and the library doesn't look to have fixed the error)

There's a guy talking about how to solve it for 64 bits in this answer , but that file is not even available to download. (there's no java/src folder).

Any idea about how to deal with it? Is it even fixable? If not, which alternatives to Sigar would you suggest me?

In case this is relevant, these are the Sigar functions I'm using in my applications:

 - new Sigar();
 - Sigar.getProcCpu();
 - Sigar.getCpuList();

 - new ProcessFinder();
 - ProcessFinder.find();

 - new ProcCpu();
 - ProcCpu.gather();

 - new ProcMem();
 - ProcMem.gather();
 - ProcMem.getResident()

 - ProcCpu.getTotal();
 - ProcCpu.getLastTime();

 - Sigar.getMem();
 - Mem.getActualFree();
 - Mem.getActualUsed();
 - Mem.getFree();
 - Mem.getRam();
 - Mem.getTotal();
 - Mem.getUsed();
 - Mem.getUsedPercent();

 - new FileSystemUsage();
 - FileSystemUsage.getFree();
 - FileSystemUsage.getUsed();

Any idea about how to deal with it?

The thread stack trace from the error dump is as follows:

Stack: [0x000000000d180000,0x000000000d280000],  sp=0x000000000d27f3c0,  free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [sigar-amd64-winnt.dll+0x14ed4]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J  org.hyperic.sigar.ptql.SigarProcessQuery.find(Lorg/hyperic/sigar/Sigar;)[J
J  com.hpuk.sentinel.monitor.Monitor.getData()Ljava/util/List;
J  com.hpuk.schedule.Scheduler.run()V
v  ~StubRoutines::call_stub

That seems to be saying that the problem is happening in the SIGAR native library.

What can you do?

  • You could look to see if someone else has reported the problem. (The SIGAR-192 issue that you found looks very different to your problem.).

  • You could report the problem and wait to see if the maintainers can offer a solution. (But spicing up bug report with inflammatory remarks like "SIGAR is useless" is a really bad idea ...)

  • You could upgrade to a later version of SIGAR to see if that helps. (Currently, that is 1.7 ... which is not marked as "stable" yet.)

  • You could download the SIGAR source code and try to debug the problem yourself.

  • You could contact VMWare and ask them if you could get a support contract. It seems that Hyperic is now a VMWare product ...

  • Or ... you could give up.

Is it even fixable?

Of course it is ... but you might need to expend significant effort to fix it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM