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

ThreadPoolExecutor methods leak interrupts when run in pool threads

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 7
    • 5.0u13, 7
    • core-libs
    • None
    • b17
    • generic, sparc
    • generic, solaris_10

    Backports

      Description

        The set of fixes to the ThreadPoolExecutor incorporated in JDK 7 build 08 have introduced a regression where the interruptions used to shut down idle threads can reach user code.

        This regression was discovered in the context of the Iris demonstration shown at this year's JavaOne, http://swinglabs.org/iris/ . It runs successfully with JDK 7 build 07 but not with build 08. To reproduce the problem, run Internet Explorer 6 or 7 on Windows (it appears that a plugin bug, being investigated separately, is currently causing it to fail to work on Firefox) and navigate to http://swinglabs.org/iris/ . Enter a Flickr account name such as "kenneth russell", "jasper potts", or "romainguy". When the photosets appear, click on one of the thumbnails in the leftmost column. When the bug is present, the thumbnails of the photos in the photoset will fail to load into the rightmost pane, instead producing an InterruptedException from Iris's LoadPhotosTask.

        Attached is the output of the Java Console from an instrumented JDK which calls Thread.dumpStack() inside Thread.interrupt(). It shows that the only calls to Thread.interrupt() are coming from ThreadPoolExecutor.setCorePoolSize(), but that the interrupted state is propagating out to and affecting user code, which should not happen and did not happen before JDK 7 build 08.

        Attachments

          Issue Links

            Activity

              People

                martin Martin Buchholz
                kbr Kenneth Russell (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: