JDK-8256594 : Unexpected warning: SIGSEGV handler flags expected:SA_RESTART|SA_SIGINFO found:SA_RESTART|SA_SIGINFO
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2020-11-19
  • Updated: 2020-11-26
  • Resolved: 2020-11-20
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 16
16 b26Fixed
Related Reports
Relates :  
Description
After JDK-8253742: "POSIX signal code cleanup" we are seeing unexpected warnings generated by the VM for all the key signals e.g.

Warning: SIGSEGV handler flags expected:SA_RESTART|SA_SIGINFO found:SA_RESTART|SA_SIGINFO

Note that what was expected and what was found appear to be the same at this level, but that is likely an artifact of how we print human readable strings for the flags.

The only change I can see that relates to the flags is the removal of the SIGNIFICANT_SIGNAL_MASK.
Comments
Changeset: fa240f22 Author: David Holmes <dholmes@openjdk.org> Date: 2020-11-20 04:17:27 +0000 URL: https://github.com/openjdk/jdk/commit/fa240f22
20-11-2020

Bug is triggered by using -Xcheck:jni
19-11-2020

I augmented the flag printing routine so we now see: Warning: SIGUSR2 handler flags expected:SA_RESTART|SA_SIGINFO found:SA_RESTART|SA_SIGINFO|Unknown_flags:4000000
19-11-2020

This is actually the SA_RESTORER flag: https://www.man7.org/linux/man-pages/man2/sigaction.2.html SA_RESTORER Not intended for application use. This flag is used by C li��� braries to indicate that the sa_restorer field contains the address of a "signal trampoline". See sigreturn(2) for more details.
19-11-2020

We need to restore the masking out of the bit referenced by SIGNIFICANT_SIGNAL_MASK.
19-11-2020