Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueTypes: ClassCircularityError for OpenJDK test RecursiveValueClass #20497

Open
theresa-m opened this issue Nov 4, 2024 · 2 comments
Open
Labels
project:valhalla Used to track Project Valhalla related work

Comments

@theresa-m
Copy link
Contributor

theresa-m commented Nov 4, 2024

Test: valhalla/valuetypes/RecursiveValueClass.java

Caused by: org.junit.platform.commons.JUnitException: ClassSelector [className = 'RecursiveValueClass', classLoader = jdk.internal.loader.ClassLoaders$AppClassLoader@6c04c3e9] resolution failed
...
Caused by: java.lang.ClassCircularityError
	at java.base/java.lang.ClassLoader.defineClassImpl(Native Method)
	at java.base/java.lang.ClassLoader.defineClassInternal(ClassLoader.java:470)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:431)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:1174)
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:961)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:867)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:825)

Related to #20404

@theresa-m theresa-m added the project:valhalla Used to track Project Valhalla related work label Nov 4, 2024
Copy link

github-actions bot commented Nov 4, 2024

Issue Number: 20497
Status: Open
Recommended Components: comp:vm, comp:test, comp:gc
Recommended Assignees: hangshao0, llxia, pshipton

@a7ehuo
Copy link
Contributor

a7ehuo commented Nov 14, 2024

The java.lang.ClassCircularityError is also reproducible with TestValueConstruction.java with -Xint.

cd /root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/scratch/2 && \
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus \
DOCS_JDK_IMAGE_DIR= \
HOME=/root \
JTREG_EXTRA_PROBLEM_LISTS=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/ProblemList-hotspotjtreg.txt \
JTREG_JAVA_OPTIONS='-XX:ValueTypeFlatteningThreshold=99999 -XX:+EnableArrayFlattening -Xint -Djdk.debug=release' \
LANG=en_US.UTF-8 \
LC_ALL=C \
PATH=/bin:/usr/bin:/usr/sbin \
TEST_IMAGE_DIR=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/images/test \
XDG_RUNTIME_DIR=/run/user/0 \
XDG_SESSION_CLASS=user \
XDG_SESSION_ID=742 \
XDG_SESSION_TYPE=tty \
_JVM_DWARF_PATH=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/images/symbols \
    /root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/images/jdk/bin/javac \
        -J-XX:MaxRAMPercentage=8.33333 \
        -J-Dtest.boot.jdk=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/images/jdk \
        -J-Djava.io.tmpdir=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/tmp \
        -J-Dtest.vm.opts='-XX:MaxRAMPercentage=8.33333 -Dtest.boot.jdk=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/images/jdk -Djava.io.tmpdir=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/tmp' \
        -J-Dtest.tool.vm.opts='-J-XX:MaxRAMPercentage=8.33333 -J-Dtest.boot.jdk=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/images/jdk -J-Djava.io.tmpdir=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/tmp' \
        -J-Dtest.compiler.opts= \
        -J-Dtest.java.opts='-XX:ValueTypeFlatteningThreshold=99999 -XX:+EnableArrayFlattening -Xint -Djdk.debug=release' \
        -J-Dtest.jdk=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/images/jdk \
        -J-Dcompile.jdk=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/images/jdk \
        -J-Dtest.timeout.factor=4.0 \
        -J-Dtest.nativepath=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/linux-x86_64-server-release/images/test/hotspot/jtreg/native \
        -J-Dtest.root=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg \
        -J-Dtest.name=compiler/valhalla/inlinetypes/TestValueConstruction.java#CompileonlyTest \
        -J-Dtest.file=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestValueConstruction.java \
        -J-Dtest.src=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg/compiler/valhalla/inlinetypes \
        -J-Dtest.src.path=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg/compiler/valhalla/inlinetypes:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg/testlibrary:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/lib:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg/compiler/whitebox:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg \
        -J-Dtest.classes=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2/compiler/valhalla/inlinetypes/TestValueConstruction_CompileonlyTest.d \
        -J-Dtest.class.path=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2/compiler/valhalla/inlinetypes/TestValueConstruction_CompileonlyTest.d:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2/testlibrary:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2/test/lib:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2/compiler/whitebox:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2 \
        -J-Dtest.class.path.prefix=/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2/compiler/valhalla/inlinetypes/TestValueConstruction_CompileonlyTest.d:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg/compiler/valhalla/inlinetypes:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2/testlibrary:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2/test/lib:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2/compiler/whitebox:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2 \
        -J-Dtest.enable.preview=true \
        -d /root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2/compiler/valhalla/inlinetypes/TestValueConstruction_CompileonlyTest.d \
        -sourcepath /root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg/compiler/valhalla/inlinetypes:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg/testlibrary:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/lib:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg/compiler/whitebox:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg \
        -classpath /root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg/compiler/valhalla/inlinetypes:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2/compiler/valhalla/inlinetypes/TestValueConstruction_CompileonlyTest.d:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2/testlibrary:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2/test/lib:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2/compiler/whitebox:/root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/build/run-test-prebuilt/test-support/jtreg_test_hotspot_jtreg_hotspot_valhalla/classes/2 \
        --enable-preview \
        --source=24 /root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestValueConstruction.java
direct:
Note: /root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/lib/jdk/test/lib/Asserts.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /root/home/ahuo/src/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestValueConstruction.java uses preview features of Java SE 24.
Note: Recompile with -Xlint:preview for details.

ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.ClassCircularityError
REASON: User specified action: run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,*TestValueConstruction::test* -Xbatch -XX:CompileCommand=inline,TestValueConstruction::checkDeopt compiler.valhalla.inlinetypes.TestValueConstruction 
TIME:   1.093 seconds
messages:
command: main -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,*TestValueConstruction::test* -Xbatch -XX:CompileCommand=inline,TestValueConstruction::checkDeopt compiler.valhalla.inlinetypes.TestValueConstruction
reason: User specified action: run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:CompileCommand=compileonly,*TestValueConstruction::test* -Xbatch -XX:CompileCommand=inline,TestValueConstruction::checkDeopt compiler.valhalla.inlinetypes.TestValueConstruction 
started: Thu Nov 14 07:05:08 PST 2024
Mode: othervm [/othervm specified]
finished: Thu Nov 14 07:05:09 PST 2024
elapsed time (seconds): 1.093
configuration:
STDOUT:
STDERR:
java.lang.ClassCircularityError
	at java.base/java.lang.ClassLoader.defineClassImpl(Native Method)
	at java.base/java.lang.ClassLoader.defineClassInternal(ClassLoader.java:472)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:433)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:1174)
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:961)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:867)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:825)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1101)
	at java.base/java.lang.ClassLoader.defineClassImpl(Native Method)
	at java.base/java.lang.ClassLoader.defineClassInternal(ClassLoader.java:472)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:433)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:1174)
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:961)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:867)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:825)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1101)
	at java.base/java.lang.ClassLoader.defineClassImpl(Native Method)
	at java.base/java.lang.ClassLoader.defineClassInternal(ClassLoader.java:472)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:433)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:1174)
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:961)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:867)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:825)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1101)
	at java.base/java.lang.ClassLoader.defineClassImpl(Native Method)
	at java.base/java.lang.ClassLoader.defineClassInternal(ClassLoader.java:472)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:433)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:1174)
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:961)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:867)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:825)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1101)
	at java.base/java.lang.Class.forNameImpl(Native Method)
	at java.base/java.lang.Class.forNameHelper(Class.java:454)
	at java.base/java.lang.Class.forName(Class.java:432)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:136)
	at java.base/java.lang.Thread.run(Thread.java:1588)
STATUS:Failed.`main' threw exception: java.lang.ClassCircularityError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project:valhalla Used to track Project Valhalla related work
Projects
None yet
Development

No branches or pull requests

2 participants