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

Metaspace::contains() should be threadsafe

    XMLWordPrintable

Details

    • b22

    Backports

      Description

        Metaspace::contains() is used in many places. It is not threadsafe since it walks the list of metaspace mappings, which can be altered concurrently. This is suspected to be the cause for JDK-8271124.

        This is a day zero bug of metaspace, in there since JDK 8. Weirdly enough it never surfaced until now.

        Currently, it does not lock, and adding a lock is not realistic either. It should work lockless. (See discussion in comment section of JDK-8271124).

        Attachments

          Issue Links

            Activity

              People

                stuefe Thomas Stuefe
                stuefe Thomas Stuefe
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: