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

NonblockingQueue::try_pop may improperly indicate queue is empty

XMLWordPrintable

    • gc
    • b08

      If there are concurrent calls to NonblockingQueue::try_pop, it is possible for contention between them to result in some of them incorrectly indicating the queue is empty, when it actually is not.

      If a try_pop finds a head object whose next value is null, the current code assumes that means it lost the race with the 3rd clause (which claimed the last entry), so the list is now effectively empty. But it could have instead lost the race with the second clause, and we don't know whether the queue now has any entries.

            kbarrett Kim Barrett
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: