JDK-8239449 : [TESTBUG] test/hotspot/jtreg/runtime/TLS/TestTLS.java: skip test if glibc too old for AdjustStackSizeForTLS
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2020-02-19
  • Updated: 2020-03-17
  • Resolved: 2020-02-24
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 15
15 b12Fixed
Related Reports
Relates :  
Relates :  
Description
On linux systems with older glibc versions, e.g. 2.11, the test test/hotspot/jtreg/runtime/TLS/TestTLS.java fails, because __pthread_get_minstack is not provided. The test should be skipped instead if glibc is too old.

TestTLS.java tests the effect of -XX:+AdjustStackSizeForTLS by putting a large int array into glibc TLS [1]. The implementation of AdjustStackSizeForTLS uses the glibc private function __pthread_get_minstack to calculate the TLS size. AdjustStackSizeForTLS has no effect if __pthread_get_minstack is missing [2]. Consequently the test fails because the process reaper thread [4] cannot be created as the stack size is too small to accomodate the large TLS.

[1] TestTLS puts large array in glibc TLS
    http://hg.openjdk.java.net/jdk/jdk/file/83949f956490/test/hotspot/jtreg/runtime/TLS/exestack-tls.c#l34

[2] No stack size adjustment if __pthread_get_minstack was not found in [3]
    http://hg.openjdk.java.net/jdk/jdk/file/83949f956490/src/hotspot/os/linux/os_linux.cpp#l833

[3] Lookup of __pthread_get_minstack
    http://hg.openjdk.java.net/jdk/jdk/file/83949f956490/src/hotspot/os/linux/os_linux.cpp#l821

[4] Process reaper cannot be created if stack size is not adjusted for TLS
    http://hg.openjdk.java.net/jdk/jdk/file/83949f956490/test/hotspot/jtreg/runtime/TLS/T.java#l37

Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/af80fedc56a2 User: rrich Date: 2020-02-24 13:37:21 +0000
24-02-2020

Review thread: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2020-February/038134.html
20-02-2020