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

Avoid applying Linux NPTL stack guard workaround for glibc 2.27+

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • tbd
    • 20
    • hotspot

      JDK-8169373 introduced code to work around Linux glibc NPTL pthread implementation bug about guard size prior to glibc 2.27. As [~simonis] mentioned, the glibc NPTL bug has been fixed in glibc 2.27 in https://sourceware.org/bugzilla/show_bug.cgi?id=22637.

      Now running a JDK with glibc 2.27+ leads to less usable stack space due to the workaround code. We have observed JVM crashes with internal tests due to their high usage of stack space and the workaround code. Ideally we should avoid applying the workaround code for glibc 2.27+.

      Several options are:
      - Automatically detect glibc version, then apply the workaround depending on glibc version. We have an internal patch that does this, but it adds code complexity and is perhaps a bit overkill.

      - Add a JVM flag so that users could disable the workaround if needed.

      - Do nothing for now, and remove the workaround code once OpenJDK stops supporting glibc prior to 2.27.

            Unassigned Unassigned
            manc Man Cao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: