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

Racy updates when releasing confined scopes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: repo-panama
    • Fix Version/s: None
    • Component/s: tools

      Description

      A confined scope, even if it can only be acquired by the same thread as the owner thread, can still be released by different threads. This can happen in two cases:

      1. the confined scope is acquired by another confined scope featuring implicit cleanup - in which case the cleaner thread will do the release

      2. the confined scope is acquired, in the same thread, by a shared scope. Since a shared scope can be closed by any other thread, it follows that release can also be done by any thread.

      In both cases, this can lead to a racy update of the lock count: there could be release vs. release races, but also acquire vs. release races too.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mcimadamore Maurizio Cimadamore
              Reporter:
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: