On AIX the test test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/RedefineLeakThrowable.java runs into this error:
java.lang.RuntimeException: java.lang.OutOfMemoryError: Metaspace at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:168) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94) at jdk.test.lib.compiler.InMemoryJavaCompiler.compile(InMemoryJavaCompiler.java:188) at RedefineClassHelper.redefineClass(RedefineClassHelper.java:50) at RedefineLeakThrowable.main(RedefineLeakThrowable.java:64) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) at java.base/java.lang.Thread.run(Thread.java:1570) Caused by: java.lang.OutOfMemoryError: Metaspace at java.base/java.time.Duration.<clinit>(Duration.java:149) at java.base/java.time.temporal.ChronoUnit.<clinit>(ChronoUnit.java:83) at java.base/java.time.temporal.ChronoField.<clinit>(ChronoField.java:124) at java.base/java.time.LocalDate.of(LocalDate.java:272) at java.base/java.time.LocalDate.<clinit>(LocalDate.java:147) at java.base/java.time.LocalDateTime.<clinit>(LocalDateTime.java:145) at jdk.zipfs/jdk.nio.zipfs.ZipUtils.dosToJavaTime(ZipUtils.java:216) at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$Entry.readCEN(ZipFileSystem.java:2816) at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$Entry.<init>(ZipFileSystem.java:2778) at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.getEntry(ZipFileSystem.java:1941) at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.newInputStream(ZipFileSystem.java:859) at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.isMultiReleaseJar(ZipFileSystem.java:1444) at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.initializeReleaseVersion(ZipFileSystem.java:1416) at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:191) at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getZipFileSystem(ZipFileSystemProvider.java:125) at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:120) at jdk.compiler/com.sun.tools.javac.file.JavacFileManager$ArchiveContainer.<init>(JavacFileManager.java:566) at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.getContainer(JavacFileManager.java:329) at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.pathsAndContainers(JavacFileManager.java:1078) at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.indexPathsAndContainersByRelativeDirectory(JavacFileManager.java:1033) at jdk.compiler/com.sun.tools.javac.file.JavacFileManager$$Lambda/0x00000328001a3168.apply(Unknown Source) at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1228) at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.pathsAndContainers(JavacFileManager.java:1021) at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.list(JavacFileManager.java:777) at [java.compiler@22-internal](mailto:java.compiler@22-internal)/javax.tools.ForwardingJavaFileManager.list(ForwardingJavaFileManager.java:82) at jdk.compiler/com.sun.tools.javac.api.ClientCodeWrapper$WrappedJavaFileManager.list(ClientCodeWrapper.java:223) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.list(ClassFinder.java:752) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.scanUserPaths(ClassFinder.java:689) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:570) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:311) at jdk.compiler/com.sun.tools.javac.code.ClassFinder$$Lambda/0x00000328001287f0.complete(Unknown Source) at jdk.compiler/com.sun.tools.javac.code.Symtab.lambda$addRootPackageFor$8(Symtab.java:855) Seems the MetaSpace settings of the test need to be adjusted; 17m works on the other platforms but AIX needs 23m. I tested with higher iteration value in main of RedefineLeakThrowable so see if it is not a leak and with 23m it passes too on AIX with higher iteration value. For some reason, with product binaries 21m was sufficient too (but fastdebug needed a bit more). Should we keep the old MetaSpace value 17m for non - AIX ? ------------- Commit messages: - Adjust start section of the test - JDK-8319375 Changes: https://git.openjdk.org/jdk/pull/16553/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16553&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8319375 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/16553.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16553/head:pull/16553 PR: https://git.openjdk.org/jdk/pull/16553