代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/openjdk-1.8.0 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Date: Thu, 8 Jun 2023 20:49:01 +0800
Subject: [PATCH 30/59] add more specific possible reasons in hs_error log when OOM
---
hotspot/src/share/vm/utilities/vmError.cpp | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/hotspot/src/share/vm/utilities/vmError.cpp b/hotspot/src/share/vm/utilities/vmError.cpp
index 56ae50fe5..351c21200 100644
--- a/hotspot/src/share/vm/utilities/vmError.cpp
+++ b/hotspot/src/share/vm/utilities/vmError.cpp
@@ -312,6 +312,7 @@ void VMError::print_stack_trace(outputStream* st, JavaThread* jt,
static void print_oom_reasons(outputStream* st) {
st->print_cr("# Possible reasons:");
st->print_cr("# The system is out of physical RAM or swap space");
+ st->print_cr("# There are unreasonable system configurations which limit the available memory and the number of threads the process can create");
if (UseCompressedOops) {
st->print_cr("# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap");
}
@@ -322,6 +323,27 @@ static void print_oom_reasons(outputStream* st) {
st->print_cr("# Reduce memory load on the system");
st->print_cr("# Increase physical memory or swap space");
st->print_cr("# Check if swap backing store is full");
+ st->print_cr("# Check the memory info part of the hs_error log file to see if there is enough available memory");
+ st->print_cr("# Check the operating system log to confirm whether there is an OOM error message");
+#if defined(LINUX)
+ st->print_cr("# In linux, please use \"grep 'Out of memory' /var/log/messages\" or ");
+ st->print_cr("# \"dmesg | egrep -i 'killed process'\" to find the OOM error messages");
+#endif
+ st->print_cr("# Check the relevant operating system configurations associating with memory allocation");
+#if defined(LINUX)
+ st->print_cr("# In linux, please check the following configurations:");
+ st->print_cr("# 1) /proc/sys/vm/min_free_kbytes. This is used to force the Linux VM to keep a minimum number");
+ st->print_cr("# of kilobytes free. If a large value is set, it will leave little memory for JVM to use.");
+ st->print_cr("# 2) vm.overcommit_memory. If 2 is set, overcommit is prohibited and JVM may not get enough memory.");
+ st->print_cr("# 3) /proc/sys/vm/max_map_count. This file contains the maximum number of memory map areas a process may have.");
+ st->print_cr("# Memory map areas are used as a side-effect of calling malloc, directly by mmap, mprotect, and madvise,");
+ st->print_cr("# and also when loading shared libraries, so max_map_count should not be too small. Please compare the number of mappings");
+ st->print_cr("# in the dynamic libraries part of the hs_error log with this value to see if it is the cause of the OOM error.");
+ st->print_cr("# 4) configurations in limits.conf. Please check data, rss and as which limit the maximum memory size JVM can use");
+ st->print_cr("# and nproc which influences the maximum number of threads JVM can create.");
+ st->print_cr("# 5) Other configurations that may cause a thread creation failure. Please check /proc/sys/kernel/threads-max,");
+ st->print_cr("# /proc/sys/kernel/pid_max and TasksMax in systemd service file and make sure they are not too small.");
+#endif
if (LogBytesPerWord == 2) {
st->print_cr("# Use 64 bit Java on a 64 bit OS");
}
--
2.22.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。