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

Timed wait Object#wait(long) is broken from JDK10 (18.3 ) - b21 (os specific)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 10
    • hotspot
    • b21
    • linux_ubuntu

      Object#wait(long) is broken, when it is called from main thread with an enormous value , then thread is not hung instead return immediately.

      Please run the below code in jshell

      Object obj = new Object();
              synchronized (obj){
                  try {
                      obj.wait(Long.MAX_VALUE);
                      System.out.println("TIMED WAIT IS BROKEN");
                  } catch (InterruptedException e) {
                      e.printStackTrace();
                  }
              }

      You will receive
      TIMED WAIT IS BROKEN

       (tested in linux ubuntu )

      JCK tests fails in solaris as well.

            Unassigned Unassigned
            bnallakaluva Bharath Nallakaluva (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: