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

randomDelay in DrainDeadlockT and LoggingDeadlock do not randomly delay

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b27
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      ADDITIONAL SYSTEM INFORMATION :
      This seems to have existed at least back to Java 9.

      A DESCRIPTION OF THE PROBLEM :
      https://hg.openjdk.java.net/jdk/jdk15/file/0dabbdfd97e6/test/jdk/java/util/logging/DrainFindDeadlockTest.java#l69
      https://hg.openjdk.java.net/jdk/jdk15/file/0dabbdfd97e6/test/jdk/java/util/logging/LoggingDeadlock.java#l62

      `int runs = (int) Math.random() * 1000000;` is always zero, so the subsequent loop always executes zero times.


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dfuchs Daniel Fuchs
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: