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

[TESTBUG] test/hotspot/jtreg/runtime/TLS/TestTLS.java: skip test if glibc too old for AdjustStackSizeForTLS

    XMLWordPrintable

Details

    • b12
    • linux

    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

      Attachments

        Issue Links

          Activity

            People

              rrich Richard Reingruber
              rrich Richard Reingruber
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: