JDK-8261745 : jdk/dynalink/TypeConverterFactoryRetentionTests.java times out intermittently
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 16.0.1,17
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2021-02-15
  • Updated: 2021-02-17
  • Resolved: 2021-02-17
Related Reports
Duplicate :  
Relates :  
Description
When running tier2 tests on busy CI server, this happens:

TEST: jdk/dynalink/TypeConverterFactoryRetentionTests.java
TEST JDK: /home/buildbot/worker/test-jdkX-linux/build/build/linux-x86_64-server-fastdebug/images/jdk

ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.AssertionError: Should have GCd a class loader from both queues by now
REASON: Assumed action based on file name: run main TypeConverterFactoryRetentionTests 
TIME:   38.445 seconds
messages:
command: main TypeConverterFactoryRetentionTests
reason: Assumed action based on file name: run main TypeConverterFactoryRetentionTests 
Mode: agentvm
Agent id: 169
elapsed time (seconds): 38.445

I think this test is rather time-sensitive. I wonder if we want to extend the test time, and limit the heap size to trigger enough GCs (that would hopefully involve weak references processing)?
Comments
https://github.com/openjdk/jdk/pull/2617 is up for review
17-02-2021

Marking it as a duplicate of JDK-8261483, will work on a resolution within that issue.
17-02-2021

I'll switch those tests to run with "@run main/othervm -Xmx���" and find a suitably low value for maximum memory usage.
17-02-2021

TypeConverterFactoryMemoryLeakTest.java: [2021-02-15T15:57:50,979Z] STDERR: [2021-02-15T15:57:50,979Z] java.lang.AssertionError: Should have GCd a method handle by now [2021-02-15T15:57:50,979Z] at TypeConverterFactoryMemoryLeakTest.main(TypeConverterFactoryMemoryLeakTest.java:88) [2021-02-15T15:57:50,980Z] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [2021-02-15T15:57:50,980Z] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) [2021-02-15T15:57:50,980Z] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [2021-02-15T15:57:50,980Z] at java.base/java.lang.reflect.Method.invoke(Method.java:567) [2021-02-15T15:57:50,980Z] at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298) [2021-02-15T15:57:50,980Z] at java.base/java.lang.Thread.run(Thread.java:831)
15-02-2021

jdk/dynalink/TypeConverterFactoryMemoryLeakTest.java seems to fail intermittently with similar symptoms as well.
15-02-2021