-
Notifications
You must be signed in to change notification settings - Fork 724
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
Relo records not being created properly with inlining and findOrFabricateShadowSymbol #20669
Comments
Issue Number: 20669 |
I'm not sure how that could happen. The reason is because, if a method gets a SVM validation record, it is That said, I had run into a "should have already been validated" error as part of my AOT MH work, because there was a mismatch between the JIT and AOT FrontEnd/ResolvedMethod APIs [2]. Maybe something similar is happening here? You'd have to use a trace log to find the source of the method that is missing the validation. [1]
[2] 9a779e1 |
Because |
What I mean is that in this issue, the openj9/runtime/compiler/env/VMJ9.cpp Lines 9075 to 9077 in ff43532
was not previously validated, so the SVM assert triggers and the AOT warm compilation fails. It looks like that's because openj9/runtime/compiler/compile/J9SymbolReferenceTable.cpp Lines 829 to 852 in eae6d58
is just the first method in the pool, and there wouldn't be any reason for a method record to have been created for it at this point. My idea was that in #20529 (comment), the method would coincidentally have been validated earlier, so compilation wouldn't have failed. I think that could happen, but after looking at the compilation logs again for #20529 (comment), I realized that the problem there wouldn't have occurred in |
I've tested this a bit more, and I should mention that I get some (but not a very large number of) |
Ah I see, well this is fairly easy to solve, but maybe not the easiest to make it clean. After
you need to make a call similar to
where you call |
Yeah, I started doing something similar and it was a bit inelegant. I decided to take a stab at implementing |
Yeah saw your PR after I made my comment, and what you're doing now is definitely much cleaner than what I suggested. |
Issue Number: 20669 |
While running acmeair with
-Xaot:forceAOT
, I noticed that addingdisableInlining
in the cold run reduced the number of AOT failures by around 200, including roughly 150compilationSymbolValidationManagerFailure
failures (which are assertion failures in the SVM). If I run withTR_svmAssertionsAreFatal=1
, I get a crash inTR_J9SharedCacheVM::getClassFromSignature()
in this method:openj9/runtime/compiler/compile/J9SymbolReferenceTable.cpp
Line 791 in eae6d58
Compiling this method without fatal assertions does show that the failure occurs during
The assertion is "method ... should have already been validated", and from looking at
findOrFabricateShadowSymbol()
it does seem like the first method ofcontainingClass
wouldn't necessarily have been validated already. A relo record should be created for this method, or some other way should be found to getdeclaringClass
.(EDIT: that other issue is only somewhat related to this, and the issue there wouldn't have been caused by the error here).
Actually, this might be related to #20529 (comment) as well. I was confused why certain values couldn't be looked up in a beholder constant pool whileTR_RelocationRecordValidateStaticClassFromCP
was being validated, and noticed that there weren't any prior records with aninternalVMFunctions
call that would actually resolve the entry at that index, unlike other collections of records. I suspect that if the first method ofcontainingClass
coincidentally happens to be validated already, the SVM compilation will succeed, but then will fail to load because a record isn't created fordefiningClass
and some time later something calledclassOfStatic()
ondefiningClass
. I mention this because thatValidateStaticClassFromCP
record was created while inliningjava/util/Locale.equals(Ljava/lang/Object;)Z
too, in what looks like the same the same place as the assertion failure here. (The method being compiled was different, of course).Now that I think about it,
getClassFromSignature()
isn't called withisVettedForAOT=true
and that would cause an arbitrary class validation to be created without SVM, so thedeclaringClass
infindOrFabricateShadowSymbol()
is probably missing a validation record as well.The text was updated successfully, but these errors were encountered: