Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8283337

Posix signal handler modification warning triggering incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 19
    • 19
    • hotspot
    • None
    • b17
    • linux

        The signal handler modification check is showing a signal handler change when there is none.

        jcmd PID VM.info and hs_err reports contain this info. e.g.

        $ jdk-19/bin/jcmd 17446 VM.info
        ...
        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: javaSignalHandler in libjvm.so, mask=11100100010111111101111111111110, 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
          *** Handler was modified!
          *** Expected: javaSignalHandler in libjvm.so, mask=11100100110111111111111111111110, flags=SA_RESTART|SA_SIGINFO
           SIGTRAP: SIG_DFL, mask=00000000000000000000000000000000, flags=none

        NOT in jdk-19-ea+6
        IS in jdk-19-ea+7 and later

        This is happending after:
        8279124: VM does not handle SIGQUIT during initialization

        In src/hotspot/os/posix/signals_posix.cpp

        PosixSignals::print_signal_handler() prints the "Handler was modified!" text.
        It checks if the saved expected action is non-null, not whether we have
        do_check_signal_periodically[sig] == true

        But although set_signal_handler has a parameter do_check, we always populate the SavedSignalHandlers vm_handlers even when this is false.

              kevinw Kevin Walls
              kevinw Kevin Walls
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: