Skip to content

Relax condition on JITServer rememberClass assert (0.44) - #19233

Merged
mpirvu merged 1 commit into
eclipse-openj9:v0.44.0-releasefrom
cjjdespres:0.44-rememberclass-fatal-assert
Mar 26, 2024
Merged

Relax condition on JITServer rememberClass assert (0.44)#19233
mpirvu merged 1 commit into
eclipse-openj9:v0.44.0-releasefrom
cjjdespres:0.44-rememberclass-fatal-assert

Conversation

@cjjdespres

Copy link
Copy Markdown
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 <despresc@ibm.com>
@cjjdespres
cjjdespres requested a review from dsouzai as a code owner March 26, 2024 19:02
@cjjdespres

cjjdespres commented Mar 26, 2024

Copy link
Copy Markdown
Contributor Author

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

mpirvu commented Mar 26, 2024

Copy link
Copy Markdown
Contributor

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

mpirvu commented Mar 26, 2024

Copy link
Copy Markdown
Contributor

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