Skip to content

Relax condition on JITServer rememberClass assert (0.44) #19233

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

Conversation

cjjdespres
Copy link
Contributor

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.

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]>
@cjjdespres cjjdespres requested a review from dsouzai as a code owner March 26, 2024 19:02
@cjjdespres
Copy link
Contributor Author

cjjdespres commented Mar 26, 2024

Attn @mpirvu. This is a cherry-pick of commit 8083cdc from PR #19226.

@dsouzai dsouzai changed the title Relax condition on JITServer rememberClass assert Relax condition on JITServer rememberClass assert (0.44) Mar 26, 2024
@mpirvu mpirvu self-assigned this Mar 26, 2024
@mpirvu
Copy link
Contributor

mpirvu commented Mar 26, 2024

Will merge after testing for the original PR (#19226) passes.

@mpirvu mpirvu added the comp:jitserver Artifacts related to JIT-as-a-Service project label Mar 26, 2024
@mpirvu
Copy link
Contributor

mpirvu commented Mar 26, 2024

Merging this one as well, since it's a cherry-pick of a PR that has passed testing.

@mpirvu mpirvu merged commit 440a9f2 into eclipse-openj9:v0.44.0-release Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jitserver Artifacts related to JIT-as-a-Service project
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants