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

java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 19
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Labels:

      Description

      Test passes fine with G1. But it fails with other GCs, for example Parallel, Shenandoah, etc:

      $ CONF=linux-x86_64-server-fastdebug make test TEST=java/io/ObjectStreamClass/ObjectStreamClassCaching.java TEST_VM_OPTS="-XX:+UseParallelGC"

      test ObjectStreamClassCaching.testCacheReleaseUnderMemoryPressure(): success
      test ObjectStreamClassCaching.testCachingEffectiveness(): failure
      java.lang.AssertionError: Cache lost entry although memory was not under pressure expected [false] but found [true]
      at org.testng.Assert.fail(Assert.java:99)
      at org.testng.Assert.failNotEquals(Assert.java:1037)
      at org.testng.Assert.assertFalse(Assert.java:67)

      This is probably because System.gc() request in the test is handled by different GCs differently.

      In fact, the test fails with G1 if we do a second System.gc() in this test. So the test itself is flaky. We should probably stop doing GCs altogether there.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shade Aleksey Shipilev
              Reporter:
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: