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

Potential race condition in AbstractSelectableChannel

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • None
    • 7
    • core-libs
    • x86
    • linux

    Description

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      code inspection of the AbstractSelectableChannel class shows that a timing window exists between the channel close and cancellation of the key. Which can lead to following consequences
      1. Selector registered on this channel can select the key while the channel is closed or is being closed
      2. A new key can be added to the channel while the it is closed or is being closed
      3. configureBlocking() can be invoked while the channel is closed or is being closed

      One might be able to construct a testcase using a test-specific subclass of AbstractSelectableChannel, which has a synchronization point in its implementation of implCloseSelectableChannel() so that tests can be performed there. However, it would be quite an involved thing to write with clarity.


      REPRODUCIBILITY :
      This bug can be reproduced rarely.

      Attachments

        Issue Links

          Activity

            People

              alanb Alan Bateman
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: