Hi, In GNU Guix, we still have a use for OpenJDK 11 for our source bootstrap of the latest OpenJDK.
Unfortunately, the build fails non-deterministically with a ConcurrentModificationException error. This does not seem to occur in other versions, either the previous 10.46 version or the following 12.33 one. The crash happens early during build, whether using multiple cores/threads or not, with a backtrace like: --8<---------------cut here---------------start------------->8--- Building target 'all' in configuration 'linux-x86_64-normal-server-release' Compiling 8 files for BUILD_TOOLS_LANGTOOLS Creating hotspot/variant-server/tools/adlc/adlc from 13 file(s) Compiling 2 files for BUILD_JVMTI_TOOLS Compiling 1 files for BUILD_JFR_TOOLS An exception has occurred in the compiler (10-internal). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.. java.util.ConcurrentModificationException at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1471) at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.lambda$initPartialTraversalState$0(StreamSpliterators.java:294) at java.base/java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.fillBuffer(StreamSpliterators.java:206) at java.base/java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.doAdvance(StreamSpliterators.java:169) at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.tryAdvance(StreamSpliterators.java:300) at java.base/java.util.Spliterators$1Adapter.hasNext(Spliterators.java:681) at java.base/jdk.internal.jrtfs.JrtDirectoryStream$1.hasNext(JrtDirectoryStream.java:81) at jdk.compiler/com.sun.tools.javac.file.JRTIndex.getEntry(JRTIndex.java:210) at jdk.compiler/com.sun.tools.javac.file.JRTIndex.getCtSym(JRTIndex.java:185) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.getSupplementaryFlags(ClassFinder.java:250) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:353) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:284) at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:633) at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1308) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.loadClass(ClassFinder.java:430) at jdk.compiler/com.sun.tools.javac.comp.Resolve.loadClass(Resolve.java:1985) at jdk.compiler/com.sun.tools.javac.comp.Resolve.findIdentInPackageInternal(Resolve.java:2378) at jdk.compiler/com.sun.tools.javac.comp.Resolve.findIdentInPackage(Resolve.java:2366) at jdk.compiler/com.sun.tools.javac.comp.Attr.selectSym(Attr.java:3720) at jdk.compiler/com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3604) at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:2110) at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:653) at jdk.compiler/com.sun.tools.javac.comp.Attr.attribType(Attr.java:713) at jdk.compiler/com.sun.tools.javac.comp.Attr.attribType(Attr.java:706) at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$ImportsPhase.attribImportType(TypeEnter.java:439) at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$ImportsPhase.doImport(TypeEnter.java:422) at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$ImportsPhase.resolveImports(TypeEnter.java:362) at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$ImportsPhase.runPhase(TypeEnter.java:319) at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$Phase.doCompleteEnvs(TypeEnter.java:280) at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$Phase.completeEnvs(TypeEnter.java:249) at jdk.compiler/com.sun.tools.javac.comp.TypeEnter.complete(TypeEnter.java:198) at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:633) at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1308) at jdk.compiler/com.sun.tools.javac.comp.Enter.complete(Enter.java:583) at jdk.compiler/com.sun.tools.javac.comp.Enter.main(Enter.java:560) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1058) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:929) at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:306) at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:165) at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57) at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43) make[3]: *** [gensrc/GensrcJfr.gmk:43: /tmp/guix-build-openjdk-11.0.28.drv-0/jdk-11.0.28+6/build/linux-x86_64-normal-server-release/hotspot/variant-server/buildtools/tools_classes/_the.BUILD_JFR_TOOLS_batch] Err4 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [make/Main.gmk:265: hotspot-server-gensrc] Error 2 make[2]: *** Waiting for unfinished jobs.... ERROR: Build failed for target 'all' in configuration 'linux-x86_64-normal-server-release' (exit code 2) === Output from failing command(s) repeated here === * For target hotspot_variant-server_buildtools_tools_classes__the.BUILD_JFR_TOOLS_batch: An exception has occurred in the compiler (10-internal). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.. java.util.ConcurrentModificationException at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1471) at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.lambda$initPartialTraversalState$0(StreamSpliterators.java:294) at java.base/java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.fillBuffer(StreamSpliterators.java:206) at java.base/java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.doAdvance(StreamSpliterators.java:169) at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.tryAdvance(StreamSpliterators.java:300) at java.base/java.util.Spliterators$1Adapter.hasNext(Spliterators.java:681) at java.base/jdk.internal.jrtfs.JrtDirectoryStream$1.hasNext(JrtDirectoryStream.java:81) at jdk.compiler/com.sun.tools.javac.file.JRTIndex.getEntry(JRTIndex.java:210) at jdk.compiler/com.sun.tools.javac.file.JRTIndex.getCtSym(JRTIndex.java:185) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.getSupplementaryFlags(ClassFinder.java:250) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:353) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:284) at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:633) ... (rest of output omitted) * All command lines available in /tmp/guix-build-openjdk-11.0.28.drv-0/jdk-11.0.28+6/build/linux-x86_64-normal-server-release/make-support/failure-logs. === End of repeated output === No indication of failed target found. Hint: Try searching the build log for '] Error'. Hint: See doc/building.html#troubleshooting for assistance. make[1]: *** [/tmp/guix-build-openjdk-11.0.28.drv-0/jdk-11.0.28+6/make/Init.gmk:308: main] Error 2 make: *** [/tmp/guix-build-openjdk-11.0.28.drv-0/jdk-11.0.28+6/make/Init.gmk:186: all] Error 2 --8<---------------cut here---------------end--------------->8--- This corresponds to the Guix package definition as seen here [0]. The inputs used are: --8<---------------cut here---------------start------------->8--- [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] + [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] --8<---------------cut here---------------end--------------->8--- I presume the issue must have been fixed in a later version, but looking at the git history around the place of the crash doesn't reveal any obvious fixes that came later. If someone has a suggestion of what to look into or knows a commit that could have resolved this bug in later version, please let me know! [0] https://codeberg.org/guix/guix/src/commit/e0b767790416322b1481440b9e437c79d8aea2a0/gnu/packages/java.scm#L1309 -- Thanks, Maxim
