今天Idea授权码到期了,想着先用eclipse撑两天。结果打开直接闪退了。
直接上日志
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 1391216 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=23716, tid=19972
#
# JRE version: Java(TM) SE Runtime Environment (8.0_74-b02) (build 1.8.0_74-b02)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.74-b02 mixed mode windows-amd64 compressed oops)
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
--------------- T H R E A D ---------------
Current thread (0x0000000022236800): JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=19972, stack(0x00000000232f0000,0x00000000233f0000)]
Stack: [0x00000000232f0000,0x00000000233f0000]
[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: 61629 12232 4 org.eclipse.jdt.internal.core.JarPackageFragmentRoot::initRawPackageInfo (349 bytes)
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x000000000ac29000 JavaThread "org.eclipse.jdt.internal.ui.text.JavaReconciler" daemon [_thread_in_native_trans, id=15732, stack(0x00000000015e0000,0x00000000016e0000)]
0x000000000ac24000 JavaThread "ForkJoinPool.commonPool-worker-1" daemon [_thread_blocked, id=12616, stack(0x0000000030f70000,0x0000000031070000)]
0x000000000ac1b000 JavaThread "Java indexing" daemon [_thread_blocked, id=22492, stack(0x000000002e950000,0x000000002ea50000)]
0x0000000024b9b000 JavaThread "Bundle File Closer" daemon [_thread_blocked, id=23360, stack(0x000000002c8a0000,0x000000002c9a0000)]
0x0000000024b9d800 JavaThread "AWT-Windows" daemon [_thread_in_native, id=22408, stack(0x000000002b640000,0x000000002b740000)]
0x0000000024b99000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=24040, stack(0x0000000028ff0000,0x00000000290f0000)]
0x0000000024b9c800 JavaThread "Gogo shell" [_thread_blocked, id=12520, stack(0x0000000027ce0000,0x0000000027de0000)]
0x0000000024b9c000 JavaThread "EMF Reference Cleaner" daemon [_thread_blocked, id=5408, stack(0x0000000026910000,0x0000000026a10000)]
0x0000000024b96800 JavaThread "Worker-1" [_thread_blocked, id=21044, stack(0x0000000026610000,0x0000000026710000)]
0x0000000024b98000 JavaThread "Worker-0" [_thread_blocked, id=3788, stack(0x0000000026510000,0x0000000026610000)]
0x0000000024b9a800 JavaThread "Worker-JM" [_thread_blocked, id=22244, stack(0x0000000026210000,0x0000000026310000)]
0x0000000024224800 JavaThread "SCR Component Actor" daemon [_thread_blocked, id=22724, stack(0x0000000025e10000,0x0000000025f10000)]
0x0000000024aac800 JavaThread "Start Level: Equinox Container: 1cadd026-7580-4587-b949-7f443f34af44" daemon [_thread_blocked, id=9116, stack(0x0000000025d10000,0x0000000025e10000)]
0x0000000024aac000 JavaThread "Framework Event Dispatcher: Equinox Container: 1cadd026-7580-4587-b949-7f443f34af44" daemon [_thread_blocked, id=20972, stack(0x0000000006240000,0x0000000006340000)]
0x000000002496f000 JavaThread "Active Thread: Equinox Container: 1cadd026-7580-4587-b949-7f443f34af44" [_thread_blocked, id=15384, stack(0x0000000009c90000,0x0000000009d90000)]
0x0000000022206000 JavaThread "Service Thread" daemon [_thread_blocked, id=21348, stack(0x0000000023df0000,0x0000000023ef0000)]
0x000000002219c000 JavaThread "C1 CompilerThread3" daemon [_thread_blocked, id=17844, stack(0x00000000234f0000,0x00000000235f0000)]
0x000000002219b800 JavaThread "C2 CompilerThread2" daemon [_thread_in_native, id=23416, stack(0x00000000233f0000,0x00000000234f0000)]
=>0x0000000022236800 JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=19972, stack(0x00000000232f0000,0x00000000233f0000)]
0x0000000022199000 JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=24432, stack(0x00000000231f0000,0x00000000232f0000)]
0x0000000022152800 JavaThread "Attach Listener" daemon [_thread_blocked, id=18112, stack(0x00000000230f0000,0x00000000231f0000)]
0x0000000022151800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=24428, stack(0x0000000022ff0000,0x00000000230f0000)]
0x0000000022151000 JavaThread "Surrogate Locker Thread (Concurrent GC)" daemon [_thread_blocked, id=13676, stack(0x0000000022ef0000,0x0000000022ff0000)]
0x00000000220d5000 JavaThread "Finalizer" daemon [_thread_blocked, id=24376, stack(0x0000000022df0000,0x0000000022ef0000)]
0x00000000220cf000 JavaThread "Reference Handler" daemon [_thread_blocked, id=24060, stack(0x0000000022cf0000,0x0000000022df0000)]
0x000000000931e000 JavaThread "main" [_thread_in_native, id=20592, stack(0x0000000001200000,0x0000000001300000)]
Other Threads:
0x00000000220a3800 VMThread [stack: 0x0000000022bf0000,0x0000000022cf0000] [id=20728]
0x000000002222c800 WatcherThread [stack: 0x0000000023ef0000,0x0000000023ff0000] [id=13656]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap:
garbage-first heap total 262144K, used 220775K [0x00000000d0000000, 0x00000000d0100800, 0x0000000100000000)
region size 1024K, 84 young (86016K), 2 survivors (2048K)
Metaspace used 97835K, capacity 108422K, committed 108492K, reserved 1142784K
class space used 11815K, capacity 14757K, committed 14796K, reserved 1048576K
CodeCache: size=245760Kb used=36523Kb max_used=36561Kb free=209236Kb
bounds [0x0000000010470000, 0x0000000012860000, 0x000000001f470000]
total_blobs=10493 nmethods=9518 adapters=883
compilation: enabled
Compilation events (10 events):
Event: 61.604 Thread 0x000000002219c000 12240 3 org.eclipse.jdt.internal.compiler.util.Util::isClassFileName (82 bytes)
Event: 61.604 Thread 0x000000002219c000 nmethod 12240 0x0000000011046d10 code [0x0000000011046ec0, 0x0000000011047568]
Event: 61.604 Thread 0x000000002219c000 12239 ! 3 org.eclipse.jdt.internal.core.JavaModelManager::getArchiveValidity (77 bytes)
Event: 61.605 Thread 0x000000002219c000 nmethod 12239 0x0000000011046090 code [0x0000000011046260, 0x0000000011046998]
Event: 61.606 Thread 0x000000002219c000 12241 3 org.eclipse.jdt.internal.compiler.util.Util::getInputStreamAsByteArray (138 bytes)
Event: 61.606 Thread 0x000000002219c000 nmethod 12241 0x000000001186cf90 code [0x000000001186d180, 0x000000001186dc88]
Event: 61.617 Thread 0x000000002219c000 12244 3 org.eclipse.jdt.internal.core.util.HashSetOfArray::<init> (41 bytes)
Event: 61.617 Thread 0x000000002219c000 nmethod 12244 0x000000001186ca10 code [0x000000001186cba0, 0x000000001186ceb0]
Event: 61.617 Thread 0x0000000022199000 nmethod 12233 0x0000000011872150 code [0x0000000011872420, 0x00000000118740b8]
Event: 61.617 Thread 0x0000000022199000 12243 4 org.eclipse.jdt.internal.compiler.util.Util::isClassFileName (82 bytes)
GC Heap History (10 events):
Event: 58.964 GC heap before
{Heap before GC invocations=35 (full 0):
garbage-first heap total 262144K, used 223104K [0x00000000d0000000, 0x00000000d0100800, 0x0000000100000000)
region size 1024K, 112 young (114688K), 12 survivors (12288K)
Metaspace used 88782K, capacity 98648K, committed 98764K, reserved 1134592K
class space used 10648K, capacity 13468K, committed 13516K, reserved 1048576K
Event: 58.979 GC heap after
Heap after GC invocations=36 (full 0):
garbage-first heap total 262144K, used 124869K [0x00000000d0000000, 0x00000000d0100800, 0x0000000100000000)
region size 1024K, 14 young (14336K), 14 survivors (14336K)
Metaspace used 88782K, capacity 98648K, committed 98764K, reserved 1134592K
class space used 10648K, capacity 13468K, committed 13516K, reserved 1048576K
}
Event: 59.690 GC heap before
{Heap before GC invocations=36 (full 0):
garbage-first heap total 262144K, used 221509K [0x00000000d0000000, 0x00000000d0100800, 0x0000000100000000)
region size 1024K, 107 young (109568K), 14 survivors (14336K)
Metaspace used 91463K, capacity 101532K, committed 101708K, reserved 1136640K
class space used 10985K, capacity 13890K, committed 13900K, reserved 1048576K
Event: 59.706 GC heap after
Heap after GC invocations=37 (full 0):
garbage-first heap total 262144K, used 136536K [0x00000000d0000000, 0x00000000d0100800, 0x0000000100000000)
region size 1024K, 14 young (14336K), 14 survivors (14336K)
Metaspace used 91463K, capacity 101532K, committed 101708K, reserved 1136640K
class space used 10985K, capacity 13890K, committed 13900K, reserved 1048576K
}
Event: 60.216 GC heap before
{Heap before GC invocations=37 (full 0):
garbage-first heap total 262144K, used 219480K [0x00000000d0000000, 0x00000000d0100800, 0x0000000100000000)
region size 1024K, 95 young (97280K), 14 survivors (14336K)
Metaspace used 94659K, capacity 104876K, committed 105036K, reserved 1140736K
class space used 11436K, capacity 14316K, committed 14412K, reserved 1048576K
Event: 60.232 GC heap after
Heap after GC invocations=38 (full 0):
garbage-first heap total 262144K, used 146749K [0x00000000d0000000, 0x00000000d0100800, 0x0000000100000000)
region size 1024K, 8 young (8192K), 8 survivors (8192K)
Metaspace used 94659K, capacity 104876K, committed 105036K, reserved 1140736K
class space used 11436K, capacity 14316K, committed 14412K, reserved 1048576K
}
Event: 60.849 GC heap before
{Heap before GC invocations=39 (full 0):
garbage-first heap total 262144K, used 221117K [0x00000000d0000000, 0x00000000d0100800, 0x0000000100000000)
region size 1024K, 85 young (87040K), 8 survivors (8192K)
Metaspace used 96904K, capacity 107416K, committed 107596K, reserved 1142784K
class space used 11686K, capacity 14596K, committed 14668K, reserved 1048576K
Event: 60.856 GC heap after
Heap after GC invocations=40 (full 0):
garbage-first heap total 262144K, used 141697K [0x00000000d0000000, 0x00000000d0100800, 0x0000000100000000)
region size 1024K, 7 young (7168K), 7 survivors (7168K)
Metaspace used 96904K, capacity 107416K, committed 107596K, reserved 1142784K
class space used 11686K, capacity 14596K, committed 14668K, reserved 1048576K
}
Event: 60.901 GC heap before
{Heap before GC invocations=40 (full 0):
garbage-first heap total 262144K, used 146817K [0x00000000d0000000, 0x00000000d0100800, 0x0000000100000000)
region size 1024K, 12 young (12288K), 7 survivors (7168K)
Metaspace used 97159K, capacity 107680K, committed 107852K, reserved 1142784K
class space used 11707K, capacity 14598K, committed 14668K, reserved 1048576K
Event: 60.914 GC heap after
Heap after GC invocations=41 (full 0):
garbage-first heap total 262144K, used 137831K [0x00000000d0000000, 0x00000000d0100800, 0x0000000100000000)
region size 1024K, 2 young (2048K), 2 survivors (2048K)
Metaspace used 97159K, capacity 107680K, committed 107852K, reserved 1142784K
class space used 11707K, capacity 14598K, committed 14668K, reserved 1048576K
}
VM Arguments:
jvm_args: -XX: DisableExplicitGC -Xbootclasspath/a:lombok.jar -javaagent:D:\eclipse\lombok.jar -Djava.net.preferIPv4Stack=true -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2 -Dosgi.requiredJavaVersion=1.8 -Dosgi.instance.area.default=@user.home/eclipse-workspace -XX: UseG1GC -XX: UseStringDeduplication -Dosgi.requiredJavaVersion=1.8 -Dosgi.dataAreaRequiresExplicitInit=true -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Xms256m -Xmx768m
java_command: Eclipse
java_class_path (initial): D:\eclipse\\plugins/org.eclipse.equinox.launcher_1.5.500.v20190715-1310.jar;D:\eclipse\lombok.jar
Launcher Type: generic
Environment Variables:
PATH=C:/Program Files/Java/jre1.8.0_74/bin/server;C:/Program Files/Java/jre1.8.0_74/bin;C:/Program Files/Java/jre1.8.0_74/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Java\jdk-11.0.16.1\bin;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;D:\apache-maven-3.8.1\bin;D:\mysql-8.0.28-winx64\bin;D:\Program Files (x86)\Git\cmd;D:\nvm;D:\nodejs;C:\Program Files\qemu;D:\neo4j-community-4.4.17\bin;D:\Program Files\java\bin;C:\Windows\System32;C:\Users\lenovo\AppData\Local\Microsoft\WindowsApps;D:\nvm;D:\nodejs;C:\Users\lenovo\AppData\Local\Pandoc\;;D:\eclipse;
USERNAME=lenovo
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 126 Stepping 5, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 10.0 , 64 bit Build 22000 (10.0.22000.1335)
CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 126 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx
Memory: 4k page, physical 16514296k(6672340k free), swap 20610296k(8636k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (25.74-b02) for windows-amd64 JRE (1.8.0_74-b02), built on Jan 29 2016 17:42:36 by "java_re" with MS VC 10.0 (VS2010)
time: Wed Feb 22 14:01:35 2023
elapsed time: 61 seconds (0d 0h 1m 1s)
很是奇怪, -Xmx设置的是768m,系统还有6G左右的空闲内存。应该不会存在内存不足的问题。根据日志提示的“Possible solutions”都没能解决问题。知道看到最后SYSTEM这段信息提示了swap交换分区只有大约8M了,初步判断是这里的问题。
Windows操作系统的swap就是虚拟内存,于是我抱着试试的心态去调整下虚拟内存。
我的是win11c操作系统,操作步骤如下:
1、进入“设置”,选择“系统”分类,再选型“系统信息”。
2、点击“高级系统设置”。
3、在弹出的界面选择“高级”选项,点击性能分组的“设置”。