!610 Enhance SIGBUS and rlimit information in errlog

From: @zhangyunbo7 
Reviewed-by: @kuenking111 
Signed-off-by: @kuenking111
This commit is contained in:
openeuler-ci-bot 2024-09-07 01:14:56 +00:00 committed by Gitee
commit 795e1b52cb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 73 additions and 1 deletions

View File

@ -0,0 +1,67 @@
Subject: [PATCH][Huawei] Enhance SIGBUS and rlimit information in errlog
---
hotspot/src/os/posix/vm/os_posix.cpp | 26 ++++++++++++++++++++++
hotspot/src/share/vm/utilities/vmError.cpp | 2 +-
2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/hotspot/src/os/posix/vm/os_posix.cpp b/hotspot/src/os/posix/vm/os_posix.cpp
index f7dab3c7f..a83ae1476 100644
--- a/hotspot/src/os/posix/vm/os_posix.cpp
+++ b/hotspot/src/os/posix/vm/os_posix.cpp
@@ -207,6 +207,26 @@ void os::Posix::print_rlimit_info(outputStream* st) {
if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
else st->print("%uk", rlim.rlim_cur >> 10);
+ st->print(", DATA ");
+ getrlimit(RLIMIT_DATA, &rlim);
+ if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
+ else st->print("%uk", rlim.rlim_cur >> 10);
+
+ st->print(", FSIZE ");
+ getrlimit(RLIMIT_FSIZE, &rlim);
+ if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
+ else st->print("%u", rlim.rlim_cur >> 10);
+
+ st->print(", CPU ");
+ getrlimit(RLIMIT_CPU, &rlim);
+ if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
+ else st->print("%uk seconds", rlim.rlim_cur >> 10);
+
+ st->print(", RSS ");
+ getrlimit(RLIMIT_RSS, &rlim);
+ if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
+ else st->print("%u", rlim.rlim_cur >> 10);
+
// Isn't there on solaris
#if !defined(TARGET_OS_FAMILY_solaris) && !defined(TARGET_OS_FAMILY_aix)
st->print(", NPROC ");
@@ -765,6 +785,12 @@ static bool get_signal_code_description(const siginfo_t* si, enum_sigcode_desc_t
{ SIGBUS, BUS_ADRALN, "BUS_ADRALN", "Invalid address alignment." },
{ SIGBUS, BUS_ADRERR, "BUS_ADRERR", "Nonexistent physical address." },
{ SIGBUS, BUS_OBJERR, "BUS_OBJERR", "Object-specific hardware error." },
+#ifdef BUS_MCEERR_AR
+ { SIGBUS, BUS_MCEERR_AR,"BUS_MCEERR_AR","hardware memory error consumed on a machine check: action required."},
+#endif
+#ifdef BUS_MCEERR_AO
+ { SIGBUS, BUS_MCEERR_AO,"BUS_MCEERR_AO","hardware memory error detected in process but not consumed: action optional."},
+#endif
{ SIGTRAP, TRAP_BRKPT, "TRAP_BRKPT", "Process breakpoint." },
{ SIGTRAP, TRAP_TRACE, "TRAP_TRACE", "Process trace trap." },
{ SIGCHLD, CLD_EXITED, "CLD_EXITED", "Child has exited." },
diff --git a/hotspot/src/share/vm/utilities/vmError.cpp b/hotspot/src/share/vm/utilities/vmError.cpp
index 0c5c955bf..3233e4b31 100644
--- a/hotspot/src/share/vm/utilities/vmError.cpp
+++ b/hotspot/src/share/vm/utilities/vmError.cpp
@@ -813,7 +813,7 @@ void VMError::report(outputStream* st) {
#if defined(AARCH64) || defined(X86)
STEP(207, "(printing file descriptor)" )
- if (ExtensiveErrorReports && _verbose) {
+ if (_verbose) {
// File Descriptor
os::print_file_descriptor(st);
st->cr();
--
2.19.1

View File

@ -945,7 +945,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{updatever}.%{buildver}
Release: 10
Release: 11
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a
@ -1349,6 +1349,7 @@ Patch445: Extending-the-IV-Length-Supported-by-KAEProvider-AES.patch
Patch446: 8137165-Tests-fail-in-SR_Handler-because-thread-is-n.patch
Patch447: heap-dump-redact-support.patch
Patch448: KAE-zip-support-streaming-data-decompression.patch
Patch449: Enhance-SIGBUS-and-rlimit-information-in-errlog.patch
#############################################
#
# Upstreamable patches
@ -2011,6 +2012,7 @@ pushd %{top_level_dir_name}
%patch446 -p1
%patch447 -p1
%patch448 -p1
%patch449 -p1
%endif
%ifarch loongarch64
@ -2676,6 +2678,9 @@ cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect
%endif
%changelog
* Fri Sep 6 2024 Benshuai5D <zhangyunbo7@huawei.com> -1:1.8.0.422-b05.11
- add Enhance-SIGBUS-and-rlimit-information-in-errlog.patch
* Wed Sep 4 2024 neu-mobi <liuyulong35@huawei.com> -1:1.8.0.422-b05.10
- Support KAE Zip
- rename Bisheng to BiSheng