Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
505 views
in Technique[技术] by (71.8m points)

vmware - 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();
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...