-
Notifications
You must be signed in to change notification settings - Fork 754
Relax condition on JITServer rememberClass assert #19226
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
Relax condition on JITServer rememberClass assert #19226
Conversation
When ignoring the client's SCC, if a server performs an AOT compilation that is not an AOT cache compilation for a client (possible if the client has a valid local SCC) it may cache valid class chain offsets for classes in the client's session data. If the server then performs an AOT cache store for that client, it may receive an invalid class chain from the client for a class that already has a valid cached class chain offset, since the client will be ignoring its local SCC for such a compilation. This situation is valid, and should not trigger the fatal assert in TR_J9JITServerSharedCache::rememberClass() that detects a mismatch between the cached and received class chain offset. That fatal assert is now disabled for AOT cache stores when the server is ignoring the client's SCC. This fixes an unnecessary crash that could occur in the situation outlined above. Signed-off-by: Christian Despres <[email protected]>
Attn @mpirvu. I think this may need to go in 0.44 as well, if that is still possible. |
Notably, this can cause crashes when the client has a local readonly SCC. I didn't catch this in my testing of the default liberty container configuration (with |
If it's going in please make it happen today. We'll be starting a jdk22 M1 followed by 0.44 M2 builds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
jenkins test sanity zlinuxjit jdk17 |
After some further testing, I found a sequence of events across three runs that produced this behaviour:
In this particular test I was running in containers, and not running with (Edit: I should mention that the above steps no longer produce a crash because of this PR, but otherwise this scenario should still occur). I think it's still correct to disable the assert when we are ignoring the client's local SCC, because in that case we will always get a |
When ignoring the client's SCC, if a server performs an AOT compilation that is not an AOT cache compilation for a client (possible if the client has a valid local SCC) it may cache valid class chain offsets for classes in the client's session data. If the server then performs an AOT cache store for that client, it may receive an invalid class chain from the client for a class that already has a valid cached class chain offset, since the client will be ignoring its local SCC for such a compilation. This situation is valid, and should not trigger the fatal assert in TR_J9JITServerSharedCache::rememberClass() that detects a mismatch between the cached and received class chain offset. That fatal assert is now disabled for AOT cache stores when the server is ignoring the client's SCC.
This fixes an unnecessary crash that could occur in the situation outlined above.