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

ConcurrentHashMap$TreeBin: The writer thread may not wake up.

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      The writer thread may not wake up in concurrent read/write situations.

      Step 1: A reader thread first changes the lockState from 0 to 4.

      Step 2: Another writer thread fails to acquire the lock, set the waiter property to the current writer thread and prepare to suspend itself.

      Step 3: The reader releases the lock and wakes up the writer.

      Step 4: The writer suspends itself by calling LockSuppot.park(this).
      The writer thread can no longer be woken up.


      FREQUENCY : rarely


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: