IntelliJ IDEA crash and cause the browser out of memory - intellij-idea
I use IntelliJ IDEA 2020.1 x64 on windows10.
When IDEA was just installed, these two parameters were like this: -Xms128m -Xmx512m. When starting IDEA, it crashed. I checked some methods and adjusted these two parameters.
I modify idea.exe.vmoptions and idea64.exe.vmoptions.
The config in idea.exe.vmoptions likes this:
-server
-Xms500m
-Xmx6000m
-XX:ReservedCodeCacheSize=500m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-XX:CICompilerCount=2
-Dsun.io.useCanonPrefixCache=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Djdk.attach.allowAttachSelf=true
-Dkotlinx.coroutines.debug=off
-Djdk.module.illegalAccess.silent=true
And the config in idea64.exe.vmoptions likes this:
-Xms500m
-Xmx6000m
-XX:ReservedCodeCacheSize=500m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-XX:CICompilerCount=2
-Dsun.io.useCanonPrefixCache=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Djdk.attach.allowAttachSelf=true
-Dkotlinx.coroutines.debug=off
-Djdk.module.illegalAccess.silent=true
The memory of my computer is 16GB.
When I run the spring boot project, my browser often prompts out of memory, sometimes IntelliJ IDEA will crash, I tried to install the new version and the old version IntelliJ IDEA, but the problem still exists, how can I solve this problem?
The log is:
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 32744 bytes for ChunkPool::allocate
# Possible reasons:
# The system is out of physical RAM or swap space
# In 32 bit mode, the process size limit was hit
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Use 64 bit Java on a 64 bit OS
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
# Out of Memory Error (allocation.cpp:273), pid=11172, tid=0x0000000000003610
#
# JRE version: Java(TM) SE Runtime Environment (8.0_191-b12) (build 1.8.0_191-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.191-b12 mixed mode windows-amd64 compressed oops)
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
--------------- T H R E A D ---------------
Current thread (0x000000001d1c0800): VMThread [stack: 0x000000001ee90000,0x000000001ef90000] [id=13840]
Stack: [0x000000001ee90000,0x000000001ef90000]
[error occurred during error reporting (printing stack bounds), id 0xc0000005]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
VM_Operation (0x000000002cb7e800): BulkRevokeBias, mode: safepoint, requested by thread 0x0000000023b4f000
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x0000000025d52000 JavaThread "Keep-Alive-Timer" daemon [_thread_blocked, id=2020, stack(0x00000000312b0000,0x00000000313b0000)]
0x0000000025d52800 JavaThread "RMI TCP Connection(10)-192.168.6.104" daemon [_thread_in_native, id=708, stack(0x00000000315b0000,0x00000000316b0000)]
0x00000000255b9800 JavaThread "MyScheduler_Worker-3" [_thread_blocked, id=9036, stack(0x0000000028cb0000,0x0000000028db0000)]
0x00000000255bc000 JavaThread "MyScheduler_Worker-2" [_thread_blocked, id=12700, stack(0x0000000028bb0000,0x0000000028cb0000)]
0x00000000255bc800 JavaThread "MyScheduler_Worker-1" [_thread_blocked, id=4656, stack(0x0000000028ab0000,0x0000000028bb0000)]
0x00000000255b4800 JavaThread "container-0" [_thread_blocked, id=13452, stack(0x00000000279b0000,0x0000000027ab0000)]
0x00000000255b3800 JavaThread "Catalina-utility-2" [_thread_blocked, id=1992, stack(0x00000000278b0000,0x00000000279b0000)]
0x00000000255b3000 JavaThread "Catalina-utility-1" [_thread_blocked, id=2356, stack(0x00000000277b0000,0x00000000278b0000)]
0x0000000023b4c000 JavaThread "com.alibaba.nacos.naming.push.receiver" daemon [_thread_in_native, id=9632, stack(0x00000000276b0000,0x00000000277b0000)]
0x0000000023b4c800 JavaThread "com.alibaba.nacos.naming.failover" daemon [_thread_blocked, id=13268, stack(0x00000000275b0000,0x00000000276b0000)]
0x0000000023b4a800 JavaThread "com.alibaba.nacos.naming.client.listener" daemon [_thread_blocked, id=2532, stack(0x00000000274b0000,0x00000000275b0000)]
0x0000000023b4b000 JavaThread "logback-1" daemon [_thread_blocked, id=12164, stack(0x00000000273b0000,0x00000000274b0000)]
0x0000000023b50800 JavaThread "SimplePauseDetectorThread_0" daemon [_thread_blocked, id=13036, stack(0x00000000272b0000,0x00000000273b0000)]
0x0000000023b4f800 JavaThread "Thread-50" daemon [_thread_blocked, id=13972, stack(0x00000000271b0000,0x00000000272b0000)]
0x0000000023b51000 JavaThread "Druid-ConnectionPool-Destroy-510868405" daemon [_thread_blocked, id=9068, stack(0x00000000270b0000,0x00000000271b0000)]
0x0000000023b4d800 JavaThread "Druid-ConnectionPool-Create-510868405" daemon [_thread_blocked, id=11316, stack(0x0000000026fb0000,0x00000000270b0000)]
0x0000000023e99000 JavaThread "mysql-cj-abandoned-connection-cleanup" daemon [_thread_blocked, id=14372, stack(0x0000000026ab0000,0x0000000026bb0000)]
0x0000000025260800 JavaThread "CleanCursors-1-thread-1" daemon [_thread_blocked, id=13192, stack(0x00000000264b0000,0x00000000265b0000)]
0x00000000203cb000 JavaThread "cluster-ClusterId{value='5fd964971130802ba4672959', description='null'}-localhost:27017" daemon [_thread_blocked, id=14584, stack(0x00000000263b0000,0x00000000264b0000)]
0x00000000203c4000 JavaThread "spring.cloud.inetutils" daemon [_thread_blocked, id=8896, stack(0x00000000262b0000,0x00000000263b0000)]
0x00000000232b0800 JavaThread "lettuce-eventExecutorLoop-1-1" daemon [_thread_blocked, id=7868, stack(0x0000000022510000,0x0000000022610000)]
0x000000001efdc000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=14732, stack(0x000000001f590000,0x000000001f690000)]
0x000000001d1ce000 JavaThread "Finalizer" daemon [_thread_blocked, id=12328, stack(0x000000001f490000,0x000000001f590000)]
0x000000001efb0800 JavaThread "Reference Handler" daemon [_thread_blocked, id=8496, stack(0x000000001f390000,0x000000001f490000)]
Other Threads:
=>0x000000001d1c0800 VMThread [stack: 0x000000001ee90000,0x000000001ef90000] [id=13840]
0x00000000206eb800 WatcherThread [stack: 0x0000000021860000,0x0000000021960000] [id=12316]
VM state:at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x00000000034692c0] Threads_lock - owner thread: 0x000000001d1c0800
Heap:
PSYoungGen total 467456K, used 85036K [0x000000076b100000, 0x000000078f100000, 0x00000007c0000000)
eden space 449536K, 18% used [0x000000076b100000,0x000000077040b068,0x0000000786800000)
from space 17920K, 0% used [0x000000078bb80000,0x000000078bb80000,0x000000078cd00000)
to space 36864K, 0% used [0x000000078cd00000,0x000000078cd00000,0x000000078f100000)
ParOldGen total 331264K, used 80939K [0x00000006c1200000, 0x00000006d5580000, 0x000000076b100000)
object space 331264K, 24% used [0x00000006c1200000,0x00000006c610ac88,0x00000006d5580000)
Metaspace used 95402K, capacity 100210K, committed 100480K, reserved 1136640K
class space used 11815K, capacity 12621K, committed 12672K, reserved 1048576K
Card table byte_map: [0x0000000012b10000,0x0000000013310000] byte_map_base: 0x000000000f507000
Marking Bits: (ParMarkBitMap*) 0x0000000077893e30
Begin Bits: [0x0000000014060000, 0x0000000018018000)
End Bits: [0x0000000018018000, 0x000000001bfd0000)
Polling page: 0x0000000000df0000
CodeCache: size=245760Kb used=21399Kb max_used=21399Kb free=224360Kb
bounds [0x0000000003750000, 0x0000000004c40000, 0x0000000012750000]
total_blobs=11226 nmethods=10469 adapters=675
compilation: enabled
Compilation events (10 events):
Event: 356.698 Thread 0x0000000020325800 10738 1 org.springframework.web.servlet.mvc.condition.AbstractMediaTypeExpression::isNegated (5 bytes)
Event: 356.698 Thread 0x0000000020325800 nmethod 10738 0x0000000004c36b90 code [0x0000000004c36ce0, 0x0000000004c36df0]
Event: 356.698 Thread 0x0000000020325800 10732 1 io.netty.util.Recycler$WeakOrderQueue$Link::access$1300 (5 bytes)
Event: 356.698 Thread 0x0000000020325800 nmethod 10732 0x0000000004c36e50 code [0x0000000004c36fa0, 0x0000000004c37090]
GC Heap History (10 events):
Event: 36.704 GC heap before
{Heap before GC invocations=21 (full 3):
PSYoungGen total 447488K, used 428192K [0x000000076b100000, 0x000000078c300000, 0x00000007c0000000)
eden space 419328K, 100% used [0x000000076b100000,0x0000000784a80000,0x0000000784a80000)
from space 28160K, 31% used [0x0000000784a80000,0x0000000785328090,0x0000000786600000)
to space 27648K, 0% used [0x000000078a800000,0x000000078a800000,0x000000078c300000)
ParOldGen total 216064K, used 46131K [0x00000006c1200000, 0x00000006ce500000, 0x000000076b100000)
object space 216064K, 21% used [0x00000006c1200000,0x00000006c3f0ccc0,0x00000006ce500000)
Metaspace used 66193K, capacity 68980K, committed 69120K, reserved 1110016K
class space used 8364K, capacity 8886K, committed 8960K, reserved 1048576K
Event: 36.715 GC heap after
Heap after GC invocations=21 (full 3):
PSYoungGen total 510976K, used 20023K [0x000000076b100000, 0x000000078c200000, 0x00000007c0000000)
eden space 484352K, 0% used [0x000000076b100000,0x000000076b100000,0x0000000788a00000)
from space 26624K, 75% used [0x000000078a800000,0x000000078bb8de50,0x000000078c200000)
to space 28672K, 0% used [0x0000000788a00000,0x0000000788a00000,0x000000078a600000)
ParOldGen total 216064K, used 46139K [0x00000006c1200000, 0x00000006ce500000, 0x000000076b100000)
object space 216064K, 21% used [0x00000006c1200000,0x00000006c3f0ecc0,0x00000006ce500000)
Metaspace used 66193K, capacity 68980K, committed 69120K, reserved 1110016K
class space used 8364K, capacity 8886K, committed 8960K, reserved 1048576K
}
Event: 40.327 GC heap before
{Heap before GC invocations=22 (full 3):
PSYoungGen total 510976K, used 504375K [0x000000076b100000, 0x000000078c200000, 0x00000007c0000000)
eden space 484352K, 100% used [0x000000076b100000,0x0000000788a00000,0x0000000788a00000)
from space 26624K, 75% used [0x000000078a800000,0x000000078bb8de50,0x000000078c200000)
to space 28672K, 0% used [0x0000000788a00000,0x0000000788a00000,0x000000078a600000)
ParOldGen total 216064K, used 46139K [0x00000006c1200000, 0x00000006ce500000, 0x000000076b100000)
object space 216064K, 21% used [0x00000006c1200000,0x00000006c3f0ecc0,0x00000006ce500000)
Metaspace used 72217K, capacity 75624K, committed 75776K, reserved 1116160K
class space used 9030K, capacity 9624K, committed 9728K, reserved 1048576K
Event: 40.345 GC heap after
Heap after GC invocations=22 (full 3):
PSYoungGen total 513024K, used 28640K [0x000000076b100000, 0x0000000791280000, 0x00000007c0000000)
eden space 484352K, 0% used [0x000000076b100000,0x000000076b100000,0x0000000788a00000)
from space 28672K, 99% used [0x0000000788a00000,0x000000078a5f8150,0x000000078a600000)
to space 34816K, 0% used [0x000000078f080000,0x000000078f080000,0x0000000791280000)
ParOldGen total 216064K, used 51466K [0x00000006c1200000, 0x00000006ce500000, 0x000000076b100000)
object space 216064K, 23% used [0x00000006c1200000,0x00000006c44429d8,0x00000006ce500000)
Metaspace used 72217K, capacity 75624K, committed 75776K, reserved 1116160K
class space used 9030K, capacity 9624K, committed 9728K, reserved 1048576K
}
Event: 307.904 GC heap before
{Heap before GC invocations=23 (full 3):
PSYoungGen total 513024K, used 512992K [0x000000076b100000, 0x0000000791280000, 0x00000007c0000000)
eden space 484352K, 100% used [0x000000076b100000,0x0000000788a00000,0x0000000788a00000)
from space 28672K, 99% used [0x0000000788a00000,0x000000078a5f8150,0x000000078a600000)
to space 34816K, 0% used [0x000000078f080000,0x000000078f080000,0x0000000791280000)
ParOldGen total 216064K, used 51466K [0x00000006c1200000, 0x00000006ce500000, 0x000000076b100000)
object space 216064K, 23% used [0x00000006c1200000,0x00000006c44429d8,0x00000006ce500000)
Metaspace used 86776K, capacity 90974K, committed 91264K, reserved 1128448K
class space used 10880K, capacity 11585K, committed 11648K, reserved 1048576K
Event: 307.932 GC heap after
Heap after GC invocations=23 (full 3):
PSYoungGen total 501248K, used 34804K [0x000000076b100000, 0x0000000791280000, 0x00000007c0000000)
eden space 466432K, 0% used [0x000000076b100000,0x000000076b100000,0x0000000787880000)
from space 34816K, 99% used [0x000000078f080000,0x000000079127d260,0x0000000791280000)
to space 44544K, 0% used [0x000000078bb80000,0x000000078bb80000,0x000000078e700000)
ParOldGen total 216064K, used 62821K [0x00000006c1200000, 0x00000006ce500000, 0x000000076b100000)
object space 216064K, 29% used [0x00000006c1200000,0x00000006c4f59600,0x00000006ce500000)
Metaspace used 86776K, capacity 90974K, committed 91264K, reserved 1128448K
class space used 10880K, capacity 11585K, committed 11648K, reserved 1048576K
}
Event: 324.558 GC heap before
{Heap before GC invocations=24 (full 3):
PSYoungGen total 501248K, used 164111K [0x000000076b100000, 0x0000000791280000, 0x00000007c0000000)
eden space 466432K, 27% used [0x000000076b100000,0x0000000772f46c98,0x0000000787880000)
from space 34816K, 99% used [0x000000078f080000,0x000000079127d260,0x0000000791280000)
to space 44544K, 0% used [0x000000078bb80000,0x000000078bb80000,0x000000078e700000)
ParOldGen total 216064K, used 62821K [0x00000006c1200000, 0x00000006ce500000, 0x000000076b100000)
object space 216064K, 29% used [0x00000006c1200000,0x00000006c4f59600,0x00000006ce500000)
Metaspace used 93677K, capacity 98290K, committed 98380K, reserved 1134592K
class space used 11664K, capacity 12457K, committed 12544K, reserved 1048576K
Event: 324.583 GC heap after
Heap after GC invocations=24 (full 3):
PSYoungGen total 467456K, used 17577K [0x000000076b100000, 0x000000078f100000, 0x00000007c0000000)
eden space 449536K, 0% used [0x000000076b100000,0x000000076b100000,0x0000000786800000)
from space 17920K, 98% used [0x000000078bb80000,0x000000078ccaa4b0,0x000000078cd00000)
to space 36864K, 0% used [0x000000078cd00000,0x000000078cd00000,0x000000078f100000)
ParOldGen total 216064K, used 82841K [0x00000006c1200000, 0x00000006ce500000, 0x000000076b100000)
object space 216064K, 38% used [0x00000006c1200000,0x00000006c62e67c0,0x00000006ce500000)
Metaspace used 93677K, capacity 98290K, committed 98380K, reserved 1134592K
class space used 11664K, capacity 12457K, committed 12544K, reserved 1048576K
}
Event: 324.583 GC heap before
{Heap before GC invocations=25 (full 4):
PSYoungGen total 467456K, used 17577K [0x000000076b100000, 0x000000078f100000, 0x00000007c0000000)
eden space 449536K, 0% used [0x000000076b100000,0x000000076b100000,0x0000000786800000)
from space 17920K, 98% used [0x000000078bb80000,0x000000078ccaa4b0,0x000000078cd00000)
to space 36864K, 0% used [0x000000078cd00000,0x000000078cd00000,0x000000078f100000)
ParOldGen total 216064K, used 82841K [0x00000006c1200000, 0x00000006ce500000, 0x000000076b100000)
object space 216064K, 38% used [0x00000006c1200000,0x00000006c62e67c0,0x00000006ce500000)
Metaspace used 93677K, capacity 98290K, committed 98380K, reserved 1134592K
class space used 11664K, capacity 12457K, committed 12544K, reserved 1048576K
Event: 324.830 GC heap after
Heap after GC invocations=25 (full 4):
PSYoungGen total 467456K, used 0K [0x000000076b100000, 0x000000078f100000, 0x00000007c0000000)
eden space 449536K, 0% used [0x000000076b100000,0x000000076b100000,0x0000000786800000)
from space 17920K, 0% used [0x000000078bb80000,0x000000078bb80000,0x000000078cd00000)
to space 36864K, 0% used [0x000000078cd00000,0x000000078cd00000,0x000000078f100000)
ParOldGen total 331264K, used 80939K [0x00000006c1200000, 0x00000006d5580000, 0x000000076b100000)
object space 331264K, 24% used [0x00000006c1200000,0x00000006c610ac88,0x00000006d5580000)
Metaspace used 93672K, capacity 98276K, committed 98380K, reserved 1134592K
class space used 11663K, capacity 12454K, committed 12544K, reserved 1048576K
}
Deoptimization events (0 events):
No events
Classes redefined (0 events):
No events
Internal exceptions (10 events):
Event: 356.677 Thread 0x000000002591a800 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x0000000770068910) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605]
Event: 356.677 Thread 0x000000002591e800 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x000000076ddd7678) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605]
Event: 356.677 Thread 0x0000000025919000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x000000076cfc0370) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605]
Event: 356.677 Thread 0x000000002591d800 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x000000076bbecc98) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605]
Event: 356.695 Thread 0x000000002591e800 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x000000076ddebac8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605]
Event: 356.695 Thread 0x0000000025919000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x000000076cfd3988) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605]
Event: 356.695 Thread 0x000000002591a800 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x000000077007cd70) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605]
Event: 356.695 Thread 0x0000000025918800 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x000000076ff1cc80) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605]
Event: 356.695 Thread 0x000000002591a000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x000000076ffce800) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605]
Event: 356.695 Thread 0x000000002591d800 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x000000076bc05988) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605]
Events (10 events):
Event: 356.698 Thread 0x000000002591a800 DEOPT UNPACKING pc=0x0000000003797890 sp=0x000000002bb79ea8 mode 1
Event: 356.698 Thread 0x000000002591a800 DEOPT PACKING pc=0x0000000003e5454c sp=0x000000002bb7a2b0
Event: 356.698 Thread 0x000000002591a800 DEOPT UNPACKING pc=0x0000000003797890 sp=0x000000002bb79fd0 mode 1
Event: 356.700 Thread 0x000000002591a800 DEOPT PACKING pc=0x0000000003d07eb4 sp=0x000000002bb79fb0
Event: 356.700 Thread 0x000000002591a800 DEOPT UNPACKING pc=0x0000000003797890 sp=0x000000002bb79ea8 mode 1
Event: 356.700 Thread 0x000000002591a800 DEOPT PACKING pc=0x0000000003e5454c sp=0x000000002bb7a2b0
Event: 356.700 Thread 0x000000002591a800 DEOPT UNPACKING pc=0x0000000003797890 sp=0x000000002bb79fd0 mode 1
Event: 356.701 Executing VM operation: RevokeBias
Event: 356.702 Executing VM operation: RevokeBias done
Event: 356.702 Executing VM operation: BulkRevokeBias
Dynamic libraries:
0x00007ff6b22c0000 - 0x00007ff6b22f7000 C:\Program Files\Java\jdk1.8.0_191\bin\java.exe
0x00007ff8baca0000 - 0x00007ff8bae90000 C:\Windows\SYSTEM32\ntdll.dll
0x00007ff8b92c0000 - 0x00007ff8b9372000 C:\Windows\System32\KERNEL32.DLL
0x00007ff8a7d70000 - 0x00007ff8a7ff5000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.18362.53_none_a1435cd8519dc9c0\COMCTL32.dll
0x00007ff8ba190000 - 0x00007ff8ba4c6000 C:\Windows\System32\combase.dll
0x00007ff8b8ca0000 - 0x00007ff8b8d21000 C:\Windows\System32\bcryptPrimitives.dll
0x00007ff8b99c0000 - 0x00007ff8b99ee000 C:\Windows\System32\IMM32.DLL
0x0000000077a10000 - 0x0000000077ae2000 C:\Program Files\Java\jdk1.8.0_191\jre\bin\msvcr100.dll
0x0000000077070000 - 0x0000000077914000 C:\Program Files\Java\jdk1.8.0_191\jre\bin\server\jvm.dll
0x00007ff8b9780000 - 0x00007ff8b9788000 C:\Windows\System32\PSAPI.DLL
0x00007ff8a2d50000 - 0x00007ff8a2d59000 C:\Windows\SYSTEM32\WSOCK32.dll
0x00007ff8b17d0000 - 0x00007ff8b17da000 C:\Windows\SYSTEM32\VERSION.dll
0x00007ff8b5880000 - 0x00007ff8b58a4000 C:\Windows\SYSTEM32\WINMM.dll
0x00007ff8b98a0000 - 0x00007ff8b990f000 C:\Windows\System32\WS2_32.dll
0x00007ff8b5840000 - 0x00007ff8b586d000 C:\Windows\SYSTEM32\winmmbase.dll
0x00007ff8b83d0000 - 0x00007ff8b841a000 C:\Windows\System32\cfgmgr32.dll
0x0000000076f80000 - 0x0000000076f8f000 C:\Program Files\Java\jdk1.8.0_191\jre\bin\verify.dll
0x0000000076f50000 - 0x0000000076f79000 C:\Program Files\Java\jdk1.8.0_191\jre\bin\java.dll
0x0000000077ba0000 - 0x0000000077bd5000 C:\Program Files\Java\jdk1.8.0_191\jre\bin\jdwp.dll
0x0000000077b90000 - 0x0000000077b98000 C:\Program Files\Java\jdk1.8.0_191\jre\bin\npt.dll
0x0000000077b60000 - 0x0000000077b83000 C:\Program Files\Java\jdk1.8.0_191\jre\bin\instrument.dll
0x0000000076f30000 - 0x0000000076f46000 C:\Program Files\Java\jdk1.8.0_191\jre\bin\zip.dll
0x00007ff8ba4d0000 - 0x00007ff8babb0000 C:\Windows\System32\SHELL32.dll
0x00007ff8b97f0000 - 0x00007ff8b9899000 C:\Windows\System32\shcore.dll
0x00007ff8b7c50000 - 0x00007ff8b83cb000 C:\Windows\System32\windows.storage.dll
0x00007ff8b7bf0000 - 0x00007ff8b7c0f000 C:\Windows\System32\profapi.dll
0x00007ff8b7b80000 - 0x00007ff8b7bca000 C:\Windows\System32\powrprof.dll
0x00007ff8b7b70000 - 0x00007ff8b7b80000 C:\Windows\System32\UMPDC.dll
0x00007ff8b9380000 - 0x00007ff8b93d2000 C:\Windows\System32\shlwapi.dll
0x00007ff8b7bd0000 - 0x00007ff8b7be1000 C:\Windows\System32\kernel.appcore.dll
0x00007ff8b7c30000 - 0x00007ff8b7c47000 C:\Windows\System32\cryptsp.dll
0x0000000077b50000 - 0x0000000077b59000 C:\Program Files\Java\jdk1.8.0_191\jre\bin\dt_socket.dll
0x00007ff8b73e0000 - 0x00007ff8b7447000 C:\Windows\system32\mswsock.dll
0x0000000076f00000 - 0x0000000076f1a000 C:\Program Files\Java\jdk1.8.0_191\jre\bin\net.dll
0x00007ff8b7180000 - 0x00007ff8b724a000 C:\Windows\SYSTEM32\DNSAPI.dll
0x00007ff8b96f0000 - 0x00007ff8b96f8000 C:\Windows\System32\NSI.dll
0x00007ff8b7140000 - 0x00007ff8b717a000 C:\Windows\SYSTEM32\IPHLPAPI.DLL
0x00007ff8aacb0000 - 0x00007ff8aacba000 C:\Windows\System32\rasadhlp.dll
0x00007ff8ada40000 - 0x00007ff8adab7000 C:\Windows\System32\fwpuclnt.dll
0x00007ff8b8d30000 - 0x00007ff8b8d56000 C:\Windows\System32\bcrypt.dll
0x0000000076f20000 - 0x0000000076f2d000 C:\Program Files\Java\jdk1.8.0_191\jre\bin\management.dll
0x0000000076ee0000 - 0x0000000076ef1000 C:\Program Files\Java\jdk1.8.0_191\jre\bin\nio.dll
0x00007ff8b6fa0000 - 0x00007ff8b6fd3000 C:\Windows\system32\rsaenh.dll
It is not clear from what process do you get the OOM error? From IDEA or other? Where do you see this error? You say you see it after you launch Spring Boot configuration? Then this is not related to IDEA's *.vmoptions and IDE's own process. You need to increase the -Xmx for the process that you launch for your Spring Boot application configuration. You can set the -Xmx in VM options field.
Now I know the reason.
The size of the virtual memory was 0MB before.
I increased the size of the virtual memory on the C disk. I set the virtual memory size to 2GB.
Then I restarted the computer, and when I ran IDEA again, the browser no longer had problems.
Related
Why is the max memory calculated wrong by the jvm using the maxRamPercentage in an openshift environment? [duplicate]
I have a 64-bit hotspot JDK version 1.7.0 installed on a 64-bit RHEL 6 machine. I use the following JVM options for my tomcat application. CATALINA_OPTS="${CATALINA_OPTS} -Dfile.encoding=UTF8 -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Duser.timezone=EST5EDT" # General Heap sizing CATALINA_OPTS="${CATALINA_OPTS} -Xms4096m -Xmx4096m -XX:NewSize=2048m -XX:MaxNewSize=2048m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+UseCompressedOops -XX:+DisableExplicitGC" # Enable the CMS GC policy CATALINA_OPTS="${CATALINA_OPTS} -XX:+UseConcMarkSweepGC -XX:CMSWaitDuration=15000 -XX:+CMSParallelRemarkEnabled -XX:+CMSCompactWhenClearAllSoftRefs -XX:+CMSConcurrentMTEnabled -XX:+CMSScavengeBeforeRemark -XX:+CMSClassUnloadingEnabled" # Verbose Garbage Collection Logging CURRENT_DATE=`date +%Y%m%d%H%M%S` CATALINA_OPTS="${CATALINA_OPTS} -verbose:gc -XX:+PrintGCDetails -Xloggc:${CATALINA_BASE}/logs/gc-${CURRENT_DATE}.log -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution" When I have a Garbage Collection analysis, the GC logs show a maximum available heap of only 3.8GB instead of 4GB allocated to the JVM. Why is that?
New Generation (2048M) consists of 80% Eden (1638.4M) and two Survivor Spaces (10% or 204.8M each): Heap par new generation total 1887488K, used 134226K [0x00000006fae00000, 0x000000077ae00000, 0x000000077ae00000) eden space 1677824K, 8% used [0x00000006fae00000, 0x00000007031148e0, 0x0000000761480000) from space 209664K, 0% used [0x0000000761480000, 0x0000000761480000, 0x000000076e140000) to space 209664K, 0% used [0x000000076e140000, 0x000000076e140000, 0x000000077ae00000) concurrent mark-sweep generation total 2097152K, used 242K [0x000000077ae00000, 0x00000007fae00000, 0x00000007fae00000) At any time one of survivor spaces is empty (see Generations). So, the useful heap size is 1638.4 + 204.8 + 2048 = 3891.2 MB
jcmd difference in heap usage numbers reported in jcmd commands heap_info v/s class_histogram v/s native.memory
can someone explain the difference in heap usage numbers reported by following commands on the same program around the same time? root#8fd0f20ba530:/# sudo -u xxx jcmd 477 GC.heap_info 477: PSYoungGen total 934912K, used 221097K [0x0000000670700000, 0x00000006b2180000, 0x00000007c0000000) eden space 933376K, 23% used [0x0000000670700000,0x000000067dd9dfd8,0x00000006a9680000) from space 1536K, 86% used [0x00000006b2000000,0x00000006b214c538,0x00000006b2180000) to space 32256K, 0% used [0x00000006ae280000,0x00000006ae280000,0x00000006b0200000) ParOldGen total 672256K, used 244738K [0x00000003d1400000, 0x00000003fa480000, 0x0000000670700000) object space 672256K, 36% used [0x00000003d1400000,0x00000003e0300928,0x00000003fa480000) Metaspace used 112665K, capacity 119872K, committed 119936K, reserved 1155072K class space used 13760K, capacity 15212K, committed 15232K, reserved 1048576K root#8fd0f20ba530:/# sudo -u xxxjcmd 477 VM.native_memory 477: Native Memory Tracking: Total: reserved=18811604KB, committed=2677784KB - Java Heap (reserved=16494592KB, committed=1615360KB) (mmap: reserved=16494592KB, committed=1615360KB) - Class (reserved=1167716KB, committed=132580KB) (classes #21174) (malloc=12644KB #49240) (mmap: reserved=1155072KB, committed=119936KB) - Thread (reserved=217029KB, committed=217029KB) (thread #211) (stack: reserved=215880KB, committed=215880KB) (malloc=715KB #1260) (arena=434KB #416) - Code (reserved=266396KB, committed=96164KB) (malloc=16796KB #20839) (mmap: reserved=249600KB, committed=79368KB) - GC (reserved=613051KB, committed=563831KB) (malloc=10419KB #1196) (mmap: reserved=602632KB, committed=553412KB) - Compiler (reserved=721KB, committed=721KB) (malloc=587KB #1723) (arena=135KB #7) - Internal (reserved=19877KB, committed=19877KB) (malloc=19845KB #29606) (mmap: reserved=32KB, committed=32KB) - Symbol (reserved=26534KB, committed=26534KB) (malloc=22914KB #244319) (arena=3620KB #1) - Native Memory Tracking (reserved=5483KB, committed=5483KB) (malloc=29KB #331) (tracking overhead=5454KB) - Arena Chunk (reserved=203KB, committed=203KB) (malloc=203KB) root#8fd0f20ba530:/# sudo -u xxx jcmd 477 GC.class_histogram | more 477: num #instances #bytes class name ---------------------------------------------- 1: 159930 57884816 [C 2: 10625 10583856 [B 3: 14628 5228552 [I 4: 134612 4307584 java.util.concurrent.ConcurrentHashMap$Node . . . 9425: 1 16 sun.util.locale.provider.TimeZoneNameUtility$TimeZoneNameGetter 9426: 1 16 sun.util.resources.LocaleData 9427: 1 16 sun.util.resources.LocaleData$LocaleDataResourceBundleControl Total 1325671 114470096 so now from above jcmd GC.class_histogram is showing heap used = 114M but jcmd GC.heap_info is showing heap used = 221M + 244M = 465M and total = 934M + 672M = 1.6G and jcmd VM.native_memory is showing heap committed = 2.6G using OpenJDK 64-Bit Server VM version 25.292-b10 any pointers to understand which numbers to follow?
Java Heap Dump analysis
Hi Friends, I need some help in understanding which got generated by our application. I facing such scenario for the first time and need your input and suggestion. As we are migrating our 32 bit application to 64 bit we are currently facing the issue where our application in unable to launch. One of our bat file generates the Heap dump in a path like this: run.bat: #echo off REM This script is called to run all products. if not "%MM_USE_CLASSPATH%" == "true" goto noclasspath goto execute :noclasspath set CLASSPATH=%INSTDIR%\classes;%INSTDIR%\jar\*;%INSTDIR%\jar\custom\* :execute REM set java specific arguments set JVM_ARGS=-classpath "%CLASSPATH%" REM If we get out of memory allow a dump file to be created set JVM_ARGS=%JVM_ARGS% -XX:+HeapDumpOnOutOfMemoryError REM use TEMP for heap dumps, users may not have access to the install location set JVM_ARGS=%JVM_ARGS% -XX:HeapDumpPath=%TEMP%/ REM on an out of memory error, kill the client. set JVM_ARGS=%JVM_ARGS% -XX:OnOutOfMemoryError="taskkill /F /PID %%p" REM set error log file location set JVM_ARGS=%JVM_ARGS% -XX:ErrorFile=%TEMP%/mm_hs_err_pid%%p.log REM Install the Manager generic AWT Exception handler set JVM_ARGS=%JVM_ARGS% -Dsun.awt.exception.handler=com.osm.exception.AwtReplacementExceptionHandler REM Define memory limits, initial java heap size and the maximum java heap size set JVM_ARGS=%JVM_ARGS% -Xms50m -Xmx256m REM Enable PTC laf window decoration (or when false use OS decoration) set JVM_ARGS=%JVM_ARGS% -Duse.ptc.window.decoration=true REM uncomment the next line to enable anti aliased fonts REM set JVM_ARGS=%JVM_ARGS% -Dswing.aatext=true REM use manager look and feel REM set JVM_ARGS=%JVM_ARGS% -Dswing.defaultlaf=com.osm.ui.laf.xplookandfeel.XPLookAndFeel set JVM_ARGS=%JVM_ARGS% -Dswing.defaultlaf=com.osm.ui.laf.ptc.PtcLaf if not "%DEBUG_MM%" == "true" goto default echo Running %PRODUCT_NAME% with Debug Support REM if JDKDIR is set, we run with a debuggable Java runtime if "%JDKDIR%" == "" goto rundebugclient set JAVA_EXE=%JDKDIR%\jre\bin\java.exe echo Using JDK executable %JAVA_EXE% :rundebugclient cmd.exe /C start "Running %PRODUCT_NAME% with Debug Support" /WAIT "%JAVA_EXE%" -Xnoagent -Xdebug -Xrunjdwp:transport=dt_shmem,address=mm,server=y,suspend=n %JVM_ARGS% %DEBUG_JVM_ARGS% com.osm.datamgmt.DataManager %PRODUCT_CODE% "%CONFIGDIR%" "%INSTDIR%\" goto ending :default echo Running %PRODUCT_NAME% REM Redirect output to nul as we may log things to the console logger which has nowhere to go "%JAVA_EXE%" %JVM_ARGS% com.osm.datamgmt.DataManager %PRODUCT_CODE% "%CONFIGDIR%" "%INSTDIR%\" > NUL 2>&1 :ending Now the result in the heap dump is which I am unable to understand: # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007fff4bd938d0, pid=6920, tid=0x0000000000002754 # # JRE version: Java(TM) SE Runtime Environment (8.0_152-b16) (build 1.8.0_152-b16) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.152-b16 mixed mode windows-amd64 compressed oops) # Problematic frame: # C [libpdm.dll+0x838d0] pdm_gv_type+0x0 # # 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 (0x000000001a5fa000): JavaThread "AWT-EventQueue-0" [_thread_in_native, id=10068, stack(0x000000001c350000,0x000000001c450000)] siginfo: ExceptionCode=0xc0000005, reading address 0x000000004c0c78e0 Registers: RAX=0x000000004c0c78d8, RBX=0x0000000025320ee0, RCX=0x000000004c0c78d8, RDX=0x000000001c44de70 RSP=0x000000001c44de08, RBP=0x000000001c44deb0, RSI=0x0000000025320ee0, RDI=0x000000001c44de40 R8 =0x0000000000000032, R9 =0x00000000fbda24f8, R10=0x0000000000000068, R11=0x0000000070d624d8 R12=0x0000000000000000, R13=0x000000001c44e0a8, R14=0x000000001c44dea0, R15=0x000000001a5fa000 RIP=0x00007fff4bd938d0, EFLAGS=0x0000000000010206 Top of Stack: (sp=0x000000001c44de08) 0x000000001c44de08: 00007fff7a7d3fc9 000000001a5fa1f8 0x000000001c44de18: 000000001c44de70 cccccccccccccccc 0x000000001c44de28: cccccccccccccccc cccccccccccccccc 0x000000001c44de38: cccccccccccccccc 0000000000000fd3 0x000000001c44de48: 000000000553cad4 000000001a5fa1f8 0x000000001c44de58: 000000001c44dea0 000000001c44de70 0x000000001c44de68: 0000000000000000 00000000fbda24f8 0x000000001c44de78: 0000000000000000 0000000000000000 0x000000001c44de88: 0000000000000000 0000000000000000 0x000000001c44de98: 0000000000000000 00000000f0c044d8 0x000000001c44dea8: 0000000000000000 000000001c44e108 0x000000001c44deb8: 000000000554ba74 0000000000000000 0x000000001c44dec8: 0000000000000000 0000000000000000 0x000000001c44ded8: 0000000000000000 0000000000000000 0x000000001c44dee8: 0000000000000000 0000000000000000 0x000000001c44def8: 0000000000000000 0000000000000000 Instructions: (pc=0x00007fff4bd938d0) 0x00007fff4bd938b0: ff ff 48 89 0d 5f 44 35 00 49 8b d1 e9 8f fe ff 0x00007fff4bd938c0: ff cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 0x00007fff4bd938d0: 0f b6 41 08 c3 cc cc cc cc cc cc cc cc cc cc cc 0x00007fff4bd938e0: 48 89 5c 24 08 57 48 83 ec 20 48 8b da e8 1e 78 Register to memory mapping: RAX=0x000000004c0c78d8 is an unknown value RBX=0x0000000025320ee0 is pointing into metadata RCX=0x000000004c0c78d8 is an unknown value RDX=0x000000001c44de70 is pointing into the stack for thread: 0x000000001a5fa000 RSP=0x000000001c44de08 is pointing into the stack for thread: 0x000000001a5fa000 RBP=0x000000001c44deb0 is pointing into the stack for thread: 0x000000001a5fa000 RSI=0x0000000025320ee0 is pointing into metadata RDI=0x000000001c44de40 is pointing into the stack for thread: 0x000000001a5fa000 R8 =0x0000000000000032 is an unknown value R9 =0x00000000fbda24f8 is an oop com.osm.biz.pdm$ptr32 - klass: 'com/osm/biz/pdm$ptr32' R10=0x0000000000000068 is an unknown value R11=0x0000000070d624d8 is an unknown value R12=0x0000000000000000 is an unknown value R13=0x000000001c44e0a8 is pointing into the stack for thread: 0x000000001a5fa000 R14=0x000000001c44dea0 is pointing into the stack for thread: 0x000000001a5fa000 R15=0x000000001a5fa000 is a thread Stack: [0x000000001c350000,0x000000001c450000], sp=0x000000001c44de08, free space=1015k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libpdm.dll+0x838d0] pdm_gv_type+0x0 Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) J 2323 com.osm.biz.pdm._gv_type(Lcom/osm/biz/pdm$ptr;)I (0 bytes) # 0x000000000553ca52 [0x000000000553ca00+0x52] J 2322 C1 com.osm.biz.pdm.gv_type(Lcom/osm/biz/pdm$ptr;)I (54 bytes) # 0x000000000554ba74 [0x000000000554b720+0x354] J 2321 C1 com.osm.biz.GenVal.toJava(Lcom/osm/biz/pdm$ptr;)Ljava/lang/Object; (141 bytes) # 0x0000000005547b4c [0x0000000005547ae0+0x6c] j com.osm.biz.WMDBObject.isValueDifferent(Ljava/lang/String;Ljava/lang/Object;)Z+22 j com.osm.biz.WMDBObject.setCacheValue(Ljava/lang/String;Ljava/lang/Object;)V+44 j com.osm.datamgmt.biz.RecentlyLoadedList.updateValue(Ljava/lang/String;Ljava/lang/Object;)V+27 j com.osm.datamgmt.biz.RecentlyLoadedList.setMaxNumber(I)V+23 j com.osm.datamgmt.biz.RecentlyLoadedList.createNewRecentlyUsedListForUser()Lcom/osm/datamgmt/biz/RecentlyLoadedList;+26 j com.osm.datamgmt.biz.RecentlyLoadedList.getInstance()Lcom/osm/datamgmt/biz/RecentlyLoadedList;+35 j com.osm.datamgmt.ui.ManagerPanel.init(Lcom/osm/ui/UIConfig;)V+0 j com.osm.datamgmt.ui.ManagerPanel.<init>()V+39 j com.osm.datamgmt.ui.ManagerPanel.constructNewManagerPanel()Lcom/osm/datamgmt/ui/ManagerPanel;+4 j com.osm.datamgmt.DataManager$2.run()V+0 J 1909 C1 java.awt.event.InvocationEvent.dispatch()V (69 bytes) # 0x000000000542e64c [0x000000000542e500+0x14c] J 1987 C1 java.awt.EventQueue.dispatchEventImpl(Ljava/awt/AWTEvent;Ljava/lang/Object;)V (149 bytes) # 0x0000000005466684 [0x0000000005464bc0+0x1ac4] J 1985 C1 java.awt.EventQueue$3.run()Ljava/lang/Void; (60 bytes) # 0x0000000005461acc [0x00000000054618c0+0x20c] J 1984 C1 java.awt.EventQueue$3.run()Ljava/lang/Object; (5 bytes) # 0x000000000545e9cc [0x000000000545e940+0x8c] v ~StubRoutines::call_stub J 685 java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; (0 bytes) # 0x00000000050b08e6 [0x00000000050b0880+0x66] J 1662 C1 java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V (80 bytes) # 0x0000000005396f04 [0x0000000005396580+0x984] J 1988 C1 java.awt.EventDispatchThread.pumpOneEventForFilters(I)V (295 bytes) # 0x000000000546c134 [0x000000000546a480+0x1cb4] j java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V+35 j java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11 j java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4 j java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3 j java.awt.EventDispatchThread.run()V+9 v ~StubRoutines::call_stub --------------- P R O C E S S --------------- Java Threads: ( => current thread ) 0x0000000019e5d800 JavaThread "MesgBdcstCheckerThread" daemon [_thread_blocked, id=14676, stack(0x0000000027740000,0x0000000027840000)] 0x0000000019e5e000 JavaThread "CheckForUpdates" daemon [_thread_blocked, id=1080, stack(0x0000000027640000,0x0000000027740000)] 0x0000000019e5c000 JavaThread "Keep-Alive-Timer" daemon [_thread_blocked, id=17532, stack(0x0000000027540000,0x0000000027640000)] 0x0000000019e5a800 JavaThread "DisconnectOnIdleThread" daemon [_thread_blocked, id=3320, stack(0x0000000025a70000,0x0000000025b70000)] 0x000000001a5e9800 JavaThread "D3D Screen Updater" daemon [_thread_blocked, id=13368, stack(0x0000000024320000,0x0000000024420000)] 0x000000001a04c000 JavaThread "TimerQueue" daemon [_thread_blocked, id=18400, stack(0x00000000225a0000,0x00000000226a0000)] =>0x000000001a5fa000 JavaThread "AWT-EventQueue-0" [_thread_in_native, id=10068, stack(0x000000001c350000,0x000000001c450000)] 0x0000000018c31000 JavaThread "AWT-Windows" daemon [_thread_in_native, id=9972, stack(0x0000000019be0000,0x0000000019ce0000)] 0x0000000018c2f000 JavaThread "AWT-Shutdown" [_thread_blocked, id=19308, stack(0x0000000019ae0000,0x0000000019be0000)] 0x0000000018c2e000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=1076, stack(0x00000000199e0000,0x0000000019ae0000)] 0x00000000189b9800 JavaThread "Keep Alive" [_thread_blocked, id=8220, stack(0x00000000195a0000,0x00000000196a0000)] 0x00000000189b8800 JavaThread "Deadlock Detector Thread ->C:\Users\vkarn\AppData\Local\Temp\mm_deadlock_8279648827737022103.log" daemon [_thread_blocked, id=10568, stack(0x00000000194a0000,0x00000000195a0000)] 0x0000000017c42800 JavaThread "Service Thread" daemon [_thread_blocked, id=3252, stack(0x0000000018760000,0x0000000018860000)] 0x0000000017bab000 JavaThread "C1 CompilerThread3" daemon [_thread_blocked, id=13548, stack(0x0000000018660000,0x0000000018760000)] 0x0000000017ba6000 JavaThread "C2 CompilerThread2" daemon [_thread_blocked, id=9352, stack(0x0000000018560000,0x0000000018660000)] 0x0000000017ba3000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=6828, stack(0x0000000018460000,0x0000000018560000)] 0x0000000017ba1000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=18104, stack(0x0000000018360000,0x0000000018460000)] 0x0000000017b9f000 JavaThread "Attach Listener" daemon [_thread_blocked, id=9208, stack(0x0000000018260000,0x0000000018360000)] 0x0000000017b9e000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=13948, stack(0x0000000018160000,0x0000000018260000)] 0x0000000017b90800 JavaThread "Finalizer" daemon [_thread_blocked, id=12632, stack(0x0000000017f70000,0x0000000018070000)] 0x0000000015cac800 JavaThread "Reference Handler" daemon [_thread_blocked, id=10236, stack(0x0000000017a70000,0x0000000017b70000)] 0x0000000004c33800 JavaThread "main" [_thread_blocked, id=6840, stack(0x0000000003320000,0x0000000003420000)] Other Threads: 0x0000000015ca9800 VMThread [stack: 0x0000000017970000,0x0000000017a70000] [id=17756] 0x0000000017c5d800 WatcherThread [stack: 0x0000000018860000,0x0000000018960000] [id=17884] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap: PSYoungGen total 62464K, used 19199K [0x00000000fab00000, 0x00000000fff00000, 0x0000000100000000) eden space 51200K, 37% used [0x00000000fab00000,0x00000000fbdbff78,0x00000000fdd00000) from space 11264K, 0% used [0x00000000fdd00000,0x00000000fdd00000,0x00000000fe800000) to space 10752K, 0% used [0x00000000ff480000,0x00000000ff480000,0x00000000fff00000) ParOldGen total 39424K, used 15676K [0x00000000f0000000, 0x00000000f2680000, 0x00000000fab00000) object space 39424K, 39% used [0x00000000f0000000,0x00000000f0f4f360,0x00000000f2680000) Metaspace used 22124K, capacity 22320K, committed 22576K, reserved 1069056K class space used 2925K, capacity 2991K, committed 3072K, reserved 1048576K Card table byte_map: [0x00000000141b0000,0x0000000014240000] byte_map_base: 0x0000000013a30000 Marking Bits: (ParMarkBitMap*) 0x0000000070d70860 Begin Bits: [0x0000000014a40000, 0x0000000014e40000) End Bits: [0x0000000014e40000, 0x0000000015240000) Polling page: 0x0000000000be0000 CodeCache: size=245760Kb used=8225Kb max_used=8266Kb free=237534Kb bounds [0x0000000004df0000, 0x0000000005620000, 0x0000000013df0000] total_blobs=3027 nmethods=2458 adapters=481 compilation: enabled Compilation events (10 events): Event: 15.716 Thread 0x0000000017ba6000 2448 ! 4 com.osm.biz.WMLtab::getColumnIndex (110 bytes) Event: 15.726 Thread 0x0000000017ba6000 nmethod 2448 0x00000000055cd2d0 code [0x00000000055cd4a0, 0x00000000055cdfd8] Event: 15.726 Thread 0x0000000017ba6000 2446 4 java.lang.ref.Finalizer::register (10 bytes) Event: 15.728 Thread 0x0000000017ba6000 nmethod 2446 0x0000000004eefd90 code [0x0000000004eeff00, 0x0000000004ef0278] Event: 15.728 Thread 0x0000000017ba6000 2477 4 java.util.ArrayList::<init> (12 bytes) Event: 15.728 Thread 0x0000000017ba6000 nmethod 2477 0x000000000554c4d0 code [0x000000000554c600, 0x000000000554c678] Event: 15.728 Thread 0x0000000017ba6000 2454 4 java.util.concurrent.ConcurrentHashMap::casTabAt (20 bytes) Event: 15.729 Thread 0x0000000017ba6000 nmethod 2454 0x0000000005532850 code [0x0000000005532980, 0x00000000055329f8] Event: 15.752 Thread 0x0000000017ba3000 nmethod 2428 0x00000000055e9310 code [0x00000000055e9aa0, 0x00000000055f2268] Event: 15.771 Thread 0x0000000017ba1000 nmethod 2401 0x00000000055fed90 code [0x00000000055ff440, 0x0000000005606ae0] GC Heap History (10 events): Event: 4.960 GC heap before {Heap before GC invocations=4 (full 0): PSYoungGen total 14848K, used 14832K [0x00000000fab00000, 0x00000000fc800000, 0x0000000100000000) eden space 12800K, 100% used [0x00000000fab00000,0x00000000fb780000,0x00000000fb780000) from space 2048K, 99% used [0x00000000fb780000,0x00000000fb97c040,0x00000000fb980000) to space 2048K, 0% used [0x00000000fc600000,0x00000000fc600000,0x00000000fc800000) ParOldGen total 34304K, used 7767K [0x00000000f0000000, 0x00000000f2180000, 0x00000000fab00000) object space 34304K, 22% used [0x00000000f0000000,0x00000000f0795e68,0x00000000f2180000) Metaspace used 18503K, capacity 18706K, committed 18944K, reserved 1064960K class space used 2409K, capacity 2476K, committed 2560K, reserved 1048576K Event: 4.965 GC heap after Heap after GC invocations=4 (full 0): PSYoungGen total 27648K, used 2016K [0x00000000fab00000, 0x00000000fc800000, 0x0000000100000000) eden space 25600K, 0% used [0x00000000fab00000,0x00000000fab00000,0x00000000fc400000) from space 2048K, 98% used [0x00000000fc600000,0x00000000fc7f8020,0x00000000fc800000) to space 2048K, 0% used [0x00000000fc400000,0x00000000fc400000,0x00000000fc600000) ParOldGen total 34304K, used 12218K [0x00000000f0000000, 0x00000000f2180000, 0x00000000fab00000) object space 34304K, 35% used [0x00000000f0000000,0x00000000f0bee810,0x00000000f2180000) Metaspace used 18503K, capacity 18706K, committed 18944K, reserved 1064960K class space used 2409K, capacity 2476K, committed 2560K, reserved 1048576K } Event: 15.272 GC heap before {Heap before GC invocations=5 (full 0): PSYoungGen total 27648K, used 27616K [0x00000000fab00000, 0x00000000fc800000, 0x0000000100000000) eden space 25600K, 100% used [0x00000000fab00000,0x00000000fc400000,0x00000000fc400000) from space 2048K, 98% used [0x00000000fc600000,0x00000000fc7f8020,0x00000000fc800000) to space 2048K, 0% used [0x00000000fc400000,0x00000000fc400000,0x00000000fc600000) ParOldGen total 34304K, used 12218K [0x00000000f0000000, 0x00000000f2180000, 0x00000000fab00000) object space 34304K, 35% used [0x00000000f0000000,0x00000000f0bee810,0x00000000f2180000) Metaspace used 20817K, capacity 21066K, committed 21248K, reserved 1067008K class space used 2671K, capacity 2766K, committed 2816K, reserved 1048576K Event: 15.278 GC heap after Heap after GC invocations=5 (full 0): PSYoungGen total 27648K, used 2048K [0x00000000fab00000, 0x00000000ff300000, 0x0000000100000000) eden space 25600K, 0% used [0x00000000fab00000,0x00000000fab00000,0x00000000fc400000) from space 2048K, 100% used [0x00000000fc400000,0x00000000fc600000,0x00000000fc600000) to space 11264K, 0% used [0x00000000fe800000,0x00000000fe800000,0x00000000ff300000) ParOldGen total 34304K, used 18848K [0x00000000f0000000, 0x00000000f2180000, 0x00000000fab00000) object space 34304K, 54% used [0x00000000f0000000,0x00000000f12681e0,0x00000000f2180000) Metaspace used 20817K, capacity 21066K, committed 21248K, reserved 1067008K class space used 2671K, capacity 2766K, committed 2816K, reserved 1048576K } Event: 15.307 GC heap before {Heap before GC invocations=6 (full 0): PSYoungGen total 27648K, used 27648K [0x00000000fab00000, 0x00000000ff300000, 0x0000000100000000) eden space 25600K, 100% used [0x00000000fab00000,0x00000000fc400000,0x00000000fc400000) from space 2048K, 100% used [0x00000000fc400000,0x00000000fc600000,0x00000000fc600000) to space 11264K, 0% used [0x00000000fe800000,0x00000000fe800000,0x00000000ff300000) ParOldGen total 34304K, used 18848K [0x00000000f0000000, 0x00000000f2180000, 0x00000000fab00000) object space 34304K, 54% used [0x00000000f0000000,0x00000000f12681e0,0x00000000f2180000) Metaspace used 20820K, capacity 21066K, committed 21248K, reserved 1067008K class space used 2671K, capacity 2766K, committed 2816K, reserved 1048576K Event: 15.312 GC heap after Heap after GC invocations=6 (full 0): PSYoungGen total 62464K, used 3344K [0x00000000fab00000, 0x00000000ff300000, 0x0000000100000000) eden space 51200K, 0% used [0x00000000fab00000,0x00000000fab00000,0x00000000fdd00000) from space 11264K, 29% used [0x00000000fe800000,0x00000000feb44010,0x00000000ff300000) to space 11264K, 0% used [0x00000000fdd00000,0x00000000fdd00000,0x00000000fe800000) ParOldGen total 34304K, used 18856K [0x00000000f0000000, 0x00000000f2180000, 0x00000000fab00000) object space 34304K, 54% used [0x00000000f0000000,0x00000000f126a1e0,0x00000000f2180000) Metaspace used 20820K, capacity 21066K, committed 21248K, reserved 1067008K class space used 2671K, capacity 2766K, committed 2816K, reserved 1048576K } Event: 15.390 GC heap before {Heap before GC invocations=7 (full 0): PSYoungGen total 62464K, used 30103K [0x00000000fab00000, 0x00000000ff300000, 0x0000000100000000) eden space 51200K, 52% used [0x00000000fab00000,0x00000000fc521c90,0x00000000fdd00000) from space 11264K, 29% used [0x00000000fe800000,0x00000000feb44010,0x00000000ff300000) to space 11264K, 0% used [0x00000000fdd00000,0x00000000fdd00000,0x00000000fe800000) ParOldGen total 34304K, used 18856K [0x00000000f0000000, 0x00000000f2180000, 0x00000000fab00000) object space 34304K, 54% used [0x00000000f0000000,0x00000000f126a1e0,0x00000000f2180000) Metaspace used 20971K, capacity 21168K, committed 21296K, reserved 1069056K class space used 2723K, capacity 2799K, committed 2816K, reserved 1048576K Event: 15.394 GC heap after Heap after GC invocations=7 (full 0): PSYoungGen total 62464K, used 3360K [0x00000000fab00000, 0x00000000fff00000, 0x0000000100000000) eden space 51200K, 0% used [0x00000000fab00000,0x00000000fab00000,0x00000000fdd00000) from space 11264K, 29% used [0x00000000fdd00000,0x00000000fe0480c0,0x00000000fe800000) to space 10752K, 0% used [0x00000000ff480000,0x00000000ff480000,0x00000000fff00000) ParOldGen total 34304K, used 19604K [0x00000000f0000000, 0x00000000f2180000, 0x00000000fab00000) object space 34304K, 57% used [0x00000000f0000000,0x00000000f1325220,0x00000000f2180000) Metaspace used 20971K, capacity 21168K, committed 21296K, reserved 1069056K class space used 2723K, capacity 2799K, committed 2816K, reserved 1048576K } Event: 15.394 GC heap before {Heap before GC invocations=8 (full 1): PSYoungGen total 62464K, used 3360K [0x00000000fab00000, 0x00000000fff00000, 0x0000000100000000) eden space 51200K, 0% used [0x00000000fab00000,0x00000000fab00000,0x00000000fdd00000) from space 11264K, 29% used [0x00000000fdd00000,0x00000000fe0480c0,0x00000000fe800000) to space 10752K, 0% used [0x00000000ff480000,0x00000000ff480000,0x00000000fff00000) ParOldGen total 34304K, used 19604K [0x00000000f0000000, 0x00000000f2180000, 0x00000000fab00000) object space 34304K, 57% used [0x00000000f0000000,0x00000000f1325220,0x00000000f2180000) Metaspace used 20971K, capacity 21168K, committed 21296K, reserved 1069056K class space used 2723K, capacity 2799K, committed 2816K, reserved 1048576K Event: 15.451 GC heap after Heap after GC invocations=8 (full 1): PSYoungGen total 62464K, used 0K [0x00000000fab00000, 0x00000000fff00000, 0x0000000100000000) eden space 51200K, 0% used [0x00000000fab00000,0x00000000fab00000,0x00000000fdd00000) from space 11264K, 0% used [0x00000000fdd00000,0x00000000fdd00000,0x00000000fe800000) to space 10752K, 0% used [0x00000000ff480000,0x00000000ff480000,0x00000000fff00000) ParOldGen total 39424K, used 15676K [0x00000000f0000000, 0x00000000f2680000, 0x00000000fab00000) object space 39424K, 39% used [0x00000000f0000000,0x00000000f0f4f360,0x00000000f2680000) Metaspace used 20971K, capacity 21168K, committed 21296K, reserved 1069056K class space used 2723K, capacity 2799K, committed 2816K, reserved 1048576K } Deoptimization events (10 events): Event: 4.876 Thread 0x0000000019e60800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00000000052412f4 method=org.jdom2.ContentList$FilterList.resync(I)I # 161 Event: 10.597 Thread 0x0000000019e60800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000000054516ec method=java.util.concurrent.locks.AbstractQueuedSynchronizer.release(I)Z # 2 Event: 10.602 Thread 0x0000000019e60800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00000000052a3c60 method=java.lang.Integer.valueOf(I)Ljava/lang/Integer; # 3 Event: 10.604 Thread 0x0000000019e60800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000000054516ec method=java.util.concurrent.locks.AbstractQueuedSynchronizer.release(I)Z # 2 Event: 10.605 Thread 0x0000000019e60800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000000054516ec method=java.util.concurrent.locks.AbstractQueuedSynchronizer.release(I)Z # 2 Event: 10.606 Thread 0x0000000019e60800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000000054516ec method=java.util.concurrent.locks.AbstractQueuedSynchronizer.release(I)Z # 2 Event: 10.611 Thread 0x0000000019e60800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x000000000513fa70 method=java.util.LinkedHashMap.afterNodeInsertion(Z)V # 1 Event: 10.616 Thread 0x0000000019e60800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x000000000503eb18 method=java.util.HashMap.putVal(ILjava/lang/Object;Ljava/lang/Object;ZZ)Ljava/lang/Object; # 203 Event: 10.616 Thread 0x0000000019e60800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x0000000005041040 method=java.util.HashMap.putVal(ILjava/lang/Object;Ljava/lang/Object;ZZ)Ljava/lang/Object; # 203 Event: 15.234 Thread 0x0000000019e60800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000005200db4 method=java.util.concurrent.ConcurrentHashMap.get(Ljava/lang/Object;)Ljava/lang/Object; # 138 Classes redefined (0 events): No events Internal exceptions (10 events): Event: 10.618 Thread 0x0000000019e60800 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x00000000fb07c6b0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u152\9742\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605] Event: 10.619 Thread 0x0000000019e60800 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x00000000fb07d938) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u152\9742\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605] Event: 10.619 Thread 0x0000000019e60800 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x00000000fb07f2b0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u152\9742\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605] Event: 10.623 Thread 0x0000000019e60800 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x00000000fb0a48f0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u152\9742\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605] Event: 10.625 Thread 0x0000000019e60800 Exception <a 'java/lang/ArrayIndexOutOfBoundsException'> (0x00000000fb0b29d0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u152\9742\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605] Event: 15.147 Thread 0x0000000019e60800 Exception <a 'java/lang/NullPointerException'> (0x00000000fb127f28) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u152\9742\hotspot\src\share\vm\interpreter\linkResolver.cpp, line 1185] Event: 15.148 Thread 0x0000000019e60800 Exception <a 'java/lang/NullPointerException'> (0x00000000fb1288c8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u152\9742\hotspot\src\share\vm\interpreter\linkResolver.cpp, line 1185] Event: 15.166 Thread 0x0000000019e60800 Exception <a 'com/osm/exception/WMKernelException'> (0x00000000fb2ec740) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u152\9742\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 15.510 Thread 0x0000000019e5d800 Exception <a 'com/osm/exception/WMKernelException'> (0x00000000fb4864a0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u152\9742\hotspot\src\share\vm\prims\jni.cpp, line 709] Event: 15.513 Thread 0x0000000004c33800 Exception <a 'java/lang/ClassCastException'> (0x00000000fb404ee0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u152\9742\hotspot\src\share\vm\runtime\sharedRuntime.cpp, line 605] Events (10 events): Event: 15.799 Executing VM operation: RevokeBias Event: 15.799 Executing VM operation: RevokeBias done Event: 15.800 Executing VM operation: RevokeBias Event: 15.800 Executing VM operation: RevokeBias done Event: 15.816 loading class com/osm/biz/EventHandler Event: 15.816 loading class com/osm/biz/EventHandler done Event: 15.818 loading class com/osm/event/WMNewWMObjectEvent Event: 15.818 loading class com/osm/event/WMNewWMObjectEvent done Event: 15.819 loading class com/osm/biz/AttributePropertyCache Event: 15.819 loading class com/osm/biz/AttributePropertyCache done
This is not a heap dump. It is a JVM crash dump which got written when your running JVM crashed. It is not just heap information, it shows much more information about what was happening at the time when the crash happened, e.g. various threads that existed, stack frames in the current running thread etc. It also has information at the contents of the heap around the time of the crash. See these links for interpreting the information available in the crash dump file: https://docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/geninfo/diagnos/dumpfile.html http://jagadesh4java.blogspot.in/2014/09/analyzing-jvm-crash.html
JVM crashing EXCEPTION_ACCESS_VIOLATION (0xc0000005) :problematic frame in jvmti agent
I wrote a JVMTI agent and upon running an application with the particular jvmti agent, the jvm crashes and exits with EXCEPTION_ACCESS_VIOLATION (0xc0000005). Problematic frame lies in the jvmti agent that I wrote. The stacktrace showed some jni calls to getstaticbyte and getstaticint functions . When i run it under debugger the crash/exception_access_violation is not reproduced. And the run is perfectly normal. What could be the cause of the crash when running outside of debugger? hs_err_pid_*** obtained from the crash is below: # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000064abfb3c, pid=5968, tid=0x0000000000001a30 # # JRE version: Java(TM) SE Runtime Environment (8.0_121-b13) (build 1.8.0_121-b13) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.121-b13 mixed mode windows-amd64 compressed oops) # Problematic frame: # C [libCppDynamicLibrary_1.dll+0x3fb3c] # # 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 (0x000000000215e800): JavaThread "main" [_thread_in_native, id=6704, stack(0x0000000002370000,0x0000000002470000)] siginfo: ExceptionCode=0xc0000005, reading address 0x0000000000000010 Registers: RAX=0x0000000000000010, RBX=0x0000000000000042, RCX=0x0000000000000000, RDX=0x0000000000000000 RSP=0x000000000246e190, RBP=0x000000000246e1b0, RSI=0x0000000000000001, RDI=0x0000000000000001 R8 =0x0000000054feabe8, R9 =0x0000000054feabe8, R10=0x000000000215f368, R11=0x0000000055115390 R12=0x0000000000000000, R13=0x0000000000000000, R14=0x0000000000000000, R15=0x0000000000000000 RIP=0x0000000064abfb3c, EFLAGS=0x0000000000010202 Top of Stack: (sp=0x000000000246e190) 0x000000000246e190: 0000000000000000 0000000054feabe8 0x000000000246e1a0: 0000000064acc2b0 000000000246e230 0x000000000246e1b0: 000000000246e210 0000000064ac0b5f 0x000000000246e1c0: 000000000246e1e0 0000000000000000 0x000000000246e1d0: 0000000054feabe8 000000005fecba3e 0x000000000246e1e0: 0000000053a53560 000000000215cf50 0x000000000246e1f0: 0000000053a53560 000000006fce2e7a 0x000000000246e200: 000000000246e210 0000000000000000 0x000000000246e210: 0000000000000042 0000000000000001 0x000000000246e220: 000000000246e250 0000000064ab69e0 0x000000000246e230: 0000000000000000 0000000054fead20 0x000000000246e240: 0000000054feabe8 000000006fce4c59 0x000000000246e250: 000000000246e280 0000000064aa92c2 0x000000000246e260: 0000000000000000 0000000054fead20 0x000000000246e270: 0000000000000000 0000000000000000 0x000000000246e280: 000000000246e310 0000000064a8306a Instructions: (pc=0x0000000064abfb3c) 0x0000000064abfb1c: 90 90 90 90 55 48 89 e5 48 83 ec 20 48 89 4d 10 0x0000000064abfb2c: 48 89 55 18 48 8b 45 18 48 89 c1 e8 64 0d 00 00 0x0000000064abfb3c: 48 8b 10 48 8b 45 10 48 89 10 48 8b 45 18 48 89 0x0000000064abfb4c: c1 e8 fe f5 ff ff 48 8b 10 48 8b 45 10 48 89 50 Register to memory mapping: RAX=0x0000000000000010 is an unknown value RBX=0x0000000000000042 is an unknown value RCX=0x0000000000000000 is an unknown value RDX=0x0000000000000000 is an unknown value RSP=0x000000000246e190 is pointing into the stack for thread: 0x000000000215e800 RBP=0x000000000246e1b0 is pointing into the stack for thread: 0x000000000215e800 RSI=0x0000000000000001 is an unknown value RDI=0x0000000000000001 is an unknown value R8 =0x0000000054feabe8 is an unknown value R9 =0x0000000054feabe8 is an unknown value R10=0x000000000215f368 is an unknown value R11=0x0000000055115390 is an unknown value R12=0x0000000000000000 is an unknown value R13=0x0000000000000000 is an unknown value R14=0x0000000000000000 is an unknown value R15=0x0000000000000000 is an unknown value Stack: [0x0000000002370000,0x0000000002470000], sp=0x000000000246e190, free space=1016k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libCppDynamicLibrary_1.dll+0x3fb3c] C [libCppDynamicLibrary_1.dll+0x40b5f] C [libCppDynamicLibrary_1.dll+0x369e0] C [libCppDynamicLibrary_1.dll+0x292c2] C [libCppDynamicLibrary_1.dll+0x306a] C [libCppDynamicLibrary_1.dll+0x3b31] C [libCppDynamicLibrary_1.dll+0x27cfc] C [libCppDynamicLibrary_1.dll+0x1b2c] C [libCppDynamicLibrary_1.dll+0x20c7] V [jvm.dll+0x1b7fa6] V [jvm.dll+0xb89ea] C 0x0000000002769a38 Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j javaapplication1.JavaApplication1.main([Ljava/lang/String;)V+77 v ~StubRoutines::call_stub --------------- P R O C E S S --------------- Java Threads: ( => current thread ) 0x0000000053b12800 JavaThread "Service Thread" daemon [_thread_blocked, id=7716, stack(0x0000000054850000,0x0000000054950000)] 0x0000000053ac9000 JavaThread "C1 CompilerThread1" daemon [_thread_blocked, id=3960, stack(0x0000000054e40000,0x0000000054f40000)] 0x0000000053abf000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=5724, stack(0x0000000054d40000,0x0000000054e40000)] 0x0000000053aba000 JavaThread "Attach Listener" daemon [_thread_blocked, id=6436, stack(0x0000000054b80000,0x0000000054c80000)] 0x0000000053ab8000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=7540, stack(0x00000000549d0000,0x0000000054ad0000)] 0x0000000053a9f000 JavaThread "Finalizer" daemon [_thread_blocked, id=6944, stack(0x0000000054670000,0x0000000054770000)] 0x0000000053a55800 JavaThread "Reference Handler" daemon [_thread_blocked, id=3156, stack(0x00000000543f0000,0x00000000544f0000)] =>0x000000000215e800 JavaThread "main" [_thread_in_native, id=6704, stack(0x0000000002370000,0x0000000002470000)] Other Threads: 0x0000000053a4d800 VMThread [stack: 0x0000000054540000,0x0000000054640000] [id=4316] 0x0000000054fd3800 WatcherThread [stack: 0x0000000055490000,0x0000000055590000] [id=7732] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap: PSYoungGen total 9728K, used 714K [0x00000000f5a00000, 0x00000000f6480000, 0x0000000100000000) eden space 8704K, 8% used [0x00000000f5a00000,0x00000000f5ab28e0,0x00000000f6280000) from space 1024K, 0% used [0x00000000f6380000,0x00000000f6380000,0x00000000f6480000) to space 1024K, 0% used [0x00000000f6280000,0x00000000f6280000,0x00000000f6380000) ParOldGen total 22016K, used 0K [0x00000000e0e00000, 0x00000000e2380000, 0x00000000f5a00000) object space 22016K, 0% used [0x00000000e0e00000,0x00000000e0e00000,0x00000000e2380000) Metaspace used 2999K, capacity 4486K, committed 4864K, reserved 1056768K class space used 333K, capacity 386K, committed 512K, reserved 1048576K Card table byte_map: [0x0000000011b00000,0x0000000011c00000] byte_map_base: 0x00000000113f9000 Marking Bits: (ParMarkBitMap*) 0x000000006046b6d0 Begin Bits: [0x0000000012190000, 0x0000000012958000) End Bits: [0x0000000012958000, 0x0000000013120000) Polling page: 0x0000000000340000 CodeCache: size=245760Kb used=1063Kb max_used=1068Kb free=244696Kb bounds [0x0000000002740000, 0x00000000029b0000, 0x0000000011740000] total_blobs=232 nmethods=0 adapters=147 compilation: enabled Compilation events (0 events): No events GC Heap History (0 events): No events Deoptimization events (0 events): No events Internal exceptions (10 events): Event: 4.248 Thread 0x000000000215e800 Exception <a 'java/lang/NoSuchFieldError': genericInfo> (0x00000000f5a8c070) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 2965] Event: 4.248 Thread 0x000000000215e800 Exception <a 'java/lang/NoSuchFieldError': enumConstants> (0x00000000f5a8c2c0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 2965] Event: 4.248 Thread 0x000000000215e800 Exception <a 'java/lang/NoSuchFieldError': enumConstantDirectory> (0x00000000f5a8c520) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 2965] Event: 4.248 Thread 0x000000000215e800 Exception <a 'java/lang/NoSuchFieldError': annotationData> (0x00000000f5a8c770) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 2965] Event: 4.248 Thread 0x000000000215e800 Exception <a 'java/lang/NoSuchFieldError': annotationType> (0x00000000f5a8c9c0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 2965] Event: 4.249 Thread 0x000000000215e800 Exception <a 'java/lang/NoSuchFieldError': classValueMap> (0x00000000f5a8cc10) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 2965] Event: 4.249 Thread 0x000000000215e800 Exception <a 'java/lang/NoSuchFieldError': value> (0x00000000f5a8ce50) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 2965] Event: 4.250 Thread 0x000000000215e800 Exception <a 'java/lang/NoSuchFieldError': next> (0x00000000f5a8d088) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 2965] Event: 4.250 Thread 0x000000000215e800 Exception <a 'java/lang/NoSuchFieldError': next> (0x00000000f5a8d2c0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 2965] Event: 4.250 Thread 0x000000000215e800 Exception <a 'java/lang/NoSuchFieldError': x> (0x00000000f5a8d4f8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 2965] Events (10 events): Event: 4.191 loading class java/lang/Void Event: 4.192 loading class java/lang/Void done Event: 4.193 loading class javaapplication1/hello Event: 4.193 loading class javaapplication1/hello done Event: 4.245 Executing VM operation: GetOrSetLocal Event: 4.246 Executing VM operation: GetOrSetLocal done Event: 4.246 loading class java/lang/NoSuchFieldError Event: 4.247 loading class java/lang/NoSuchFieldError done Event: 4.249 Executing VM operation: GetOrSetLocal Event: 4.250 Executing VM operation: GetOrSetLocal done Dynamic libraries: 0x000000013fdf0000 - 0x000000013fe27000 C:\Program Files\Java\jdk1.8.0_121\bin\java.exe 0x0000000077ac0000 - 0x0000000077c6a000 C:\windows\SYSTEM32\ntdll.dll 0x00000000778a0000 - 0x00000000779bf000 C:\windows\system32\kernel32.dll 0x000007fefd7c0000 - 0x000007fefd82a000 C:\windows\system32\KERNELBASE.dll 0x000007feffc90000 - 0x000007feffd6b000 C:\windows\system32\ADVAPI32.dll 0x000007feff6f0000 - 0x000007feff78f000 C:\windows\system32\msvcrt.dll 0x000007fefe150000 - 0x000007fefe16f000 C:\windows\SYSTEM32\sechost.dll 0x000007fefdb60000 - 0x000007fefdc8d000 C:\windows\system32\RPCRT4.dll 0x00000000779c0000 - 0x0000000077aba000 C:\windows\system32\USER32.dll 0x000007fefe170000 - 0x000007fefe1d7000 C:\windows\system32\GDI32.dll 0x000007feff790000 - 0x000007feff79e000 C:\windows\system32\LPK.dll 0x000007fefdce0000 - 0x000007fefddaa000 C:\windows\system32\USP10.dll 0x000007fefc060000 - 0x000007fefc254000 C:\windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_fa3b1e3d17594757\COMCTL32.dll 0x000007feff8e0000 - 0x000007feff951000 C:\windows\system32\SHLWAPI.dll 0x000007feff7a0000 - 0x000007feff7ce000 C:\windows\system32\IMM32.DLL 0x000007feff7d0000 - 0x000007feff8d9000 C:\windows\system32\MSCTF.dll 0x0000000061520000 - 0x00000000615f2000 C:\Program Files\Java\jdk1.8.0_121\jre\bin\msvcr100.dll 0x000000005fc50000 - 0x00000000604eb000 C:\Program Files\Java\jdk1.8.0_121\jre\bin\server\jvm.dll 0x000007fef5e60000 - 0x000007fef5e69000 C:\windows\system32\WSOCK32.dll 0x000007fefdc90000 - 0x000007fefdcdd000 C:\windows\system32\WS2_32.dll 0x000007fefde50000 - 0x000007fefde58000 C:\windows\system32\NSI.dll 0x000007fefafe0000 - 0x000007fefb01b000 C:\windows\system32\WINMM.dll 0x000007fefc840000 - 0x000007fefc84c000 C:\windows\system32\VERSION.dll 0x0000000077c90000 - 0x0000000077c97000 C:\windows\system32\PSAPI.DLL 0x000000006e8d0000 - 0x000000006e8df000 C:\Program Files\Java\jdk1.8.0_121\jre\bin\verify.dll 0x000000006e870000 - 0x000000006e899000 C:\Program Files\Java\jdk1.8.0_121\jre\bin\java.dll 0x0000000064a80000 - 0x0000000064d79000 C:\Users\siddharth\Documents\NetBeansProjects\CppDynamicLibrary_1\dist\Debug\MinGW64-Windows\libCppDynamicLibrary_1.dll 0x0000000061440000 - 0x000000006145c000 C:\msys64\mingw64\bin\libgcc_s_seh-1.dll 0x0000000064940000 - 0x0000000064955000 C:\msys64\mingw64\bin\libwinpthread-1.dll 0x000000006fc40000 - 0x000000006fda1000 C:\msys64\mingw64\bin\libstdc++-6.dll 0x0000000066330000 - 0x0000000066346000 C:\Program Files\Java\jdk1.8.0_121\jre\bin\zip.dll 0x000007fefe3c0000 - 0x000007feff14a000 C:\windows\system32\SHELL32.dll 0x000007feff150000 - 0x000007feff353000 C:\windows\system32\ole32.dll 0x000007fefd7a0000 - 0x000007fefd7af000 C:\windows\system32\profapi.dll 0x000007fef5fa0000 - 0x000007fef60c5000 C:\windows\system32\dbghelp.dll VM Arguments: jvm_args: -agentpath:C:\\Users\\siddharth\\Documents\\NetBeansProjects\\CppDynamicLibrary_1\\dist\\Debug\\MinGW64-Windows\\libCppDynamicLibrary_1.dll java_command: C:\\Users\\siddharth\\Documents\\NetBeansProjects\\JavaApplication1\\dist\\JavaApplication1.jar java_class_path (initial): C:\\Users\\siddharth\\Documents\\NetBeansProjects\\JavaApplication1\\dist\\JavaApplication1.jar Launcher Type: SUN_STANDARD Environment Variables: PATH=C:\msys\1.0\bin;C:\Perl64\site\bin;C:\Perl64\bin;C:\Perl\site\bin;C:\Perl\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\syswow64;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\CMake\bin;C:\Program Files\nodejs\;C:\msys64\mingw64\bin;C:\msys64\usr\bin;C:\Users\Guest\AppData\Local\Code\bin;C:\Program Files (x86)\LLVM\bin;C:\Program Files (x86)\Nmap;c:\Program Files\Java\jdk1.8.0_121\bin;C:\Users\Guest\AppData\Roaming\npm;C:\msys64\mingw64\bin;C:\msys\1.0\bin USERNAME=siddharth OS=Windows_NT PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 42 Stepping 7, GenuineIntel --------------- S Y S T E M --------------- OS: Windows 7 , 64 bit Build 7601 (6.1.7601.23677) CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 42 stepping 7, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, clmul, tsc, tscinvbit Memory: 4k page, physical 2039664k(275996k free), swap 5401696k(968952k free) vm_info: Java HotSpot(TM) 64-Bit Server VM (25.121-b13) for windows-amd64 JRE (1.8.0_121-b13), built on Dec 12 2016 18:21:36 by "java_re" with MS VC++ 10.0 (VS2010) time: Sun Apr 09 12:59:39 2017 elapsed time: 4 seconds (0d 0h 0m 4s)
valgrind more allocs than frees but no leaks
I have encountered a problem.. When i run the valgrind with my program i've got the following output and it confuse me: ==12919== HEAP SUMMARY: ==12919== in use at exit: 97,820 bytes in 1 blocks ==12919== total heap usage: 17 allocs, 16 frees, 99,388 bytes allocated ==12919== ==12919== LEAK SUMMARY: ==12919== definitely lost: 0 bytes in 0 blocks ==12919== indirectly lost: 0 bytes in 0 blocks ==12919== possibly lost: 0 bytes in 0 blocks ==12919== still reachable: 97,820 bytes in 1 blocks ==12919== suppressed: 0 bytes in 0 blocks ==12919== Reachable blocks (those to which a pointer was found) are not shown. ==12919== To see them, rerun with: --leak-check=full --show-reachable=yes ==12919== ==12919== For counts of detected and suppressed errors, rerun with: -v ==12919== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 6 from 6)
I found that it was caused by compilation with "-pg" flag. Without it all is ok!
From the valgrind faq 5.2. With Memcheck's memory leak detector, what's the difference between "definitely lost", "indirectly lost", "possibly lost", "still reachable", and "suppressed"? The details are in the Memcheck section of the user manual. In short: "definitely lost" means your program is leaking memory -- fix those leaks! "indirectly lost" means your program is leaking memory in a pointer-based structure. (E.g. if the root node of a binary tree is "definitely lost", all the children will be "indirectly lost".) If you fix the "definitely lost" leaks, the "indirectly lost" leaks should go away. "possibly lost" means your program is leaking memory, unless you're doing unusual things with pointers that could cause them to point into the middle of an allocated block; see the user manual for some possible causes. Use --show-possibly-lost=no if you don't want to see these reports. "still reachable" means your program is probably ok -- it didn't free some memory it could have. This is quite common and often reasonable. Don't use --show-reachable=yes if you don't want to see these reports. "suppressed" means that a leak error has been suppressed. There are some suppressions in the default suppression files. You can ignore suppressed errors.