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

Unmask SIGQUIT in a child process

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 20
    • 8, 13
    • core-libs
    • None
    • b17
    • x86
    • linux

    Description

      Java blocks SIGQUIT for all JavaThreads. The mask of blocked signals is inherited to the child processes. The ProcessBuilder.start executes the posix_spawn syscall in Java thread so the SIGQUIT is blocked in a child process.
      This can be easily seen by cat /proc/<child_pid>/status.
      SigPnd: 0000000000000000
      ShdPnd: 0000000000000000
      SigBlk: 0000000000000004
      SigIgn: 0000000000001000
      SigCgt: 2000000180000604

      The SigBlk: 0000000000000004 is a bitmask 0b100 the signal 3 (SIGQUIT) is blocked.

      The JDK code blocking the signals for JavaThread and unblocking them for VMThread is here: https://hg.openjdk.java.net/jdk8u/jdk8u-dev/hotspot/file/9148fcba5de9/src/os/bsd/vm/os_bsd.cpp#l655

      The workarund it to run the Java application starting the subprocess with -XX:+ReduceSignalUsage.

      Attachments

        Issue Links

          Activity

            People

              rriggs Roger Riggs
              tzezula Tomáš Zezula
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: