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

Deadlock with combined use of EDT and CountDownLatch

    XMLWordPrintable

Details

    • b102
    • 7
    • b112
    • x86
    • solaris

    Description

      PASSES: JDK 6RI, 6u12, 6u21 - Solaris/Windows
      PASSES: JDK7 b80, Solaris

      FAILS : at least JDK 7b106 - Solaris (and very rarely on Windows)

      Reproduced on JDK7 b106

      Thread dump is attached

      The following code reflects the code that causes the tests to fail
      Deadlock is usually reproduces on 4-60 iteration
      Was reproduced on zenit.russia.sun.com, Solaris i586
      ---------------------------------------------------------------------
      import javax.swing.*;
      import java.util.concurrent.CountDownLatch;
      import java.util.concurrent.TimeUnit;

      public class HangUp {

          public static void main(String[] args) throws Exception {

              for (int i = 0; i < 500; i++) {
                  System.err.println("iteration = " + i);
                  SwingUtilities.invokeAndWait(new Runnable() {
                      public void run() { /* does nothing */ }
                  });
                  new CountDownLatch(1).await(1, TimeUnit.SECONDS);
              }
          }
      }
      ---------------------------------------------------------------------

      Attachments

        Issue Links

          Activity

            People

              art Artem Ananiev (Inactive)
              dbessono Dmitry Bessonov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: