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

Race condition in EventQueue can causes some Events not to be processed right away

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: 7u10
    • Fix Version/s: 7-pool
    • Component/s: client-libs
    • Environment:

      We hit this issue during unit testing of JDeveloper in a headless environment.

      According to Ron this started happening in 7u10, but it appears to not be an issue in 7u7.

    • Subcomponent:
    • Introduced In Version:
    • CPU:
      generic
    • OS:
      linux

      Description

      Ron van Grinsven from JDeveloper and Artem Ananiev from the JDK has communicated about a race condition bug in the EventQueue which occasionally causes some Events to sit in the queue unprocessed causing some unit tests to fail.

      The problem reproduces with a specific sequence involving three threads.
      1) sun.awt.AWTAutoShutdown.theInstance.blockerThread
      2) a client thread posting an event using EventQueue.postEvent
      3) the current java.awt.EventQueue.dispatchThread (java.awt.EventQueue.dispatchThread)
      The problem occurs when the client thread posts the event after the shutdown thread posts its event to
      shutdown, and before the current dispatch threads completes its shutdown processing.

      See attached pdf file with detailed explanations.

        Attachments

          Activity

            People

            Assignee:
            alexp Alexander Potochkin (Inactive)
            Reporter:
            kbronkho Keimpe Bronkhorst
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: