How to prevent EXCEPTION_FLT_DIVIDE_BY_ZERO with JNA? - java

I receive the follow sporadic crash with JNA. Are there any JNA settings to prevent this?
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_FLT_DIVIDE_BY_ZERO (0xc000008e) at pc=0x0000000000b6ec60, pid=2364, tid=3908
#
# JRE version: Java(TM) SE Runtime Environment (8.0_74-b02) (build 1.8.0_74-b02)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.74-b02 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# v ~RuntimeStub::unwind_exception Runtime1 stub
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# ....\hs_err_pid2364.log
Compiled method (c1) 425393 12999 ! 3 database.DatabaseUtils::executeQuery (83 bytes)
total in heap [0x00000000028d1350,0x00000000028d2e98] = 6984
relocation [0x00000000028d1470,0x00000000028d15b0] = 320
main code [0x00000000028d15c0,0x00000000028d26a0] = 4320
stub code [0x00000000028d26a0,0x00000000028d27a8] = 264
oops [0x00000000028d27a8,0x00000000028d27b8] = 16
metadata [0x00000000028d27b8,0x00000000028d2818] = 96
scopes data [0x00000000028d2818,0x00000000028d2bf0] = 984
scopes pcs [0x00000000028d2bf0,0x00000000028d2e20] = 560
dependencies [0x00000000028d2e20,0x00000000028d2e28] = 8
handler table [0x00000000028d2e28,0x00000000028d2e58] = 48
nul chk table [0x00000000028d2e58,0x00000000028d2e98] = 64
Compiled method (c1) 425394 12999 ! 3 database.DatabaseUtils::executeQuery (83 bytes)
total in heap [0x00000000028d1350,0x00000000028d2e98] = 6984
relocation [0x00000000028d1470,0x00000000028d15b0] = 320
main code [0x00000000028d15c0,0x00000000028d26a0] = 4320
stub code [0x00000000028d26a0,0x00000000028d27a8] = 264
oops [0x00000000028d27a8,0x00000000028d27b8] = 16
metadata [0x00000000028d27b8,0x00000000028d2818] = 96
scopes data [0x00000000028d2818,0x00000000028d2bf0] = 984
scopes pcs [0x00000000028d2bf0,0x00000000028d2e20] = 560
dependencies [0x00000000028d2e20,0x00000000028d2e28] = 8
handler table [0x00000000028d2e28,0x00000000028d2e58] = 48
nul chk table [0x00000000028d2e58,0x00000000028d2e98] = 64
Compiled method (c1) 425394 12999 ! 3 database.DatabaseUtils::executeQuery (83 bytes)
total in heap [0x00000000028d1350,0x00000000028d2e98] = 6984
relocation [0x00000000028d1470,0x00000000028d15b0] = 320
main code [0x00000000028d15c0,0x00000000028d26a0] = 4320
stub code [0x00000000028d26a0,0x00000000028d27a8] = 264
oops [0x00000000028d27a8,0x00000000028d27b8] = 16
metadata [0x00000000028d27b8,0x00000000028d2818] = 96
scopes data [0x00000000028d2818,0x00000000028d2bf0] = 984
scopes pcs [0x00000000028d2bf0,0x00000000028d2e20] = 560
dependencies [0x00000000028d2e20,0x00000000028d2e28] = 8
handler table [0x00000000028d2e28,0x00000000028d2e58] = 48
nul chk table [0x00000000028d2e58,0x00000000028d2e98] = 64
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#

Related

OpenJDK11 crash when call BigDecimal.sqrt

I'm using openjdk-11 running my application, bu the jvm frequent unexplained crash. The log mentioned that the method of BigDecimal.sqrt was called and crashed, but this method was not called in my code.
This is my code for getBetweenSeconds method in DateUtil:
public static long getBetweenSeconds(Date from, Date to) {
return Math.abs((to.getTime() - from.getTime()) / 1000);
}
Following is the full log file:
full log file
Following is the crash log:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007eff70883f62, pid=32037, tid=32143
#
# JRE version: OpenJDK Runtime Environment 18.9 (11.0.12+7) (build 11.0.12+7-LTS)
# Java VM: OpenJDK 64-Bit Server VM 18.9 (11.0.12+7-LTS, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# j java.math.BigDecimal.sqrt(Ljava/math/MathContext;)Ljava/math/BigDecimal;+1 java.base#11.0.12
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %e" (or dumping to /home/crown/service/core.32037)
#
# If you would like to submit a bug report, please visit:
# https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%208&component=java-11-openjdk
#
--------------- S U M M A R Y ------------
Command Line: -Xmx5120m -XX:MaxMetaspaceSize=200m -Dserver.port=9090 -Dwebsocket.port=9100 -Dserver.number=S001 -Dspring.profiles.active=prod -Dapplication.exchange=OKEX -Dapplication.get-ticker-info=false -Dlog4j2.formatMsgNoLookups=true /home/crown/service/crown-service-9090.jar
Host: Intel(R) Xeon(R) Platinum 8269CY CPU # 2.50GHz, 2 cores, 7G, Alibaba Cloud Linux release 3 (Soaring Falcon)
Time: Mon Feb 28 22:44:01 2022 CST elapsed time: 115.158780 seconds (0d 0h 1m 55s)
--------------- T H R E A D ---------------
Current thread (0x00007eff896e6800): JavaThread "RBT-SWAP-OKE-s3RXY" [_thread_in_Java, id=32143, stack(0x00007eff0edc9000,0x00007eff0eeca000)]
Stack: [0x00007eff0edc9000,0x00007eff0eeca000], sp=0x00007eff0eec8520, free space=1021k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
j java.math.BigDecimal.sqrt(Ljava/math/MathContext;)Ljava/math/BigDecimal;+1 java.base#11.0.12
j com.liuqi.utils.DateUtil.getBetweenSeconds(Ljava/util/Date;Ljava/util/Date;)J+5
j com.liuqi.robotruntime.robots.AbstractSWAPRobot.handleNewPrice(Lcom/liuqi/robotruntime/ContractOrder;Ljava/math/BigDecimal;Ljava/math/BigDecimal;Ljava/lang/String;Ljava/lang/String;)V+33
J 13459% c2 com.liuqi.robotruntime.robots.AbstractSWAPRobot.lambda$startExecute$2()V (524 bytes) # 0x00007eff78aebae8 [0x00007eff78ae8240+0x00000000000038a8]
j com.liuqi.robotruntime.robots.AbstractSWAPRobot$$Lambda$882.run()V+4
j java.lang.Thread.run()V+11 java.base#11.0.12
v ~StubRoutines::call_stub
V [libjvm.so+0x8c42a9] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x3b9
V [libjvm.so+0x8c268e] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, Thread*)+0x1ae
V [libjvm.so+0x97ce90] thread_entry(JavaThread*, Thread*)+0x80
V [libjvm.so+0xe8f428] JavaThread::thread_main_inner()+0x268
V [libjvm.so+0xe8a6df] Thread::call_run()+0x14f
V [libjvm.so+0xc68886] thread_native_entry(Thread*)+0xf6
siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000017f40c9cbbe
Register to memory mapping:
RAX=0x0 is NULL
RBX=0x0000000000000014 is an unknown value
RCX=0x0000017f40c9cbb6 is an unknown value
RDX=0x0000000040000001 is an unknown value
RSP=0x00007eff0eec8520 is pointing into the stack for thread: 0x00007eff896e6800
RBP=0x00007eff0eec8578 is pointing into the stack for thread: 0x00007eff896e6800
RSI=0x00007eff896e73e0 points into unknown readable memory: 0x0000001e00000003 | 03 00 00 00 1e 00 00 00
RDI={method} {0x00000008000a5390} 'sqrt' '(Ljava/math/MathContext;)Ljava/math/BigDecimal;' in 'java/math/BigDecimal'
R8 =0x00007eff89bc34f0 points into unknown readable memory: 0x0000000800104280 | 80 42 10 00 08 00 00 00
R9 =0x0000000000000004 is an unknown value
R10=0x00007eff8fe9cfa0: <offset 0x0000000001317fa0> in /usr/lib/jvm/java-11-openjdk-11.0.12.0.7-0.1.al8.x86_64/lib/server/libjvm.so at 0x00007eff8eb85000
R11=0x00007eff70889780 is at code_begin+0 in an Interpreter codelet
deoptimization entry points [0x00007eff70889780, 0x00007eff7088b980] 8704 bytes
R12=0x0 is NULL
R13=0x00000008005fd029 is pointing into metadata
R14=0x00007eff0eec8620 is pointing into the stack for thread: 0x00007eff896e6800
R15=0x00007eff896e6800 is a thread

JMH: Could not create SecurityManager: worker.org.gradle.process.internal.worker.child.BootstrapSecurityManager

I am trying to do API benchmarking using JMH. An error occurred during the initialization of VM: Not sure what can I do to fix this one. Could you please take a look at the below console output.
# JMH version: 1.21
# VM version: JDK 1.8.0_275, OpenJDK 64-Bit Server VM, 25.275-b01
# VM invoker: /Users/vbais/.sdkman/candidates/java/8.0.275.hs-adpt/jre/bin/java
# VM options: -Djava.security.manager=worker.org.gradle.process.internal.worker.child.BootstrapSecurityManager -Dorg.gradle.native=false -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=49776 -javaagent:build/tmp/expandedArchives/org.jacoco.agent-0.8.2.jar_56a88f9ce507637adfc797f83ef298ef/jacocoagent.jar=destfile=build/jacoco/test.exec,append=true,inclnolocationclasses=false,dumponexit=true,output=file,jmx=false -Dfile.encoding=UTF-8 -Duser.country=IN -Duser.language=en -Duser.variant -ea
# Warmup: 5 iterations, 10 s each
# Measurement: 5 iterations, 10 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: ServiceCTest.extracted
# Run progress: 0.00% complete, ETA 00:03:20
# Fork: 1 of 2
Error occurred during initialization of VM
java.lang.InternalError: Could not create SecurityManager: worker.org.gradle.process.internal.worker.child.BootstrapSecurityManager
at sun.misc.Launcher.<init>(Launcher.java:106)
at sun.misc.Launcher.<clinit>(Launcher.java:54)
at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1444)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1429)
<forked VM failed with exit code 1>
<stdout last='20 lines'>
Error occurred during initialization of VM
java.lang.InternalError: Could not create SecurityManager: worker.org.gradle.process.internal.worker.child.BootstrapSecurityManager
at sun.misc.Launcher.<init>(Launcher.java:106)
at sun.misc.Launcher.<clinit>(Launcher.java:54)
at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1444)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1429)
The code which I am trying to benchmark:
#Test
public void trial() throws ParseException, InterruptedException, RunnerException {
Application app = TestUtil.application(4,5,3);
getOpsRest().postForObject(getInternalUrl() + "v1/Application", app,Application.class);
Options opt = new OptionsBuilder()
.include(".*")
.forks(2)
.build();
new Runner(opt).run();
}
#BenchmarkMode(Mode.AverageTime)
#Benchmark
public void extracted() {
LocalDateTime ldt = LocalDateTime.now().minusDays(30);
String lastEvaluateTime = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH).format(ldt);
ResponseEntity<OrgExpiryInfo[]> a = getRest().getForEntity
(getUrl() + "/abc/'{lastEvaluateTime}'", OrgExpiryInfo[].class, lastEvaluateTime);
}

A fatal error in Junit with objectify

I cannot discover why my integrations tests with objectify that are crashing.
There is no problem when is executed one by one or debuging.
That is the objectify code.
protected void before() throws Throwable {
original = ObjectifyService.factory();
ObjectifyFactory factory = newObjectifyFactory();
for (Class<?> type : register) {
factory.register(type);
}
ObjectifyService.setFactory(factory);
closeable = ObjectifyService.begin();
}
protected void after() {
ObjectifyService.setFactory(original);
closeable.close();
}
After some tests the runner stop and i receive this message.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000000000003, pid=15104, tid=9848
#
# JRE version: Java(TM) SE Runtime Environment (7.0_80-b15) (build 1.7.0_80-b15)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.80-b11 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C 0x0000000000000003
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as: Compiled method (nm) 7403 625 n java.lang.Class::isInstance (native) total in heap [0x0000000002b4bf10,0x0000000002b4c2b8] = 936 relocation [0x0000000002b4c030,0x0000000002b4c088] = 88 main code [0x0000000002b4c0a0,0x0000000002b4c2b8] = 536 Compiled method (c2) 7404 752 java.lang.invoke.LambdaForm$NamedFunction::invoke_L_L (28 bytes) total in heap [0x0000000002c38490,0x0000000002c38778] = 744 relocation [enter image description here][1][0x0000000002c385b0,0x0000000002c385d0] = 32 main code [0x0000000002c385e0,0x0000000002c38660] = 128 stub code [0x0000000002c38660,0x0000000002c38698] = 56 oops [0x0000000002c38698,0x0000000002c386a0] = 8 scopes data [0x0000000002c386a0,0x0000000002c386e8] = 72 scopes pcs [0x0000000002c386e8,0x0000000002c38748] = 96 dependencies [0x0000000002c38748,0x0000000002c38750] = 8 handler table [0x0000000002c38750,0x0000000002c38768] = 24 nul chk table [0x0000000002c38768,0x0000000002c38778] = 16
Whatever you are seeing here is a JVM bug. This is not supposed to be possible. Make sure you have the most recent version of the JDK installed, and if so, the only place you can really file an issue is with Oracle :-(

Calling C# dll (wrapped in C++) in Java / A fatal error has been detected by the Java Runtime Environment

I was following this link how to wrap a c# library for use in java
I think I didn't miss anything but I'm getting a crash.
Here's codes,
Java (project - package - class / jnitest - jni - Test1 )
package jni;
public class Test1 {
static {
System.loadLibrary("Test");
// System.load("/lib/Test.dll");
}
public native void displayHelloWorld();
public static void main (String[] args) {
// System.out.println(System.getProperty("java.library.path"));
Test1 t = new Test1();
t.displayHelloWorld();
}
}
JNI Header file generated from java (using eclipse)
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class jni_Test1 */
#ifndef _Included_jni_Test1
#define _Included_jni_Test1
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: jni_Test1
* Method: displayHelloWorld
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_jni_Test1_displayHelloWorld
(JNIEnv *, jobject);
#ifdef __cplusplus
}
#endif
#endif
HelloWorld.h
#using <mscorlib.dll>
#using "CSharpHelloWorld.netmodule"
using namespace System;
public ref class HelloWorldC
{
public:
// Provide .NET interop and garbage collecting to the pointer.
CSharpHelloWorld^ t;
HelloWorldC() {
t = gcnew CSharpHelloWorld();
// Assign the reference a new instance of the object
}
// This inline function is called from the C++ Code
void callCSharpHelloWorld() {
t->displayHelloWorld();
}
};
HelloWorld.cpp
#include <jni.h>
#include "jni_Test1.h"
#include "HelloWorld.h"
// This is the JNI call to the Managed C++ Class
// NOTE: When the java header was created, the package name was not include in the JNI call.
// This naming convention was corrected by adding the
// "helloworld" name following the following syntax:
// Java_<package name>_<class name>_<method name>
JNIEXPORT void JNICALL Java_jni_Test1_displayHelloWorld(JNIEnv *jn, jobject jobj) {
// Instantiate the MC++ class.
HelloWorldC^ t = gcnew HelloWorldC();
// The actual call is made.
t->callCSharpHelloWorld();
}
I'm using Visual Studio 2013 and when I tried to use * like reference link did, it gives me an error so I had to change in that way it doesn't thrown an error. (such as * -> ^, __gc -> gcnew and so on)
I succeeded to create dll file and put it in classpath and when I launched java file, it gives me error/log below
[error]
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (0xe0434352), pid=8020, tid=14744
#
# JRE version: Java(TM) SE Runtime Environment (8.0_31-b13) (build 1.8.0_31-b13)
# Java VM: Java HotSpot(TM) Client VM (25.31-b07 mixed mode windows-x86 )
# Problematic frame:
# C [KERNELBASE.dll+0xc42d]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\workspace\jnitest\hs_err_pid8020.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
[log]
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (0xe0434352), pid=8020, tid=14744
#
# JRE version: Java(TM) SE Runtime Environment (8.0_31-b13) (build 1.8.0_31-b13)
# Java VM: Java HotSpot(TM) Client VM (25.31-b07 mixed mode windows-x86 )
# Problematic frame:
# C [KERNELBASE.dll+0xc42d]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- T H R E A D ---------------
Current thread (0x00ddc800): JavaThread "main" [_thread_in_native, id=14744, stack(0x00f10000,0x00f60000)]
siginfo: ExceptionCode=0xe0434352, ExceptionInformation=0x80070002 0x00000000 0x00000000 0x00000000 0x6e980000
Registers:
EAX=0x00f5e3b0, EBX=0x00000005, ECX=0x00000005, EDX=0x00000000
ESP=0x00f5e3b0, EBP=0x00f5e400, ESI=0x00f5e46c, EDI=0x00000001
EIP=0x76a4c42d, EFLAGS=0x00000212
Top of Stack: (sp=0x00f5e3b0)
0x00f5e3b0: e0434352 00000001 00000000 76a4c42d
0x00f5e3c0: 00000005 80070002 00000000 00000000
0x00f5e3d0: 00000000 6e980000 00f5f578 00000001
0x00f5e3e0: 00000000 006511c4 00004000 00446118
0x00f5e3f0: 00f5e404 758014ad 00412d28 00f5e3b8
0x00f5e400: 00f5e4a0 6ead8fdb e0434352 00000001
0x00f5e410: 00000005 00f5e46c 83662cfd 0043bd10
0x00f5e420: 15a62380 00f5e558 00412d28 00000001
Instructions: (pc=0x76a4c42d)
0x76a4c40d: 02 50 ff 75 14 8d 45 c4 50 e8 57 ad 02 00 83 c4
0x76a4c41d: 0c eb 03 89 45 c0 8d 45 b0 50 ff 15 5c 11 a4 76
0x76a4c42d: c9 c2 10 00 cc cc cc cc cc 8b ff 55 8b ec 56 8b
0x76a4c43d: 75 08 83 fe f4 72 18 83 fe f6 77 13 8d 45 08 50
Register to memory mapping:
EAX=0x00f5e3b0 is pointing into the stack for thread: 0x00ddc800
EBX=0x00000005 is an unknown value
ECX=0x00000005 is an unknown value
EDX=0x00000000 is an unknown value
ESP=0x00f5e3b0 is pointing into the stack for thread: 0x00ddc800
EBP=0x00f5e400 is pointing into the stack for thread: 0x00ddc800
ESI=0x00f5e46c is pointing into the stack for thread: 0x00ddc800
EDI=0x00000001 is an unknown value
Stack: [0x00f10000,0x00f60000], sp=0x00f5e3b0, free space=312k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [KERNELBASE.dll+0xc42d]
C [clr.dll+0x158fdb]
C [clr.dll+0x2cd607]
C [clr.dll+0x2d57bc]
C [clrjit.dll+0x38a6]
C [clrjit.dll+0x2b72c]
C [clrjit.dll+0x3066]
C [clrjit.dll+0x325b]
C [clrjit.dll+0x12fb]
C [clrjit.dll+0x152b]
C [clrjit.dll+0x1668]
C [clrjit.dll+0x17b5]
C [clrjit.dll+0x1802]
C [clr.dll+0x388f9]
C [clr.dll+0x38991]
C [clr.dll+0x389d3]
C [clr.dll+0x38405]
C [clr.dll+0x3878c]
C [clr.dll+0x1497b5]
C [clr.dll+0x1b02b]
C [clr.dll+0x2a0c]
C 0x00f0177f
C 0x0067b3f5
j jni.Test1.displayHelloWorld()V+0
j jni.Test1.main([Ljava/lang/String;)V+9
v ~StubRoutines::call_stub
V [jvm.dll+0x1473e5]
V [jvm.dll+0x20d57e]
V [jvm.dll+0x14747e]
V [jvm.dll+0xd0c27]
V [jvm.dll+0xd91cf]
C [javaw.exe+0x210a]
C [javaw.exe+0xaba1]
C [javaw.exe+0xac2b]
C [kernel32.dll+0x1336a]
C [ntdll.dll+0x39882]
C [ntdll.dll+0x39855]
C 0x00000000
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j jni.Test1.displayHelloWorld()V+0
j jni.Test1.main([Ljava/lang/String;)V+9
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x14ee0000 JavaThread "Service Thread" daemon [_thread_blocked, id=13880, stack(0x15350000,0x153a0000)]
0x14eb6c00 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=2028, stack(0x152d0000,0x15320000)]
0x14eb5800 JavaThread "Attach Listener" daemon [_thread_blocked, id=9236, stack(0x15230000,0x15280000)]
0x14eb2800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=14804, stack(0x150b0000,0x15100000)]
0x14e80c00 JavaThread "Finalizer" daemon [_thread_blocked, id=14892, stack(0x04910000,0x04960000)]
0x14e7b400 JavaThread "Reference Handler" daemon [_thread_blocked, id=13668, stack(0x002f0000,0x00340000)]
=>0x00ddc800 JavaThread "main" [_thread_in_native, id=14744, stack(0x00f10000,0x00f60000)]
Other Threads:
0x14e78000 VMThread [stack: 0x01090000,0x010e0000] [id=13428]
0x14ee1400 WatcherThread [stack: 0x00920000,0x00970000] [id=13024]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap:
def new generation total 4928K, used 795K [0x04a00000, 0x04f50000, 0x09f50000)
eden space 4416K, 18% used [0x04a00000, 0x04ac6ea8, 0x04e50000)
from space 512K, 0% used [0x04e50000, 0x04e50000, 0x04ed0000)
to space 512K, 0% used [0x04ed0000, 0x04ed0000, 0x04f50000)
tenured generation total 10944K, used 0K [0x09f50000, 0x0aa00000, 0x14a00000)
the space 10944K, 0% used [0x09f50000, 0x09f50000, 0x09f50200, 0x0aa00000)
Metaspace used 1695K, capacity 2242K, committed 2368K, reserved 4480K
Card table byte_map: [0x00f60000,0x00ff0000] byte_map_base: 0x00f3b000
Polling page: 0x000e0000
CodeCache: size=32768Kb used=677Kb max_used=677Kb free=32090Kb
bounds [0x02830000, 0x028e0000, 0x04830000]
total_blobs=156 nmethods=19 adapters=70
compilation: enabled
Compilation events (10 events):
Event: 0.135 Thread 0x14eb6c00 15 java.lang.CharacterDataLatin1::getProperties (11 bytes)
Event: 0.135 Thread 0x14eb6c00 nmethod 15 0x028d7808 code [0x028d7900, 0x028d79a0]
Event: 0.135 Thread 0x14eb6c00 16 java.lang.String::toLowerCase (439 bytes)
Event: 0.136 Thread 0x14eb6c00 nmethod 16 0x028d7a48 code [0x028d7c50, 0x028d8440]
Event: 0.136 Thread 0x14eb6c00 17 java.lang.AbstractStringBuilder::append (29 bytes)
Event: 0.137 Thread 0x14eb6c00 nmethod 17 0x028d8e88 code [0x028d8f90, 0x028d907c]
Event: 0.137 Thread 0x14eb6c00 18 java.lang.Character::toLowerCase (9 bytes)
Event: 0.137 Thread 0x14eb6c00 nmethod 18 0x028d9188 code [0x028d9290, 0x028d9338]
Event: 0.137 Thread 0x14eb6c00 19 java.lang.CharacterDataLatin1::toLowerCase (39 bytes)
Event: 0.137 Thread 0x14eb6c00 nmethod 19 0x028d93c8 code [0x028d94c0, 0x028d95a0]
GC Heap History (0 events):
No events
Deoptimization events (0 events):
No events
Internal exceptions (3 events):
Event: 0.091 Thread 0x00ddc800 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.defineClass(Ljava/lang/String;[BII)Ljava/lang/Class; name or signature does not match> (0x04a0b310) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vVG½±¡4·?
Event: 0.091 Thread 0x00ddc800 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.prefetchRead(Ljava/lang/Object;J)V name or signature does not match> (0x04a0b590) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jni.cpp, l>x\b#vÁ?
Event: 0.136 Thread 0x00ddc800 Exception <a 'java/security/PrivilegedActionException'> (0x04abd8e8) thrown at [C:\re\workspace\8-2-build-windows-i586-cygwin\jdk8u31\2394\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
Events (10 events):
Event: 0.139 loading class java/security/AllPermission
Event: 0.139 loading class java/security/AllPermission done
Event: 0.139 loading class java/security/UnresolvedPermission
Event: 0.139 loading class java/security/UnresolvedPermission done
Event: 0.139 loading class java/security/BasicPermissionCollection
Event: 0.139 loading class java/security/BasicPermissionCollection done
Event: 0.140 loading class sun/launcher/LauncherHelper$FXHelper
Event: 0.140 loading class sun/launcher/LauncherHelper$FXHelper done
Event: 0.140 loading class java/lang/Class$MethodArray
Event: 0.140 loading class java/lang/Class$MethodArray done
Dynamic libraries:
0x01130000 - 0x01160000 C:\Program Files (x86)\Java\jre1.8.0_31\bin\javaw.exe
0x776a0000 - 0x77820000 C:\Windows\SysWOW64\ntdll.dll
0x757f0000 - 0x75900000 C:\Windows\syswow64\kernel32.dll
0x76a40000 - 0x76a87000 C:\Windows\syswow64\KERNELBASE.dll
0x771f0000 - 0x77291000 C:\Windows\syswow64\ADVAPI32.dll
0x76790000 - 0x7683c000 C:\Windows\syswow64\msvcrt.dll
0x76750000 - 0x76769000 C:\Windows\SysWOW64\sechost.dll
0x75990000 - 0x75a80000 C:\Windows\syswow64\RPCRT4.dll
0x75010000 - 0x75070000 C:\Windows\syswow64\SspiCli.dll
0x75000000 - 0x7500c000 C:\Windows\syswow64\CRYPTBASE.dll
0x756f0000 - 0x757f0000 C:\Windows\syswow64\USER32.dll
0x769b0000 - 0x76a40000 C:\Windows\syswow64\GDI32.dll
0x76780000 - 0x7678a000 C:\Windows\syswow64\LPK.dll
0x75540000 - 0x755dd000 C:\Windows\syswow64\USP10.dll
0x71420000 - 0x715be000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_41e855142bd5705d\COMCTL32.dll
0x76d70000 - 0x76dc7000 C:\Windows\syswow64\SHLWAPI.dll
0x75690000 - 0x756f0000 C:\Windows\system32\IMM32.DLL
0x77120000 - 0x771ec000 C:\Windows\syswow64\MSCTF.dll
0x779e0000 - 0x77a9f000 C:\Program Files (x86)\Java\jre1.8.0_31\bin\msvcr100.dll
0x530a0000 - 0x53444000 C:\Program Files (x86)\Java\jre1.8.0_31\bin\client\jvm.dll
0x74f40000 - 0x74f47000 C:\Windows\system32\WSOCK32.dll
0x75250000 - 0x75285000 C:\Windows\syswow64\WS2_32.dll
0x75670000 - 0x75676000 C:\Windows\syswow64\NSI.dll
0x6ccf0000 - 0x6cd22000 C:\Windows\system32\WINMM.dll
0x75500000 - 0x75505000 C:\Windows\syswow64\PSAPI.DLL
0x74020000 - 0x7402c000 C:\Program Files (x86)\Java\jre1.8.0_31\bin\verify.dll
0x73ff0000 - 0x74011000 C:\Program Files (x86)\Java\jre1.8.0_31\bin\java.dll
0x73fd0000 - 0x73fe3000 C:\Program Files (x86)\Java\jre1.8.0_31\bin\zip.dll
0x75ad0000 - 0x7671b000 C:\Windows\syswow64\SHELL32.dll
0x76fc0000 - 0x7711c000 C:\Windows\syswow64\ole32.dll
0x77670000 - 0x7767b000 C:\Windows\syswow64\profapi.dll
0x77840000 - 0x77850000 C:\Program Files (x86)\Java\jre1.8.0_31\bin\Test.dll
0x6fb00000 - 0x6fb4a000 C:\Windows\SYSTEM32\MSCOREE.DLL
0x15590000 - 0x1574f000 C:\Windows\system32\MSVCR120D.dll
0x6f9f0000 - 0x6fa6e000 C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll
0x6e980000 - 0x6f01d000 C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
0x6f750000 - 0x6f827000 C:\Windows\system32\MSVCR120_CLR0400.dll
0x6d910000 - 0x6e97b000 C:\Windows\assembly\NativeImages_v4.0.30319_32\mscorlib\d1265d6159ea876f9d63ea4c1361b587\mscorlib.ni.dll
0x6f6d0000 - 0x6f74d000 C:\Windows\Microsoft.NET\Framework\v4.0.30319\clrjit.dll
0x76cd0000 - 0x76d5f000 C:\Windows\syswow64\OLEAUT32.dll
0x5dea0000 - 0x5df71000 C:\Windows\Microsoft.NET\Framework\v4.0.30319\diasymreader.dll
0x6cf70000 - 0x6d90d000 C:\Windows\assembly\NativeImages_v4.0.30319_32\System\d18e2115a3270f89663fce831547f534\System.ni.dll
0x72040000 - 0x7212b000 C:\Windows\system32\dbghelp.dll
VM Arguments:
jvm_args: -Dfile.encoding=Cp1252
java_command: jni.Test1
java_class_path (initial): C:\workspace\jnitest\bin
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_51
PATH=C:/Program Files (x86)/Java/jre1.8.0_31/bin/client;C:/Program Files (x86)/Java/jre1.8.0_31/bin;C:/Program Files (x86)/Java/jre1.8.0_31/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Wizvera\Delfino;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Common Files\Ulead Systems\MPEG;C:\SWTOOLS\ReadyApps;C:\Program Files (x86)\Common Files\Lenovo;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Lenovo\Access Connections\;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files (x86)\Java\jre7\bin;C:\Program Files\nodejs\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Java\jdk1.7.0_51\bin;C:\development\adt-bundle-windows-x86_64\sdk\platform-tools;C:\development\adt-bundle-windows-x86_64\sdk\tools;C:\Program Files\ANT\apache-ant-1.9.3\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\eclipse\mars;
USERNAME=MYUSER
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 7 , 64 bit Build 7601 Service Pack 1
CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 58 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, erms, ht, tsc, tscinvbit, tscinv
Memory: 4k page, physical 8079004k(1694656k free), swap 16156168k(9124340k free)
vm_info: Java HotSpot(TM) Client VM (25.31-b07) for windows-x86 JRE (1.8.0_31-b13), built on Dec 17 2014 20:46:12 by "java_re" with MS VC++ 10.0 (VS2010)
time: Thu Aug 27 16:38:52 2015
elapsed time: 0 seconds (0d 0h 0m 0s)

Java Out of memory EXCEPTION_ACCESS_VIOLATION (0xc0000005)

I have a java application, it had been running for 1 month.
It suddenly crashes with this error message. I use nssm to create windows service for my application.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6ecf4803, pid=4484, tid=1040
#
# JRE version: Java(TM) SE Runtime Environment (7.0_79-b15) (build 1.7.0_79-b15)
# Java VM: Java HotSpot(TM) Server VM (24.79-b02 mixed mode windows-x86 )
# Problematic frame:
# V [jvm.dll+0x154803]
#
# Failed to write core dump. Call to MiniDumpWriteDump() failed
#
# An error report file with more information is saved as:
# D:\dir\hs_err_pid4484.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
This is hs_err_pid4484.log (not Full Log)
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6ecf4803, pid=4484, tid=1040
#
# JRE version: Java(TM) SE Runtime Environment (7.0_79-b15) (build 1.7.0_79-b15)
# Java VM: Java HotSpot(TM) Server VM (24.79-b02 mixed mode windows-x86 )
# Problematic frame:
# V [jvm.dll+0x154803]
#
# Failed to write core dump. Call to MiniDumpWriteDump() failed
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
--------------- T H R E A D ---------------
Current thread (0x2be27800): JavaThread "hz.10.252.223.144.cached.thread-7" [_thread_in_vm, id=1040, stack(0x2d0b0000,0x2d100000)]
siginfo: ExceptionCode=0xc0000005, writing address 0x2d0f77f4
Registers:
EAX=0x00006000, EBX=0x2c4cb7e4, ECX=0x2d0f77f4, EDX=0x2d0b9078
ESP=0x2d0fd800, EBP=0x2d0fd864, ESI=0x00000007, EDI=0x2d0fd7f4
EIP=0x6ecf4803, EFLAGS=0x00010202
Top of Stack: (sp=0x2d0fd800)
0x2d0fd800: 2c4cb7e8 2be27800 6ecf4f93 2be27800
0x2d0fd810: 2b3d0748 2d0fd9cc 00000000 00000000
0x2d0fd820: 00000000 07100146 0008fe12 00000060
0x2d0fd830: 010101ec 00e50358 00000000 2be27930
0x2d0fd840: 6ed1635d 00000000 2c39d2e8 00e50048
0x2d0fd850: 00e50170 2d0fd9d4 0000000a 3ab09782
0x2d0fd860: 2c4cb7e4 2d0fd8ac 6edc479e 2d0fd9cc
0x2d0fd870: 010fd8d4 2d0fd940 01625280 1fe13366
Instructions: (pc=0x6ecf4803)
0x6ecf47e3: a9 00 0d 00 be 01 00 00 00 8b f8 39 35 80 65 0a
0x6ecf47f3: 6f 7c 1b e8 15 54 06 00 0f af c6 8b cf 2b c8 46
0x6ecf4803: c7 01 00 00 00 00 3b 35 80 65 0a 6f 7e e5 5f 5e
0x6ecf4813: c3 cc cc cc cc cc cc cc cc cc cc cc cc 55 8b ec
Register to memory mapping:
EAX=0x00006000 is an unknown value
EBX=0x2c4cb7e4 is an unknown value
ECX=0x2d0f77f4 is pointing into the stack for thread: 0x2be27800
EDX=0x2d0b9078 is pointing into the stack for thread: 0x2be27800
ESP=0x2d0fd800 is pointing into the stack for thread: 0x2be27800
EBP=0x2d0fd864 is pointing into the stack for thread: 0x2be27800
ESI=0x00000007 is an unknown value
EDI=0x2d0fd7f4 is pointing into the stack for thread: 0x2be27800
Stack: [0x2d0b0000,0x2d100000], sp=0x2d0fd800, free space=310k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x154803]
V [jvm.dll+0x22479e]
V [jvm.dll+0x15505d]
V [jvm.dll+0xd7152]
V [jvm.dll+0xd8f7f]
C [instrument.dll+0x2e9e]
C [instrument.dll+0x19c1]
V [jvm.dll+0x118d2e]
V [jvm.dll+0x11c824]
V [jvm.dll+0x39640]
V [jvm.dll+0x4c4e7]
V [jvm.dll+0x10381f]
V [jvm.dll+0x103a6b]
C [java.dll+0x166a]
C [zip.dll+0x1b28]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j java.lang.ClassLoader.defineClass1(Ljava/lang/String;[BIILjava/security/ProtectionDomain;Ljava/lang/String;)Ljava/lang/Class;+0
j java.lang.ClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/ProtectionDomain;)Ljava/lang/Class;+30
j java.security.SecureClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/CodeSource;)Ljava/lang/Class;+12
j java.net.URLClassLoader.defineClass(Ljava/lang/String;Lsun/misc/Resource;)Ljava/lang/Class;+220
J 546 C2 java.net.URLClassLoader$1.run()Ljava/lang/Object; (5 bytes) # 0x0178859c [0x01788080+0x51c]
v ~StubRoutines::call_stub
J 966 java.security.AccessController.doPrivileged(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; (0 bytes) # 0x016a3f07 [0x016a3ea0+0x67]
J 544 C2 java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; (29 bytes) # 0x016d5780 [0x016d5720+0x60]
J 1079 C2 java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; (122 bytes) # 0x01834128 [0x01833800+0x928]
J 1200 C2 java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class; (82 bytes) # 0x0190c148 [0x0190c0a0+0xa8]
v ~StubRoutines::call_stub
j com.hazelcast.instance.OutOfMemoryErrorDispatcher$DefaultOutOfMemoryHandler.onOutOfMemory(Ljava/lang/OutOfMemoryError;[Lcom/hazelcast/core/HazelcastInstance;)V+32
j com.hazelcast.instance.OutOfMemoryErrorDispatcher.onOutOfMemory(Ljava/lang/OutOfMemoryError;)V+46
j com.hazelcast.util.executor.PoolExecutorThreadFactory$ManagedThread.run()V+33
v ~StubRoutines::call_stub
The application can be restarted, but I have to investigate the root cause of this problem.
Thanks.

Categories

Resources