Details
-
Bug
-
Resolution: Unresolved
-
P2
-
repo-leyden
-
Reproduced both on Linux/Fedora 40 and Gentoo Linux; both running on x86_64 and both having 64GB of RAM.
Description
It seems the latest Leyden builds are frequently triggering a core dump on bootstrap; I've observed this with more complex applications but eventually found a way tro trigger the same behaviour using the standard build process.
Essentially you need to build it once and then try to build it again, to "exercise" the firstly build JVM using the `--with-build-jdk` parameter.
The following script will result in a coredump produced during the build; you might need to adjust the COMMON variable, in particular the `with-boot-jdk` property.
```
#Shared flags for both builds:
COMMON="--with-jvm-variants=custom --with-num-cores=12 --with-memory-size=55000 --with-boot-jdk=/opt/jdk-22 --disable-manpages --with-vendor-name=Experiments --disable-full-docs"
#These are the features selected for stage1 build: subsequent stages might trim this selection further:
STAGE1_FEATURES=cds,compiler1,compiler2,g1gc,serialgc,jfr,jni-check,jvmci,jvmti,management,services
#STAGE2 is the same as STAGE1 but excluding serialgc:
STAGE2_FEATURES=cds,compiler1,compiler2,g1gc,jfr,jni-check,jvmci,jvmti,management,services
bash configure --with-conf-name=stage1 $COMMON --with-jvm-features=$STAGE1_FEATURES
CONF=stage1 make clean
CONF=stage1 make images
bash configure --with-build-jdk=build/stage1/jdk/ --with-conf-name=stage2 $COMMON --with-jvm-features=$STAGE2_FEATURES
CONF=stage2 make clean
CONF=stage2 make images
```
When running the above script, it reliably fails and will produce logs pointing to internal exceptions pointing to src/hotspot/share/interpreter/linkResolver.cpp, line 801 :
```Event: 0.335 Thread 0x00007f814402caa0 Exception <a 'java/lang/NoSuchMethodError'{0x000000045524c568}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStaticInit(java.lang.Object, java.lang.Object)'> (0x000000045524c568)
thrown [src/hotspot/share/interpreter/linkResolver.cpp, line 801]
Event: 0.336 Thread 0x00007f814402caa0 Exception <a 'java/lang/NoSuchMethodError'{0x0000000455252630}: 'int java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.lang.Object, int, int)'> (0x0000000455252630)
thrown [src/hotspot/share/interpreter/linkResolver.cpp, line 801]
Event: 0.336 Thread 0x00007f814402caa0 Exception <a 'java/lang/NoSuchMethodError'{0x0000000455257800}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.newInvokeSpecial(java.lang.Object, int)'> (0x0000000455257800)
thrown [src/hotspot/share/interpreter/linkResolver.cpp, line 801][...many more of the same pattern...]```
N.B. this isn't a build issue (I believe?): the error is similar to what I can see happening on more complex reproducers; I'm merely taking advantage of the build to showcase the error without you all needing to setup a more complex application.
HTH
Essentially you need to build it once and then try to build it again, to "exercise" the firstly build JVM using the `--with-build-jdk` parameter.
The following script will result in a coredump produced during the build; you might need to adjust the COMMON variable, in particular the `with-boot-jdk` property.
```
#Shared flags for both builds:
COMMON="--with-jvm-variants=custom --with-num-cores=12 --with-memory-size=55000 --with-boot-jdk=/opt/jdk-22 --disable-manpages --with-vendor-name=Experiments --disable-full-docs"
#These are the features selected for stage1 build: subsequent stages might trim this selection further:
STAGE1_FEATURES=cds,compiler1,compiler2,g1gc,serialgc,jfr,jni-check,jvmci,jvmti,management,services
#STAGE2 is the same as STAGE1 but excluding serialgc:
STAGE2_FEATURES=cds,compiler1,compiler2,g1gc,jfr,jni-check,jvmci,jvmti,management,services
bash configure --with-conf-name=stage1 $COMMON --with-jvm-features=$STAGE1_FEATURES
CONF=stage1 make clean
CONF=stage1 make images
bash configure --with-build-jdk=build/stage1/jdk/ --with-conf-name=stage2 $COMMON --with-jvm-features=$STAGE2_FEATURES
CONF=stage2 make clean
CONF=stage2 make images
```
When running the above script, it reliably fails and will produce logs pointing to internal exceptions pointing to src/hotspot/share/interpreter/linkResolver.cpp, line 801 :
```Event: 0.335 Thread 0x00007f814402caa0 Exception <a 'java/lang/NoSuchMethodError'{0x000000045524c568}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStaticInit(java.lang.Object, java.lang.Object)'> (0x000000045524c568)
thrown [src/hotspot/share/interpreter/linkResolver.cpp, line 801]
Event: 0.336 Thread 0x00007f814402caa0 Exception <a 'java/lang/NoSuchMethodError'{0x0000000455252630}: 'int java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.lang.Object, int, int)'> (0x0000000455252630)
thrown [src/hotspot/share/interpreter/linkResolver.cpp, line 801]
Event: 0.336 Thread 0x00007f814402caa0 Exception <a 'java/lang/NoSuchMethodError'{0x0000000455257800}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.newInvokeSpecial(java.lang.Object, int)'> (0x0000000455257800)
thrown [src/hotspot/share/interpreter/linkResolver.cpp, line 801][...many more of the same pattern...]```
N.B. this isn't a build issue (I believe?): the error is similar to what I can see happening on more complex reproducers; I'm merely taking advantage of the build to showcase the error without you all needing to setup a more complex application.
HTH