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

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 7-pool
    • 7u10
    • client-libs
    • 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.

    • generic
    • linux

      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.

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

              Created:
              Updated:
              Resolved: