-
Notifications
You must be signed in to change notification settings - Fork 722
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
JDK15 Windows : ClassLoadingTest_special Segmentation error vmState=0x00020002 #10249
Comments
Another similar failure with different vmState at
|
From failure for
All of these classes have an Anonymous flag set
@pshipton @hangshao0 Do we have new code in JVM does not respect GC classes handling convention? Is it code for JEP 371 Hidden Classes perhaps #9328? ... Or just Anonymous classes creation code is broken and allowed GC occur and collect class object before real class instantiation. There is the similar picture for second failure... All troubles start with collecting of class objects from classes with Anonymous flag set. |
Perhaps related to #10207 |
After #10207, there are classes that has anonymous flag set are not loaded by InternalAnonymousClassLoader. Is GC checking this flag ? |
"Checking" is a weak statement here. Yes, there are an exceptional handling of Anonymous classes across GC policies required for individual unloading. It might include assumption that Anonymous class must be discovered in Anonymous classloader. I believe convention for Anonymous classes handling is not correct for Balanced any more |
Currently all the hidden classes has anonymous flag set. I will try setting anonymous flag only on hidden class that needs to be individual unloaded. |
How this fix the problem except you are going to keep such classes in Anonymous classloader? |
I obviously do not understand specific details regarding Hidden classes and related requirements. However there are two models of class handling (not just for unloading purpose but for general roots discovering) in GC: regular classes and Anonymous classes. Hidden classes should be undistinguished from these two types (compatible) otherwise special handling in GC code is required to be designed. |
There are 2 types of hidden classes:
So I think we can construct the 1) the same as Anonymous classes, as mentioned in #9328 (comment). For 2), it will be construced as normal class from GC point of view - it won't be in its own rom segment, won't be in its own ram segment, its loader its hostclass's loader. Do I miss anything ? |
It should work from GC point of view (plus |
J9ClassIsAnonymous won't be used for hidden classes defined with ClassOption.STRONG. From However, I am getting an assertion failure in ClassLoadingTest_special_15 |
For the record: I understand mechanism of failure for Balanced. Every classloader should have a knowledge which regions associated roots are located. It is implemented by using Classloader Remembered Set. For Anonymous classes however this information should be available for each class to have ability for individual unloading. For each class with |
Do you have link to failed job with stored artifacts? |
Shared the link to the job via private message. |
A bit more information on the hidden classes: For both 1) and 2) mentioned in #10249 (comment): |
Had a discussion with Dmitri, we know what is going on here. But I will leave it to him to comment on what he has found out on the GC side. |
So we figured out what is wrong now. While Standard Collectors scanning Classloader's RAM Segments and Hash Table both Balanced has been optimized to scan Hash Table only for all classloaders except System and internal Anonymous. But hidden classes never added to hash table, so they are still be invisible and missed for scanning |
This change adds code to handle ClassOption.STRONG 1) For hidden class defined without ClassOption.STRONG, set its classLoader to anon classLoader. J9_FINDCLASS_FLAG_ANON is set for such classes. 2) For hidden class defined with ClassOption.STRONG, set its classLoader to its hostclass's classLoader. J9_FINDCLASS_FLAG_ANON is not set for such classes. 3) With 1) and 2) the field that I added in my previous change ROMClassSegmentAllocationStrategy::__allocNewSeg is not necessary anymore. Remove this field. 4) Add hidden class in 2) to the classTable of its hostclass's ClassLoader. In this way, the current balanced GC code is able to find such class when iterating through the classTable. Adding hidden classes to the classTable makes it not sharable via shared classes cache, as its name won't be unique across JVMs. The change in 4) is temporary if we finally decide to change balance GC to scan the ram segment like other collectors. A flag can be used to control whether to skip hidden class when iterating the class table. Issue eclipse-openj9#9328 Fixes eclipse-openj9#10249 Signed-off-by: Hang Shao <hangshao@ca.ibm.com>
Failure link
From an internal build
Test_openjdk15_j9_special.system_x86-64_windows_Nightly_otherLoadTest/3
:Optional info
Failure output (captured from console output)
For example, to rebuild the failed tests in =https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder, use the following links:
01:35:46 https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/parambuild/?JDK_VERSION=15&JDK_IMPL=openj9&BUILD_LIST=system/otherLoadTest&PLATFORM=x86-64_windows&TARGET=ClassLoadingTest_special_14
The text was updated successfully, but these errors were encountered: