On Fri, 8 Apr 2022 22:15:21 GMT, Leonid Mesnik <lmes...@openjdk.org> wrote:

> The tests serviceability/jvmti/RedefineClasses start failing in loom-repo 
> with CNFE like "java.lang.NoClassDefFoundError: 
> jdk/test/lib/compiler/InMemoryJavaCompiler"
> 
> It is not a loom specific bug, it might happen in jdk/jdk also.
> 
> The workaround is to build some classes explicitly. The fix was implemented 
> in repo-loom in Nov 2021 and there was no such failure after the fix in the 
> loom repo.
> 
> Also fix inlcudes some text refactoring to make push from loom smaller.

The issue with RedefineClassTest throwing NoClassDefFoundError: 
jdk/test/lib/InMemoryJavaCompiler  seems to go back to 2016 at least. We've had 
issues in other areas in the past that stemmed from implicit compilation so I 
assume this is what is suspected here too.

In the loom repo, two of the existing RedefineClasss* classes have an explicit 
`@compile` because the updated tests needed to be compiled with 
`--enable-preview`. I would be surprised if this caused an issue but maybe it 
creates an issue with concurrent test execution when tests that depend on 
implicit compilation are running at the same time (in another agentvm) but 
doing explicit compilation?  I wonder if creating a TEST.properties with 
`exclusiveAccess.dirs=.` would help this area.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8170

Reply via email to