Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8130425 libjvm crash due to stack overflow in executables with 32k tbss/tdata
  3. JDK-8153057

Release Note: New property jdk.lang.processReaperUseDefaultStackSize

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Delivered
    • Icon: P4 P4
    • 9
    • 7u111, 8u102, 9
    • hotspot
    • Verified

        When a large TLS (Thread local storage) size is set for Threads, the JVM results in a stack overflow exception. The reason for this behavior is that the reaper thread was created with a low stack size of 32768k. When a large TLS size is set, it steals space from the threads stack, which eventually results in a stack overflow. This is a known glibc bug.
        To overcome this issue, we have introduced a workaround (jdk.lang.processReaperUseDefaultStackSize) in which the user can set the reaper threads stack size to a default instead of to 32768. This gives the reaper thread a bigger stack size, so for a large TLS size, such as 32k, the process will not fail.
        Users can set this flag in one of two ways:
        1. -Djdk.lang.processReaperUseDefaultStackSize=true
        2. System.setProperty("jdk.lang.processReaperUseDefaultStackSize", "true")

        The problem has been observed only when JVM is started from JNI code in which TLS is declared using "__thread"

              csahu Cheleswer Sahu (Inactive)
              mcastegr Mattis Castegren (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: