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

CleanerTest fails: Cleanable should have been freed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b100

      Description

      [TestNG] Running:
        java/lang/ref/CleanerTest.java

      Case: java.lang.ref.PhantomReference, expect: EV_CLEAN, events: [EV_UNREF], throwEx: false
       Cleanable[0] cleaned in cycle: 4
       All cleanups done in cycle: 4, total: 1
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.PhantomReference, expect: EV_CLEAN, events: [EV_CLEAN], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 2
       All cleanups done in cycle: 2, total: 1
      Case: java.lang.ref.PhantomReference, expect: EV_CLEAN, events: [EV_CLEAN, EV_UNREF], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 3
       All cleanups done in cycle: 3, total: 1
      Case: java.lang.ref.PhantomReference, expect: EV_CLEAN, events: [EV_UNREF, EV_CLEAN], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 7
       All cleanups done in cycle: 7, total: 1
       Cleanable[0] cleaned in cycle: 1
       All cleanups done in cycle: 1, total: 1
      test CleanerTest.testCleanableActions(): success
      test CleanerTest.testCleanerTermination(): success
      Case: java.lang.ref.PhantomReference, expect: EV_CLEAN, events: [EV_UNREF], throwEx: false
       Cleanable[0] cleaned in cycle: 17
       All cleanups done in cycle: 17, total: 1
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.WeakReference, expect: EV_CLEAN, events: [EV_UNREF], throwEx: false
       Cleanable[0] cleaned in cycle: 6
       All cleanups done in cycle: 6, total: 1
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.SoftReference, expect: EV_CLEAN, events: [EV_UNREF], throwEx: false
       Cleanable[0] cleaned in cycle: 9
       All cleanups done in cycle: 9, total: 1
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.PhantomReference, expect: EV_CLEAN, events: [EV_CLEAN], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 2
       All cleanups done in cycle: 2, total: 1
      Case: java.lang.ref.WeakReference, expect: EV_CLEAN, events: [EV_CLEAN], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 2
       All cleanups done in cycle: 2, total: 1
      Case: java.lang.ref.SoftReference, expect: EV_CLEAN, events: [EV_CLEAN], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 2
       All cleanups done in cycle: 2, total: 1
      Case: java.lang.ref.PhantomReference, expect: EV_CLEAR, events: [EV_CLEAR], throwEx: false
       Cleanable[0] not cleaned
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.WeakReference, expect: EV_CLEAR, events: [EV_CLEAR], throwEx: false
       Cleanable[0] not cleaned
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.SoftReference, expect: EV_CLEAR, events: [EV_CLEAR], throwEx: false
       Cleanable[0] not cleaned
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.PhantomReference, expect: EV_CLEAR, events: [EV_CLEAR, EV_CLEAN], throwEx: false
       Cleanable[0] not cleaned
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.PhantomReference, expect: EV_CLEAN, events: [EV_CLEAN, EV_CLEAR], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 2
       All cleanups done in cycle: 2, total: 1
      Case: java.lang.ref.WeakReference, expect: EV_CLEAN, events: [EV_CLEAN, EV_CLEAR], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 2
       All cleanups done in cycle: 2, total: 1
      Case: java.lang.ref.WeakReference, expect: EV_CLEAR, events: [EV_CLEAR, EV_CLEAN], throwEx: false
       Cleanable[0] not cleaned
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.SoftReference, expect: EV_CLEAR, events: [EV_CLEAR, EV_CLEAN], throwEx: false
       Cleanable[0] not cleaned
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.SoftReference, expect: EV_CLEAN, events: [EV_CLEAN, EV_CLEAR], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 5
       All cleanups done in cycle: 5, total: 1
      Case: java.lang.ref.PhantomReference, expect: EV_CLEAR, events: [EV_CLEAR, EV_CLEAN, EV_UNREF], throwEx: false
       Cleanable[0] not cleaned
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.PhantomReference, expect: EV_CLEAN, events: [EV_CLEAN, EV_CLEAR, EV_UNREF], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 4
       All cleanups done in cycle: 4, total: 1
      Case: java.lang.ref.PhantomReference, expect: EV_CLEAR, events: [EV_UNREF, EV_CLEAR, EV_CLEAN], throwEx: false
       Cleanable[0] not cleaned
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.PhantomReference, expect: EV_CLEAR, events: [EV_CLEAR, EV_UNREF, EV_CLEAN], throwEx: false
       Cleanable[0] not cleaned
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.PhantomReference, expect: EV_CLEAN, events: [EV_CLEAN, EV_UNREF, EV_CLEAR], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 2
       All cleanups done in cycle: 2, total: 1
      Case: java.lang.ref.PhantomReference, expect: EV_CLEAN, events: [EV_UNREF, EV_CLEAN, EV_CLEAR], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 2
       All cleanups done in cycle: 2, total: 1
      Case: java.lang.ref.WeakReference, expect: EV_CLEAN, events: [EV_UNREF, EV_CLEAN, EV_CLEAR], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 8
       All cleanups done in cycle: 8, total: 1
      Case: java.lang.ref.WeakReference, expect: EV_CLEAN, events: [EV_CLEAN, EV_UNREF, EV_CLEAR], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 3
       All cleanups done in cycle: 3, total: 1
      Case: java.lang.ref.WeakReference, expect: EV_CLEAR, events: [EV_CLEAR, EV_UNREF, EV_CLEAN], throwEx: false
       Cleanable[0] not cleaned
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.WeakReference, expect: EV_CLEAR, events: [EV_UNREF, EV_CLEAR, EV_CLEAN], throwEx: false
       Cleanable[0] not cleaned
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.WeakReference, expect: EV_CLEAN, events: [EV_CLEAN, EV_CLEAR, EV_UNREF], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 2
       All cleanups done in cycle: 2, total: 1
      Case: java.lang.ref.WeakReference, expect: EV_CLEAR, events: [EV_CLEAR, EV_CLEAN, EV_UNREF], throwEx: false
       Cleanable[0] not cleaned
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.SoftReference, expect: EV_CLEAR, events: [EV_CLEAR, EV_CLEAN, EV_UNREF], throwEx: false
       Cleanable[0] not cleaned
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.SoftReference, expect: EV_CLEAN, events: [EV_CLEAN, EV_CLEAR, EV_UNREF], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] cleaned in cycle: 14
       All cleanups done in cycle: 14, total: 1
      Case: java.lang.ref.SoftReference, expect: EV_CLEAR, events: [EV_UNREF, EV_CLEAR, EV_CLEAN], throwEx: false
       Cleanable[0] not cleaned
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.SoftReference, expect: EV_CLEAR, events: [EV_CLEAR, EV_UNREF, EV_CLEAN], throwEx: false
       Cleanable[0] not cleaned
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
      Case: java.lang.ref.SoftReference, expect: EV_CLEAN, events: [EV_CLEAN, EV_UNREF, EV_CLEAR], throwEx: false
       Cleanable[0] cleaned in cycle: 0
       All cleanups done in cycle: 0, total: 1
       Cleanable[0] not cleaned
      test CleanerTest.testRefSubtypes(): failure
      java.lang.AssertionError: The reference to the Cleanable should have been freed expected [true] but found [false]
      at org.testng.Assert.fail(Assert.java:94)
      at org.testng.Assert.failNotEquals(Assert.java:494)
      at org.testng.Assert.assertTrue(Assert.java:42)
      at CleanerTest.verify(CleanerTest.java:214)
      at CleanerTest.generateCases(CleanerTest.java:172)
      at CleanerTest.generateCases(CleanerTest.java:178)
      at CleanerTest.generateCases(CleanerTest.java:184)
      at CleanerTest.generateCasesInternal(CleanerTest.java:138)
      at CleanerTest.testRefSubtypes(CleanerTest.java:110)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:520)
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
      at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
      at org.testng.TestRunner.privateRun(TestRunner.java:767)
      at org.testng.TestRunner.run(TestRunner.java:617)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
      at org.testng.SuiteRunner.run(SuiteRunner.java:240)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
      at org.testng.TestNG.run(TestNG.java:1057)
      at com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:163)
      at com.sun.javatest.regtest.TestNGAction$TestNGRunner.main(TestNGAction.java:147)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:520)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92)
      at java.lang.Thread.run(Thread.java:804)
       Cleanable[0] cleaned in cycle: 5
       All cleanups done in cycle: 5, total: 1
      test CleanerTest.testReferentNotAvailable(): success
      test CleanerTest.testWeakKey(): success

      ===============================================
      java/lang/ref/CleanerTest.java
      Total tests run: 5, Failures: 1, Skips: 0
      ===============================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rriggs Roger Riggs
              Reporter:
              rriggs Roger Riggs
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: