栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

OpenJDK 64-Bit Server VM warning: INFO: os::commit

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

OpenJDK 64-Bit Server VM warning: INFO: os::commit

背景

早上在用IDEA构建项目的时候,爆出了以下问题。

OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x000001faf3e50000, 65536, 0) failed; error='页面文件太小,无法完成操作。' (DOS error/errno=1455)
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 65536 bytes for Failed to commit area from 0x000001faf3e50000 to 0x000001faf3e60000 of length 65536.
# An error report file with more information is saved as:
# E:projecths_err_pid31108.log

错误信息

根据提示,直接找到对应的错误日志。

错误日志主要内容如下:


---------------  S U M M A R Y ------------

Command Line: -Dmaven.multiModuleProjectDirectory=E:projecths-mallcodeservicechuangyue-mall -Dmaven.home=D:Program Filesapache-maven-3.8.1 -Dclassworlds.conf=D:Program Filesapache-maven-3.8.1binm2.conf -Dmaven.ext.class.path=D:Program FilesJetBrainsIntelliJ IDEA 2021.3.2pluginsmavenlibmaven-event-listener.jar -javaagent:D:Program FilesJetBrainsIntelliJ IDEA 2021.3.2libidea_rt.jar=61563:D:Program FilesJetBrainsIntelliJ IDEA 2021.3.2bin -Dfile.encoding=UTF-8 org.codehaus.classworlds.Launcher -Didea.version=2021.3.2 -s D:Program Filesapache-maven-3.8.1confsettings.xml -Dmaven.repo.local=E:repo clean install -P dev

Host: Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz, 16 cores, 31G,  Windows 10 , 64 bit Build 19041 (10.0.19041.1566)
Time: Mon May 30 10:42:27 2022 中国标准时间 elapsed time: 46.413183 seconds (0d 0h 0m 46s)

---------------  T H R E A D  ---------------

Current thread (0x0000011769c96000):  JavaThread "C2 CompilerThread3" daemon [_thread_in_native, id=14764, stack(0x0000000d71700000,0x0000000d71800000)]


Current CompileTask:
C2:  46413 16870   !   4       lombok.javac.JavacAST::drill (146 bytes)

Stack: [0x0000000d71700000,0x0000000d71800000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x5f7e5a]
V  [jvm.dll+0x77ff2e]
V  [jvm.dll+0x7815ff]
V  [jvm.dll+0x781cc3]
V  [jvm.dll+0x247408]
...


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

Threads class SMR info:
 ...

Events (20 events):
Event: 45.849 loading class lombok/launch/Main
Event: 45.849 loading class lombok/launch/Main done
Event: 45.849 loading class lombok/launch/ShadowClassLoader
Event: 45.849 loading class lombok/launch/ShadowClassLoader done
Event: 45.920 loading class lombok/launch/AnnotationProcessorHider$AstModificationNotifierData
Event: 45.920 loading class lombok/launch/AnnotationProcessorHider$AstModificationNotifierData done
...


Dynamic libraries:
0x00007ff6cf5f0000 - 0x00007ff6cf5fd000 	D:Program FilesJDKjdk11binjava.exe
0x00007ffb1caf0000 - 0x00007ffb1cce5000 	C:WindowsSYSTEM32ntdll.dll
...

dbghelp: loaded successfully - version: 4.0.5 - missing functions: none
symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;D:Program FilesJDKjdk11bin;C:WindowsSYSTEM32;C:WindowsWinSxSamd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e;D:Program FilesJDKjdk11binserver;D:Program FilesJetBrainsIntelliJ IDEA 2021.3.2bin;C:UsersAdminAppDataLocalTemp

VM Arguments:
jvm_args: -Dmaven.multiModuleProjectDirectory=E:projecths-mallcodeservicechuangyue-mall -Dmaven.home=D:Program Filesapache-maven-3.8.1 -Dclassworlds.conf=D:Program Filesapache-maven-3.8.1binm2.conf ...

[Global flags]
     intx CICompilerCount                          = 12                                        {product} {ergonomic}
     uint ConcGCThreads                            = 3                                         {product} {ergonomic}
     uint G1ConcRefinementThreads                  = 13                                        {product} {ergonomic}
   size_t G1HeapRegionSize                         = 2097152                                   {product} {ergonomic}
    uintx GCDrainStackTargetSize                   = 64                                        {product} {ergonomic}
   size_t InitialHeapSize                          = 536870912                                 {product} {ergonomic}
   size_t MarkStackSize                            = 4194304                                   {product} {ergonomic}
...

Logging:
Log output configuration:
 #0: stdout all=warning uptime,level,tags
 #1: stderr all=off uptime,level,tags

Environment Variables:
略


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

OS: Windows 10 , 64 bit Build 19041 (10.0.19041.1566)
OS uptime: 7 days 0:10 hours

CPU:total 16 (initial active 16) (8 cores per cpu, 2 threads per core) family 6 model 165 stepping 5 microcode 0xc8, 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, fma

Memory: 4k page, system-wide physical 32701M (7169M free)
TotalPageFile size 68058M (AvailPageFile size 5M)
current process WorkingSet (physical memory assigned to process): 3380M, peak: 3380M
current process commit charge ("private bytes"): 3816M, peak: 3816M

vm_info: OpenJDK 64-Bit Server VM (11.0.11+9) for windows-amd64 JRE (11.0.11+9), built on Apr 20 2021 21:22:09 by "" with MS VC++ 15.9 (VS2017)

END.

根据log的内容分析,应该是内存撑不住,爆了。

我看了下我的操作,我发现因为我允许多项目启动。同时启动了多个服务和调试。

中间还有个XXL-job服务。我也是醉了。

所以导致项目内存不够了。

 

解决方案

那么很简单,直接把所有的项目stop掉,然后重新构建就可以了。

其实IDEA自带了Profiler窗口,你可以直接查看这个窗口就知道哪个占用了内存了。

总结

问题都会有的,关键是要稳住,不要慌,错误日志越多,定位问题就越简单。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/936537.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号