Idea跑Junit报错Native memory allocation (malloc) failed to allocate

  • A+
所属分类:IntelliJ IDEA

这些时用ideajunit时老是报错内存不足,具体报错信息如下:

#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 1745136 bytes for Chunk::new
# 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:390), pid=19388, tid=0x0000000000005668
#
# JRE version: Java(TM) SE Runtime Environment (8.0_171-b11) (build 1.8.0_171-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.171-b11 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 (0x0000000018a7e000):  JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=22120, stack(0x00000000196b0000,0x00000000197b0000)]

Stack: [0x00000000196b0000,0x00000000197b0000]
[error occurred during error reporting (printing stack bounds), id 0xc0000005]

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)


Current CompileTask:
C2:   7094 3897   !   4       org.springframework.util.ClassUtils::getMostSpecificMethod (72 bytes)


---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x000000001e062800 JavaThread "Abandoned connection cleanup thread" daemon [_thread_blocked, id=22584, stack(0x000000001ec90000,0x000000001ed90000)]
  0x0000000018afe000 JavaThread "Service Thread" daemon [_thread_blocked, id=22960, stack(0x0000000019950000,0x0000000019a50000)]
  0x0000000018ad8800 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=21508, stack(0x0000000019590000,0x0000000019690000)]
=>0x0000000018a7e000 JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=22120, stack(0x00000000196b0000,0x00000000197b0000)]
  0x0000000018a7d000 JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=20620, stack(0x0000000019450000,0x0000000019550000)]
  0x00000000178bf800 JavaThread "Monitor Ctrl-Break" daemon [_thread_in_native, id=22112, stack(0x00000000192d0000,0x00000000193d0000)]
  0x0000000018a3e800 JavaThread "Attach Listener" daemon [_thread_blocked, id=3752, stack(0x0000000019110000,0x0000000019210000)]
  0x00000000178b5800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=16128, stack(0x0000000018f80000,0x0000000019080000)]
  0x00000000178a2800 JavaThread "Finalizer" daemon [_thread_blocked, id=22732, stack(0x0000000018810000,0x0000000018910000)]
  0x000000001785b800 JavaThread "Reference Handler" daemon [_thread_blocked, id=22736, stack(0x0000000018930000,0x0000000018a30000)]
  0x0000000002430000 JavaThread "main" [_thread_in_Java, id=23428, stack(0x0000000002860000,0x0000000002960000)]

Other Threads:
  0x0000000017854000 VMThread [stack: 0x00000000186d0000,0x00000000187d0000] [id=23500]
  0x0000000018b19800 WatcherThread [stack: 0x0000000019ae0000,0x0000000019be0000] [id=22200]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap:
 PSYoungGen      total 226816K, used 51650K [0x00000000d5900000, 0x00000000ebf00000, 0x0000000100000000)
  eden space 211456K, 24% used [0x00000000d5900000,0x00000000d8b70a48,0x00000000e2780000)
  from space 15360K, 0% used [0x00000000e2780000,0x00000000e2780000,0x00000000e3680000)
  to   space 17408K, 0% used [0x00000000eae00000,0x00000000eae00000,0x00000000ebf00000)
 ParOldGen       total 96256K, used 19788K [0x0000000080a00000, 0x0000000086800000, 0x00000000d5900000)
  object space 96256K, 20% used [0x0000000080a00000,0x0000000081d533c8,0x0000000086800000)
 Metaspace       used 34950K, capacity 36198K, committed 36312K, reserved 1081344K
  class space    used 4554K, capacity 4829K, committed 4864K, reserved 1048576K

Card table byte_map: [0x0000000011d20000,0x0000000012120000] byte_map_base: 0x000000001191b000

Marking Bits: (ParMarkBitMap*) 0x0000000053bc08c0
 Begin Bits: [0x0000000012b10000, 0x0000000014ae8000)
 End Bits:   [0x0000000014ae8000, 0x0000000016ac0000)

Polling page: 0x0000000000330000

CodeCache: size=245760Kb used=15556Kb max_used=15585Kb free=230203Kb
 bounds [0x0000000002960000, 0x00000000038b0000, 0x0000000011960000]
 total_blobs=4449 nmethods=4028 adapters=331
 compilation: enabled

Compilation events (10 events):
Event: 6.666 Thread 0x0000000018ad8800 4060       2       java.nio.charset.CharsetDecoder::implReplaceWith (1 bytes)
Event: 6.666 Thread 0x0000000018ad8800 nmethod 4060 0x000000000389ce50 code [0x000000000389cfa0, 0x000000000389d0f0]
Event: 6.685 Thread 0x0000000018ad8800 4062       3       org.springframework.util.StringUtils::tokenizeToStringArray (86 bytes)
Event: 6.686 Thread 0x0000000018ad8800 nmethod 4062 0x000000000389d150 code [0x000000000389d3c0, 0x000000000389e4b8]
Event: 6.815 Thread 0x0000000018ad8800 4064       2       sun.nio.cs.UTF_8$Decoder::decodeLoop (28 bytes)
Event: 6.816 Thread 0x0000000018ad8800 nmethod 4064 0x000000000389edd0 code [0x000000000389ef40, 0x000000000389f158]
Event: 6.963 Thread 0x0000000018ad8800 4066 %     3       java.util.StringTokenizer::setMaxDelimCodePoint @ 20 (156 bytes)
Event: 6.963 Thread 0x0000000018ad8800 nmethod 4066% 0x000000000389f250 code [0x000000000389f440, 0x000000000389ffa8]
Event: 6.963 Thread 0x0000000018ad8800 4067       3       java.util.StringTokenizer::setMaxDelimCodePoint (156 bytes)
Event: 6.964 Thread 0x0000000018ad8800 nmethod 4067 0x0000000002a7bfd0 code [0x0000000002a7c1c0, 0x0000000002a7cca8]

GC Heap History (10 events):
Event: 2.250 GC heap before
{Heap before GC invocations=5 (full 1):
 PSYoungGen      total 138240K, used 5116K [0x00000000d5900000, 0x00000000de500000, 0x0000000100000000)
  eden space 133120K, 0% used [0x00000000d5900000,0x00000000d5900000,0x00000000ddb00000)
  from space 5120K, 99% used [0x00000000de000000,0x00000000de4ff2a8,0x00000000de500000)
  to   space 5120K, 0% used [0x00000000ddb00000,0x00000000ddb00000,0x00000000de000000)
 ParOldGen       total 87552K, used 6679K [0x0000000080a00000, 0x0000000085f80000, 0x00000000d5900000)
  object space 87552K, 7% used [0x0000000080a00000,0x0000000081085f98,0x0000000085f80000)
 Metaspace       used 20579K, capacity 21168K, committed 21248K, reserved 1067008K
  class space    used 2635K, capacity 2800K, committed 2816K, reserved 1048576K
Event: 2.278 GC heap after
Heap after GC invocations=5 (full 1):
 PSYoungGen      total 138240K, used 0K [0x00000000d5900000, 0x00000000de500000, 0x0000000100000000)
  eden space 133120K, 0% used [0x00000000d5900000,0x00000000d5900000,0x00000000ddb00000)
  from space 5120K, 0% used [0x00000000de000000,0x00000000de000000,0x00000000de500000)
  to   space 5120K, 0% used [0x00000000ddb00000,0x00000000ddb00000,0x00000000de000000)
 ParOldGen       total 58880K, used 8578K [0x0000000080a00000, 0x0000000084380000, 0x00000000d5900000)
  object space 58880K, 14% used [0x0000000080a00000,0x00000000812608c8,0x0000000084380000)
 Metaspace       used 20579K, capacity 21168K, committed 21248K, reserved 1067008K
  class space    used 2635K, capacity 2800K, committed 2816K, reserved 1048576K
}
Event: 3.539 GC heap before
{Heap before GC invocations=6 (full 1):
 PSYoungGen      total 138240K, used 133120K [0x00000000d5900000, 0x00000000de500000, 0x0000000100000000)
  eden space 133120K, 100% used [0x00000000d5900000,0x00000000ddb00000,0x00000000ddb00000)
  from space 5120K, 0% used [0x00000000de000000,0x00000000de000000,0x00000000de500000)
  to   space 5120K, 0% used [0x00000000ddb00000,0x00000000ddb00000,0x00000000de000000)
 ParOldGen       total 58880K, used 8578K [0x0000000080a00000, 0x0000000084380000, 0x00000000d5900000)
  object space 58880K, 14% used [0x0000000080a00000,0x00000000812608c8,0x0000000084380000)
 Metaspace       used 28112K, capacity 29006K, committed 29312K, reserved 1075200K
  class space    used 3616K, capacity 3849K, committed 3968K, reserved 1048576K
Event: 3.550 GC heap after
Heap after GC invocations=6 (full 1):
 PSYoungGen      total 138240K, used 5088K [0x00000000d5900000, 0x00000000e4400000, 0x0000000100000000)
  eden space 133120K, 0% used [0x00000000d5900000,0x00000000d5900000,0x00000000ddb00000)
  from space 5120K, 99% used [0x00000000ddb00000,0x00000000ddff8020,0x00000000de000000)
  to   space 13824K, 0% used [0x00000000e3680000,0x00000000e3680000,0x00000000e4400000)
 ParOldGen       total 58880K, used 15753K [0x0000000080a00000, 0x0000000084380000, 0x00000000d5900000)
  object space 58880K, 26% used [0x0000000080a00000,0x00000000819626b8,0x0000000084380000)
 Metaspace       used 28112K, capacity 29006K, committed 29312K, reserved 1075200K
  class space    used 3616K, capacity 3849K, committed 3968K, reserved 1048576K
}
Event: 4.342 GC heap before
{Heap before GC invocations=7 (full 1):
 PSYoungGen      total 138240K, used 138208K [0x00000000d5900000, 0x00000000e4400000, 0x0000000100000000)
  eden space 133120K, 100% used [0x00000000d5900000,0x00000000ddb00000,0x00000000ddb00000)
  from space 5120K, 99% used [0x00000000ddb00000,0x00000000ddff8020,0x00000000de000000)
  to   space 13824K, 0% used [0x00000000e3680000,0x00000000e3680000,0x00000000e4400000)
 ParOldGen       total 58880K, used 15753K [0x0000000080a00000, 0x0000000084380000, 0x00000000d5900000)
  object space 58880K, 26% used [0x0000000080a00000,0x00000000819626b8,0x0000000084380000)
 Metaspace       used 32055K, capacity 33078K, committed 33280K, reserved 1079296K
  class space    used 4144K, capacity 4345K, committed 4352K, reserved 1048576K
Event: 4.361 GC heap after
Heap after GC invocations=7 (full 1):
 PSYoungGen      total 225280K, used 12069K [0x00000000d5900000, 0x00000000e4880000, 0x0000000100000000)
  eden space 211456K, 0% used [0x00000000d5900000,0x00000000d5900000,0x00000000e2780000)
  from space 13824K, 87% used [0x00000000e3680000,0x00000000e4249448,0x00000000e4400000)
  to   space 15360K, 0% used [0x00000000e2780000,0x00000000e2780000,0x00000000e3680000)
 ParOldGen       total 58880K, used 15761K [0x0000000080a00000, 0x0000000084380000, 0x00000000d5900000)
  object space 58880K, 26% used [0x0000000080a00000,0x00000000819646b8,0x0000000084380000)
 Metaspace       used 32055K, capacity 33078K, committed 33280K, reserved 1079296K
  class space    used 4144K, capacity 4345K, committed 4352K, reserved 1048576K
}
Event: 6.261 GC heap before
{Heap before GC invocations=8 (full 1):
 PSYoungGen      total 225280K, used 111700K [0x00000000d5900000, 0x00000000e4880000, 0x0000000100000000)
  eden space 211456K, 47% used [0x00000000d5900000,0x00000000dba4bda8,0x00000000e2780000)
  from space 13824K, 87% used [0x00000000e3680000,0x00000000e4249448,0x00000000e4400000)
  to   space 15360K, 0% used [0x00000000e2780000,0x00000000e2780000,0x00000000e3680000)
 ParOldGen       total 58880K, used 15761K [0x0000000080a00000, 0x0000000084380000, 0x00000000d5900000)
  object space 58880K, 26% used [0x0000000080a00000,0x00000000819646b8,0x0000000084380000)
 Metaspace       used 34192K, capacity 35356K, committed 35416K, reserved 1079296K
  class space    used 4457K, capacity 4700K, committed 4736K, reserved 1048576K
Event: 6.274 GC heap after
Heap after GC invocations=8 (full 1):
 PSYoungGen      total 226816K, used 14206K [0x00000000d5900000, 0x00000000ebf00000, 0x0000000100000000)
  eden space 211456K, 0% used [0x00000000d5900000,0x00000000d5900000,0x00000000e2780000)
  from space 15360K, 92% used [0x00000000e2780000,0x00000000e355fad0,0x00000000e3680000)
  to   space 17408K, 0% used [0x00000000eae00000,0x00000000eae00000,0x00000000ebf00000)
 ParOldGen       total 58880K, used 15769K [0x0000000080a00000, 0x0000000084380000, 0x00000000d5900000)
  object space 58880K, 26% used [0x0000000080a00000,0x00000000819666b8,0x0000000084380000)
 Metaspace       used 34192K, capacity 35356K, committed 35416K, reserved 1079296K
  class space    used 4457K, capacity 4700K, committed 4736K, reserved 1048576K
}
Event: 6.274 GC heap before
{Heap before GC invocations=9 (full 2):
 PSYoungGen      total 226816K, used 14206K [0x00000000d5900000, 0x00000000ebf00000, 0x0000000100000000)
  eden space 211456K, 0% used [0x00000000d5900000,0x00000000d5900000,0x00000000e2780000)
  from space 15360K, 92% used [0x00000000e2780000,0x00000000e355fad0,0x00000000e3680000)
  to   space 17408K, 0% used [0x00000000eae00000,0x00000000eae00000,0x00000000ebf00000)
 ParOldGen       total 58880K, used 15769K [0x0000000080a00000, 0x0000000084380000, 0x00000000d5900000)
  object space 58880K, 26% used [0x0000000080a00000,0x00000000819666b8,0x0000000084380000)
 Metaspace       used 34192K, capacity 35356K, committed 35416K, reserved 1079296K
  class space    used 4457K, capacity 4700K, committed 4736K, reserved 1048576K
Event: 6.355 GC heap after
Heap after GC invocations=9 (full 2):
 PSYoungGen      total 226816K, used 0K [0x00000000d5900000, 0x00000000ebf00000, 0x0000000100000000)
  eden space 211456K, 0% used [0x00000000d5900000,0x00000000d5900000,0x00000000e2780000)
  from space 15360K, 0% used [0x00000000e2780000,0x00000000e2780000,0x00000000e3680000)
  to   space 17408K, 0% used [0x00000000eae00000,0x00000000eae00000,0x00000000ebf00000)
 ParOldGen       total 96256K, used 19788K [0x0000000080a00000, 0x0000000086800000, 0x00000000d5900000)
  object space 96256K, 20% used [0x0000000080a00000,0x0000000081d533c8,0x0000000086800000)
 Metaspace       used 34192K, capacity 35356K, committed 35416K, reserved 1079296K
  class space    used 4457K, capacity 4700K, committed 4736K, reserved 1048576K
}

Deoptimization events (10 events):
Event: 6.437 Thread 0x0000000002430000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002e09730 method=java.util.zip.ZipCoder.getBytes(Ljava/lang/String;)[B @ 32
Event: 6.437 Thread 0x0000000002430000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002dffeac method=java.util.zip.ZipCoder.getBytes(Ljava/lang/String;)[B @ 32
Event: 6.437 Thread 0x0000000002430000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002e10a30 method=java.util.zip.ZipCoder.getBytes(Ljava/lang/String;)[B @ 32
Event: 6.437 Thread 0x0000000002430000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002b1c3b0 method=java.util.zip.ZipCoder.getBytes(Ljava/lang/String;)[B @ 32
Event: 6.437 Thread 0x0000000002430000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003678b2c method=java.net.URL.<init>(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V @ 57
Event: 6.437 Thread 0x0000000002430000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002dd0b44 method=java.net.URLStreamHandler.parseURL(Ljava/net/URL;Ljava/lang/String;II)V @ 57
Event: 6.437 Thread 0x0000000002430000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00000000033310f4 method=java.io.WinNTFileSystem.resolve(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; @ 19
Event: 6.440 Thread 0x0000000002430000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003057b4c method=java.util.Properties$LineReader.readLine()I @ 328
Event: 6.440 Thread 0x0000000002430000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003053458 method=java.util.Properties.loadConvert([CII[C)Ljava/lang/String; @ 57
Event: 6.441 Thread 0x0000000002430000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000002f0ca9c method=java.io.WinNTFileSystem.isLetter(C)Z @ 3

Classes redefined (0 events):
No events

Internal exceptions (10 events):
Event: 6.396 Thread 0x0000000002430000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/beans/factory/AwareCustomizer> (0x00000000d613a980) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u171\10807\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 210
Event: 6.396 Thread 0x0000000002430000 Exception <a 'java/lang/ClassNotFoundException': org/activiti/engine/cfg/ProcessEngineConfiguratorCustomizer> (0x00000000d6161918) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u171\10807\hotspot\src\share\vm\classfile\systemDictionary.cpp
Event: 6.473 Thread 0x0000000002430000 Exception <a 'java/io/FileNotFoundException'> (0x00000000d6887218) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u171\10807\hotspot\src\share\vm\prims\jni.cpp, line 709]
Event: 6.473 Thread 0x0000000002430000 Exception <a 'java/io/FileNotFoundException'> (0x00000000d6888820) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u171\10807\hotspot\src\share\vm\prims\jni.cpp, line 709]
Event: 6.473 Thread 0x0000000002430000 Exception <a 'java/io/FileNotFoundException'> (0x00000000d688ac98) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u171\10807\hotspot\src\share\vm\prims\jni.cpp, line 709]
Event: 6.473 Thread 0x0000000002430000 Exception <a 'java/io/FileNotFoundException'> (0x00000000d688c218) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u171\10807\hotspot\src\share\vm\prims\jni.cpp, line 709]
Event: 6.591 Thread 0x0000000002430000 Exception <a 'java/io/FileNotFoundException'> (0x00000000d6bd48c8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u171\10807\hotspot\src\share\vm\prims\jni.cpp, line 709]
Event: 6.592 Thread 0x0000000002430000 Exception <a 'java/io/FileNotFoundException'> (0x00000000d6bd5f80) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u171\10807\hotspot\src\share\vm\prims\jni.cpp, line 709]
Event: 6.592 Thread 0x0000000002430000 Exception <a 'java/io/FileNotFoundException'> (0x00000000d6bda2e8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u171\10807\hotspot\src\share\vm\prims\jni.cpp, line 709]
Event: 6.592 Thread 0x0000000002430000 Exception <a 'java/io/FileNotFoundException'> (0x00000000d6bdb930) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u171\10807\hotspot\src\share\vm\prims\jni.cpp, line 709]

Events (10 events):
Event: 6.460 Thread 0x0000000018a7e000 flushing nmethod 0x0000000002a75710
Event: 6.460 Thread 0x0000000018a7e000 flushing nmethod 0x0000000002a83e10
Event: 6.460 Thread 0x0000000018a7e000 flushing nmethod 0x0000000002a890d0
Event: 6.872 Executing VM operation: BulkRevokeBias
Event: 6.872 Executing VM operation: BulkRevokeBias done
Event: 6.963 Thread 0x0000000018ad8800 flushing nmethod 0x0000000002a75010
Event: 6.963 Thread 0x0000000018ad8800 flushing nmethod 0x0000000002a7a690
Event: 6.963 Thread 0x0000000018ad8800 flushing nmethod 0x0000000002a7ed10
Event: 6.963 Thread 0x0000000018ad8800 flushing nmethod 0x0000000002aa6510
Event: 6.963 Thread 0x0000000018ad8800 flushing nmethod 0x0000000002ab9810


Dynamic libraries:
0x000000013f7d0000 - 0x000000013f807000    C:\Program Files\Java\jdk1.8.0_171\bin\java.exe
0x0000000077940000 - 0x0000000077aea000    C:\windows\SYSTEM32\ntdll.dll
0x0000000077820000 - 0x000000007793f000    C:\windows\system32\kernel32.dll
0x000007fefd6d0000 - 0x000007fefd73a000    C:\windows\system32\KERNELBASE.dll
0x000007fefe960000 - 0x000007fefea3b000    C:\windows\system32\ADVAPI32.dll
0x000007feff970000 - 0x000007feffa0f000    C:\windows\system32\msvcrt.dll
0x000007feffa60000 - 0x000007feffa7f000    C:\windows\SYSTEM32\sechost.dll
0x000007feff560000 - 0x000007feff68d000    C:\windows\system32\RPCRT4.dll
0x0000000077720000 - 0x000000007781a000    C:\windows\system32\USER32.dll
0x000007feffbe0000 - 0x000007feffc47000    C:\windows\system32\GDI32.dll
0x000007fefe8d0000 - 0x000007fefe8de000    C:\windows\system32\LPK.dll
0x000007fefea40000 - 0x000007fefeb0a000    C:\windows\system32\USP10.dll
0x000007fefcc50000 - 0x000007fefce44000    C:\windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_fa3b1e3d17594757\COMCTL32.dll
0x000007fefe8e0000 - 0x000007fefe951000    C:\windows\system32\SHLWAPI.dll
0x000007feff4d0000 - 0x000007feff4fe000    C:\windows\system32\IMM32.DLL
0x000007fefda30000 - 0x000007fefdb39000    C:\windows\system32\MSCTF.dll
0x0000000057660000 - 0x0000000057732000    C:\Program Files\Java\jdk1.8.0_171\jre\bin\msvcr100.dll
0x00000000533a0000 - 0x0000000053c40000    C:\Program Files\Java\jdk1.8.0_171\jre\bin\server\jvm.dll
0x000007fef9c60000 - 0x000007fef9c69000    C:\windows\system32\WSOCK32.dll
0x000007feffa10000 - 0x000007feffa5d000    C:\windows\system32\WS2_32.dll
0x000007fefed10000 - 0x000007fefed18000    C:\windows\system32\NSI.dll
0x000007fefa010000 - 0x000007fefa04b000    C:\windows\system32\WINMM.dll
0x000007fefd310000 - 0x000007fefd31c000    C:\windows\system32\VERSION.dll
0x0000000077b10000 - 0x0000000077b17000    C:\windows\system32\PSAPI.DLL
0x0000000057650000 - 0x000000005765f000    C:\Program Files\Java\jdk1.8.0_171\jre\bin\verify.dll
0x0000000057620000 - 0x0000000057649000    C:\Program Files\Java\jdk1.8.0_171\jre\bin\java.dll
0x000000005a120000 - 0x000000005a143000    C:\Program Files\Java\jdk1.8.0_171\jre\bin\instrument.dll
0x0000000057600000 - 0x0000000057616000    C:\Program Files\Java\jdk1.8.0_171\jre\bin\zip.dll
0x000007fefdb40000 - 0x000007fefe8c9000    C:\windows\system32\SHELL32.dll
0x000007feff180000 - 0x000007feff383000    C:\windows\system32\ole32.dll
0x000007fefd680000 - 0x000007fefd68f000    C:\windows\system32\profapi.dll
0x000007feda1b0000 - 0x000007feda1ca000    D:\soft\IntelliJ IDEA 2018.3\bin\breakgen64.dll
0x00000000575e0000 - 0x00000000575fa000    C:\Program Files\Java\jdk1.8.0_171\jre\bin\net.dll
0x000007fefcf30000 - 0x000007fefcf85000    C:\windows\system32\mswsock.dll
0x000007fefca60000 - 0x000007fefca67000    C:\windows\System32\wship6.dll
0x00000000575c0000 - 0x00000000575d1000    C:\Program Files\Java\jdk1.8.0_171\jre\bin\nio.dll
0x00000000575b0000 - 0x00000000575bd000    C:\Program Files\Java\jdk1.8.0_171\jre\bin\management.dll
0x000007fefd030000 - 0x000007fefd045000    C:\windows\system32\NLAapi.dll
0x000007fefd010000 - 0x000007fefd025000    C:\windows\system32\napinsp.dll
0x000007fefcfd0000 - 0x000007fefcfe9000    C:\windows\system32\pnrpnsp.dll
0x000007fefce50000 - 0x000007fefceab000    C:\windows\system32\DNSAPI.dll
0x000007fefcc40000 - 0x000007fefcc4b000    C:\windows\System32\winrnr.dll
0x00000000753d0000 - 0x00000000753f6000    C:\Program Files\Bonjour\mdnsNSP.dll
0x000007fefcc10000 - 0x000007fefcc37000    C:\windows\system32\Iphlpapi.DLL
0x000007fefcc00000 - 0x000007fefcc0b000    C:\windows\system32\WINNSI.DLL
0x000007fefc8d0000 - 0x000007fefc8d7000    C:\windows\System32\wshtcpip.dll
0x000007fefc740000 - 0x000007fefc748000    C:\windows\system32\rasadhlp.dll
0x000007fefa6e0000 - 0x000007fefa733000    C:\windows\System32\fwpuclnt.dll
0x000007fefcaa0000 - 0x000007fefcab8000    C:\windows\system32\CRYPTSP.dll
0x000007fefc7e0000 - 0x000007fefc827000    C:\windows\system32\rsaenh.dll
0x000007fefd7f0000 - 0x000007fefd80e000    C:\windows\system32\USERENV.dll
0x000007fefd4d0000 - 0x000007fefd4df000    C:\windows\system32\CRYPTBASE.dll
0x000007fefc9e0000 - 0x000007fefc9f1000    C:\windows\system32\dhcpcsvc6.DLL
0x000007fefc8e0000 - 0x000007fefc8f8000    C:\windows\system32\dhcpcsvc.DLL

VM Arguments:
jvm_args: -ea -Didea.test.cyclic.buffer.size=1048576 -javaagent:D:\soft\IntelliJ IDEA 2018.3\lib\idea_rt.jar=54654:D:\soft\IntelliJ IDEA 2018.3\bin -Dfile.encoding=UTF-8 
java_command: com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 -junit4 com.zp.activitispringboot.HuiqianTest4,testCompleteTask2
java_class_path (initial): D:\soft\IntelliJ IDEA 2018.3\lib\idea_rt.jar;D:\soft\IntelliJ IDEA 2018.3\plugins\junit\lib\junit-rt.jar;D:\soft\IntelliJ IDEA 2018.3\plugins\junit\lib\junit5-rt.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_171\jre\lib\rt.jar;E:\GitHub\zp_project\activitispringboot\target\test-classes;E:\GitHub\zp_project\activitispringboot\target\classes;C:\Users\admin\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.1.12.RELEASE\spring-boot-starter-web-2.1.12.RELEASE.jar;C:\Users\admin\.m2\repository\org\springframework\boot\spring-boot-starter\2.1.12.RELEASE\spring-boot-starter-2.1.12.RELEASE.jar;C:\Users\admin\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.1.12.RELEASE\spring
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_171
PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\tspcln;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\tspcln;C:\Users\admin\AppData\Local\Programs\Python\Python36-32;.\Library;.\Security\BiSafe;.\Security\Koal;C:\Program Files\nodejs\;D:\soft\TortoiseGit\bin;C:\Program Files\MySQL\MySQL Utilities 1.6\;C:\Program Files (x86)\Git\cmd;C:\Program Files\Redis\;C:\Users\admin\AppData\Local\Android\Sdk\tools;C:\Users\admin\AppData\Local\Android\Sdk\platform-tools;C:\Users\admin\AppData\Local\Programs\Python\Python36-32;C:\Users\admin\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\admin\AppData\Local\Programs\Python\Python37\;C:\Users\admin\Downloads\apache-ant-1.10.5-bin\apache-ant-1.10.5\bin;C:\Users\admin\AppData\Local\Android\Sdk\tools;C:\Users\admin\AppData\Local\Android\Sdk\platform-tools;C:\Users\admin\Downloads\gradle-4.1\bin;C:\Users\admin\AppData\Roaming\npm;d:\soft\Microsoft VS Code\bin
USERNAME=admin
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 94 Stepping 3, GenuineIntel



---------------  S Y S T E M  ---------------

OS: Windows 7 , 64 bit Build 7601 (6.1.7601.23677)

CPU:total 4 (initial active 4) (4 cores per cpu, 1 threads per core) family 6 model 94 stepping 3, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, rtm, 3dnowpref, lzcnt, tsc, tscinvbit, bmi1, bmi2, adx

Memory: 4k page, physical 8339624k(2809372k free), swap 9361764k(6136k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (25.171-b11) for windows-amd64 JRE (1.8.0_171-b11), built on Mar 28 2018 16:06:12 by "java_re" with MS VC++ 10.0 (VS2010)

time: Fri Mar 06 11:48:10 2020
elapsed time: 7 seconds (0d 0h 0m 7s)

这个错误困扰了我一两个星期,一开始在网上找到了类似的问题,答案都是说电脑内存不够,加内存解决。但是我电脑虽然是8G内存,但是经常占用率才65%左右时,用idea跑junit就会报这个错,这时内存也才占用70%左右,看了下可用内存还有2G左右,按理说不可能不够呀。然后也调整过Idea本身占用内存的大小,调整过JVM的内存大小,结果都不管用。

没办法,只好仔细研究上面这一大段具体的报错信息,在这里面看有没有什么有用信息了。首先,这个里面说的

In 32 bit mode, the process size limit was hit

这句话可以无视了,因为我电脑是64位系统,java也是64位的,所以根本不可能因为32位的进程限制导致报错,这句一开始误导我很久。然后它里面说可能的解决方法,除了减少系统里内存加载外,有一条是减少java堆大小,也就是xms和xmx的值,这点我是没有想通的,一般来说都是增大这两个值,好吧,既然它里面说减小,那就试试呗。结果当然是不出所料的没用。还有一条看似可能会有效的是

Set larger code cache with -XX:ReservedCodeCacheSize=

这个在启动工程时vm参数里可以设置,但是设置了这个值后启动直接报错无法加载vm。无语。好吧,回归到报错的第一句,

The system is out of physical RAM or swap space

系统可能超出物理内存或交换空间,首先物理内存肯定没有超出,那么肯定就是交换空间超出了。什么是交换空间呢?交换空间,在Windows系统中是指虚拟内存。调整交换空间大小即设置虚拟内存大小。这样就清晰了,就是电脑的虚拟内存设的不够,于是点开我的电脑->属性->高级系统设置->高级->设置->高级里,看到虚拟内存设的大小才1G。这显然不够呀,把它调到10G后,问题完美解决!

现在内存就算占到75%时用idea跑junit也可以正常执行了!看来windows系统并不是当物理内存不够时才会用虚拟内存,这一点我一直想错了,我以为既然物理内存还够用,怎么可能会用虚拟内存。

ZPY

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: