简体   繁体   English

Sigar 1.6.4崩溃:EXCEPTION_ACCESS_VIOLATION

[英]Sigar 1.6.4 is crashing: EXCEPTION_ACCESS_VIOLATION

I'm using the Sigar library for Java and I'm getting this error: 我正在使用Sigar库的Java,我收到此错误:

A fatal error has been detected by the Java Runtime Environment: EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000010014ed4, pid=1560, tid=4812 Java运行时环境检测到致命错误:pc = 0x0000000010014ed4处的EXCEPTION_ACCESS_VIOLATION(0xc0000005),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. 然后,它崩溃了,我不能再监视任何参数(cpu,ram,disk ...)。 It is so annoying and makes SIGAR totally useless as you can not trust on whether it is going to crash or not. 它是如此烦人, 使SIGAR完全没用,因为你不能相信它是否会崩溃。

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. 在这个答案中有一个人正在讨论如何解决64位问题 ,但该文件甚至无法下载。 (there's no java/src folder). (没有java/src文件夹)。

Any idea about how to deal with it? 有关如何处理它的任何想法? Is it even fixable? 它甚至可以修复吗? If not, which alternatives to Sigar would you suggest me? 如果没有,你会建议我使用Sigar的哪些替代品?

In case this is relevant, these are the Sigar functions I'm using in my applications: 如果这是相关的,这些是我在我的应用程序中使用的Sigar函数:

 - 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. 这似乎是说问题发生在SIGAR本机库中。

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.). (您发现的SIGAR-192问题看起来与您的问题非常不同。)

  • 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 ...) (但是像“SIGAR无用”这样的煽动性言论煽动错误报告是一个非常糟糕的主意......)

  • You could upgrade to a later version of SIGAR to see if that helps. 您可以升级到更高版本的SIGAR以查看是否有帮助。 (Currently, that is 1.7 ... which is not marked as "stable" yet.) (目前,这是1.7 ......尚未标记为“稳定”。)

  • You could download the SIGAR source code and try to debug the problem yourself. 您可以下载SIGAR源代码并尝试自己调试问题。

  • You could contact VMWare and ask them if you could get a support contract. 您可以联系VMWare并询问他们是否可以获得支持合同。 It seems that Hyperic is now a VMWare product ... 似乎Hyperic现在是VMWare产品......

  • Or ... you could give up. 或者......你可以放弃。

Is it even fixable? 它甚至可以修复吗?

Of course it is ... but you might need to expend significant effort to fix it. 当然它是......但你可能需要花费大量精力来修复它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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