JDK-8339701 : Test TestPinCaseWithCFLH.java fails with -Xcomp
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Priority: P3
  • Status: New
  • Resolution: Unresolved
  • OS: linux
  • CPU: generic
  • Submitted: 2024-09-07
  • Updated: 2024-09-09
Related Reports
Relates :  
Description
Test serviceability/jvmti/vthread/TestPinCaseWithCFLH/TestPinCaseWithCFLH.java fails with -Xcomp jvm option, the test log snippet:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.ExceptionInInitializerError
	at java.base/sun.launcher.LauncherHelper.getLocalizedMessage(LauncherHelper.java:530)
	at java.base/sun.launcher.LauncherHelper.abort(LauncherHelper.java:697)
	at java.base/sun.launcher.LauncherHelper.loadMainClass(LauncherHelper.java:872)
	at java.base/sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:736)
Caused by: java.util.MissingResourceException: Can't find bundle for base name sun.launcher.resources.launcher, locale en_US
	at java.base/java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:2052)
	at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1690)
	at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1582)
	at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1548)
	at java.base/java.util.ResourceBundle.getBundle(ResourceBundle.java:858)
	at java.base/sun.launcher.LauncherHelper$ResourceBundleHolder.<clinit>(LauncherHelper.java:123)
	... 4 more
Caused by: java.lang.ClassCircularityError: java/util/concurrent/ConcurrentHashMap$ForwardingNode
	at java.base/java.util.concurrent.ConcurrentHashMap.transfer(ConcurrentHashMap.java:2446)
	at java.base/java.util.concurrent.ConcurrentHashMap.addCount(ConcurrentHashMap.java:2359)
	at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1076)
	at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1007)
	at java.base/java.util.Properties.put(Properties.java:1347)
	at java.base/java.util.Properties.load0(Properties.java:459)
	at java.base/java.util.Properties.load(Properties.java:410)
	at java.base/java.security.Security.loadProps(Security.java:157)
	at java.base/java.security.Security.initialize(Security.java:103)
	at java.base/java.security.Security.lambda$static$0(Security.java:84)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
	at java.base/java.security.Security.<clinit>(Security.java:83)
	at java.base/sun.security.util.SecurityProperties.getOverridableProperty(SecurityProperties.java:57)
	at java.base/sun.security.util.SecurityProperties.privilegedGetOverridable(SecurityProperties.java:48)
	at java.base/sun.security.util.SecurityProperties.includedInExceptions(SecurityProperties.java:72)
	at java.base/sun.security.util.SecurityProperties.<clinit>(SecurityProperties.java:36)
	at java.base/sun.security.util.FilePermCompat.<clinit>(FilePermCompat.java:43)
	at java.base/java.security.AccessControlContext.<init>(AccessControlContext.java:270)
	at java.base/java.security.AccessController.createWrapper(AccessController.java:649)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:461)
	at java.base/java.util.ResourceBundle$ResourceBundleProviderHelper.loadResourceBundle(ResourceBundle.java:3617)
	at java.base/java.util.ResourceBundle.loadBundle(ResourceBundle.java:1844)
	at java.base/java.util.ResourceBundle.findBundle(ResourceBundle.java:1775)
	at java.base/java.util.ResourceBundle.findBundle(ResourceBundle.java:1729)
	at java.base/java.util.ResourceBundle.findBundle(ResourceBundle.java:1729)
	at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1663)
Comments
The locale of test enviroment is `en_US.UTF-8`, and this test also fails with `-Xcomp -Duser.language=en -Duser.country=US` options # locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=
09-09-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/20906 Date: 2024-09-08 15:30:21 +0000
08-09-2024

reproduce command: echo -n "TestPinCaseWithCFLH" > 1 time java -Xcomp -cp /var/tmp/tone/run/jtreg/jtreg/lib/jtreg.jar:/tmp/tone/run/jtreg/jdk-repo/tmp-Xmixed/classes/serviceability/jvmti/vthreadH/TestPinCaseWithCFLH.d --add-exports java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -Djava.library.path=/var/tmp/tone/run/jtreg/jdk-repo/build/linux-aarch64-server-release/images/test/hotspot/jtreg/native -Djdk.virtualThreadScheduler.maxPoolSize=1 -Djdk.tracePinnedThreads=full --enable-native-access=ALL-UNNAMED -javaagent:TestPinCaseWithCFLH.jar com.sun.javatest.regtest.agent.MainWrapper 1
08-09-2024