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

Timeouts can cause garbage retention in lock classes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 6
    • 5.0, 6
    • core-libs

    Backports

      Description

        Doug Lea writes:

        Classes built using AbstractQueuedSynchronizer and/or SynchronousQueue
        can retain garbage nodes when consumers repeatedly time out and there
        are never any producers/signals.

        Test code: get from jsr166 CVS:
           src/test/jtreg/util/concurrent/BlockingQueue/PollMemoryLeak.java

        (I don't know test harness syntax to ensure that it runs with
        little enough memory to trip error in finite time. You probably
        need to adjust this.)

        Fix: Check for lack of signals on cancellation and clear queues.
        See changes to AbstractQueuedSynchronizer and SynchronousQueue
        (the new AbstractQueuedLongSynchronizer also conforms.)


        ###@###.### 2005-03-04 04:15:39 GMT

        Attachments

          Issue Links

            Activity

              People

                martin Martin Buchholz
                martin Martin Buchholz
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: