JDK-8153057 : Release Note: New property jdk.lang.processReaperUseDefaultStackSize
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 7u111,8u102,9
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2016-03-30
  • Updated: 2022-06-14
  • Resolved: 2017-04-21
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 7 JDK 8 JDK 9
7u111Resolved 8u102Resolved 9Resolved
Description
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"

Comments
Added minor text edits in the description, from: When a large TLS (Thread local storage) size is set for Threads, JVM results in stack overflow exception. The reason behind this behavior is, reaper thread was created with low stack size 32768k. When a large TLS size is set, it steals the space from threads stack, which eventually results in stack overflow. This is a known glibc bug. To overcome this issue we introduce a workaround (jdk.lang.processReaperUseDefaultStackSize), using which the user can set the reaper threads stack size to default instead of 32768. This gives the reaper thread a bigger stack size, so for TLS size such as 32k the process will not fail. User can set this flag using 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 where TLS is declared using "__thread". To: 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".
16-05-2016