[8u] RFR (XS) 8255734: VM should ignore SIGXFSZ on ppc64, s390 too

Aleksey Shipilev shade at redhat.com
Mon Apr 19 14:23:08 UTC 2021


Original bug:
   https://bugs.openjdk.java.net/browse/JDK-8255734
   https://github.com/openjdk/jdk/commit/54c88132

The patch does not apply cleanly to 8u, because s390x port is not available in 8u, and there is 
enough context changes (mostly due to JDK-8252324) to fail the automatic patch. 8u variant:

diff -r 7ab0ec535776 src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp
--- a/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp	Thu Oct 24 16:28:51 2019 +0200
+++ b/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp	Mon Apr 19 10:54:12 2021 +0200
@@ -178,7 +178,7 @@
    // avoid unnecessary crash when libjsig is not preloaded, try handle signals
    // that do not require siginfo/ucontext first.

-  if (sig == SIGPIPE) {
+  if (sig == SIGPIPE || sig == SIGXFSZ) {
      if (os::Aix::chained_handler(sig, info, ucVoid)) {
        return 1;
      } else {
diff -r 7ab0ec535776 src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp
--- a/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp	Thu Oct 24 16:28:51 2019 +0200
+++ b/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp	Mon Apr 19 10:54:12 2021 +0200
@@ -185,7 +185,7 @@
    // avoid unnecessary crash when libjsig is not preloaded, try handle signals
    // that do not require siginfo/ucontext first.

-  if (sig == SIGPIPE) {
+  if (sig == SIGPIPE || sig == SIGXFSZ) {
      if (os::Linux::chained_handler(sig, info, ucVoid)) {
        return true;
      } else {


Reproducer before patch:

$ build/linux-ppc64le-normal-server-fastdebug/images/j2sdk-image/bin/java Test
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGXFSZ (0x19) at pc=0x00003fff953a3348, pid=80212, tid=0x00003fff93b8f1b0
#
# JRE version: OpenJDK Runtime Environment (8.0) (build 
1.8.0-internal-fastdebug-shade_2021_04_13_10_40-b00)
# Java VM: OpenJDK 64-Bit Server VM (25.71-b00-fastdebug mixed mode linux-ppc64le compressed oops)
# Problematic frame:
# C  [libpthread.so.0+0x13348]  write+0x98

Reproducer after patch:

$ build/linux-ppc64le-normal-server-fastdebug/images/j2sdk-image/bin/java Test
java.io.IOException: File too large
	at java.io.FileOutputStream.writeBytes(Native Method)
	at java.io.FileOutputStream.write(FileOutputStream.java:313)
	at Test.main(Test.java:7)
Done

Testing: ppc64le build, reproducer from JDK-8255734

-- 
Thanks,
-Aleksey



More information about the jdk8u-dev mailing list