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

java/lang/management/MemoryMXBean/Pending.java fails with -limitmods

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd_major
    • Component/s: core-svc
    • Labels:

      Description

      The test jdk/test/java/lang/management/MemoryMXBean/Pending.java is making invalid assumptions about the occurrences of GC, the occurrences of finalization, and the set of objects that might be eligible for finalization.
      The incorrecteness of those assumptions can be seen when the test fails with the -limitmods option as described below.


      The test current fails when supplying the appropriate "-limitmods":
      jtreg ... -javaoptions:"-limitmods jdk.management" java/lang/management/MemoryMXBean/Pending.java
      but passes with no "-limitmods".

      Wrong counts are printed when running failing. With "-limitmods":
         Before creating object: Current finalized = 0 Current pending = 0
         Afer creating objects with no ref: Current finalized = 13 Current pending = 45
         Afer creating objects with ref: Current finalized = 436 Current pending = 97
      Without the "-limitmods"::
         Before creating object: Current finalized = 0 Current pending = 0
         Afer creating objects with no ref: Current finalized = 0 Current pending = 0
         Afer creating objects with ref: Current finalized = 0 Current pending = 0

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hb Harsha Wardhana B
                Reporter:
                shurailine Aleksandre Iline
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated: