Skip to content
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

Ensure ROM class cache shutdown is necessary #18792

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

cjjdespres
Copy link
Contributor

In #18656, I did not check to see if any clients were actually deleted in the purge operation. If none were, then the shared ROM class cache would necessarily have been shut down already. Attempting to shut it down again would lead to a segfault. Checking if the purge operation was responsible for deleting the last clients before shutting down the shared ROM class cache avoids this issue.

Attn @mpirvu.

@mpirvu mpirvu self-assigned this Jan 24, 2024
@mpirvu mpirvu added the comp:jitserver Artifacts related to JIT-as-a-Service project label Jan 24, 2024
Copy link
Contributor

@mpirvu mpirvu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good, but I would use a different name for the variable that was introduced.

// Time for a purge operation.
// Scan the entire table and delete old elements that are not in use
for (auto iter = _clientSessionMap.begin(); iter != _clientSessionMap.end(); ++iter)
{
TR_ASSERT(iter->second->getInUse() >= 0, "_inUse=%d must be positive\n", iter->second->getInUse());
clientWasDeleted = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just because we enter this loop, it doesn't mean that the clients were deleted. It only means that client sessions exist. Thus, I would change the name of the variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. I also changed the logic slightly, hopefully to be a little clearer.

@mpirvu
Copy link
Contributor

mpirvu commented Jan 24, 2024

jenkins test sanity zlinuxjit jdk17

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