JDK-8279878 : java/awt/font/JNICheck/JNICheck.sh test fails on Ubuntu 21.10
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 17,18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux_ubuntu
  • CPU: x86
  • Submitted: 2022-01-11
  • Updated: 2024-06-25
  • Resolved: 2022-02-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17 JDK 19
17.0.13Fixed 19 b09Fixed
Related Reports
Relates :  
Description
java/awt/font/JNICheck/JNICheck.sh test fails on Ubuntu 21.10 with following error in the log.txt file

cat ./JTwork/classes/java/awt/font/JNICheck/JNICheck.d/log.txt
  *** Handler was modified!
Consider using jsig library.

Tested on following Ubuntu
cat /etc/os-release 
----------------------------------------------
PRETTY_NAME="Ubuntu 21.10"
NAME="Ubuntu"
VERSION_ID="21.10"
VERSION="21.10 (Impish Indri)"
VERSION_CODENAME=impish
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=impish
----------------------------------------------
Comments
Fix request (17u) Clean backport. Update of the test. Review 17u-dev: https://git.openjdk.org/jdk17u-dev/pull/2626
23-06-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/2626 Date: 2024-06-23 03:51:04 +0000
23-06-2024

Somewhat after the fact but I did just read this https://docs.gtk.org/gtk3/func.init.html Since 2.18, GTK+ calls signal (SIGPIPE, SIG_IGN) during initialization, to ignore SIGPIPE signals, since these are almost never wanted in graphical applications. If you do need to handle SIGPIPE for some reason, reset the handler after gtk_init(), but notice that other libraries (e.g. libdbus or gvfs) might do similar things.
25-07-2022

Changeset: 2f48a3f0 Author: Phil Race <prr@openjdk.org> Date: 2022-02-06 21:13:17 +0000 URL: https://git.openjdk.java.net/jdk/commit/2f48a3f032dcfe159a7ab4a3d0afd0a0760d0a04
06-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7091 Date: 2022-01-14 19:09:53 +0000
14-01-2022

The test already tries to exclude any warnings from signal issues from causing a failure -Xcheck:jni JNICheck | grep -v SIG | grep -v Signal | grep -v CallStatic Seems like we just need to add these new strings to that exclude list. Note that there is an open bug against the networking libraries causing these https://bugs.openjdk.java.net/browse/JDK-8131136 But this one may be from some dependent library of GTK ? The full set of messages is :- ===== java -Djdk.gtk.verbose=true -Xcheck:jni JNICheck Looking for GTK3 library... Warning: SIGPIPE handler modified! Signal Handlers: SIGSEGV: javaSignalHandler in libjvm.so, mask=11100100010111111101111111111110, flags=SA_RESTART|SA_SIGINFO SIGBUS: javaSignalHandler in libjvm.so, mask=11100100010111111101111111111110, flags=SA_RESTART|SA_SIGINFO SIGFPE: javaSignalHandler in libjvm.so, mask=11100100010111111101111111111110, flags=SA_RESTART|SA_SIGINFO SIGPIPE: SIG_IGN, mask=00000000000010000000000000000000, flags=SA_RESTART *** Handler was modified! *** Expected: javaSignalHandler in libjvm.so, mask=11100100110111111111111111111110, flags=SA_RESTART|SA_SIGINFO SIGXFSZ: javaSignalHandler in libjvm.so, mask=11100100010111111101111111111110, flags=SA_RESTART|SA_SIGINFO SIGILL: javaSignalHandler in libjvm.so, mask=11100100010111111101111111111110, flags=SA_RESTART|SA_SIGINFO SIGUSR2: SR_handler in libjvm.so, mask=00000000000000000000000000000000, flags=SA_RESTART|SA_SIGINFO SIGHUP: UserHandler in libjvm.so, mask=11100100010111111101111111111110, flags=SA_RESTART|SA_SIGINFO SIGINT: UserHandler in libjvm.so, mask=11100100010111111101111111111110, flags=SA_RESTART|SA_SIGINFO SIGTERM: UserHandler in libjvm.so, mask=11100100010111111101111111111110, flags=SA_RESTART|SA_SIGINFO SIGQUIT: UserHandler in libjvm.so, mask=11100100010111111101111111111110, flags=SA_RESTART|SA_SIGINFO SIGTRAP: SIG_DFL, mask=00000000000000000000000000000000, flags=none Consider using jsig library. GTK3 library loaded. =====
13-01-2022

I don't think this has anything to do with what this test is testing. Looks like on 21.10 something (not in the JDK) is modifying the VMs signal handlers, and when you specify -Xcheck:jni then the VM warns. The source could be any platform library that we load. Not sure it is fixable.
11-01-2022