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

Mitigate risks of OOM with SoftReference cache #5518

Closed
devinrsmith opened this issue May 23, 2024 · 0 comments · Fixed by #5520
Closed

Mitigate risks of OOM with SoftReference cache #5518

devinrsmith opened this issue May 23, 2024 · 0 comments · Fixed by #5520
Assignees
Labels
bug Something isn't working
Milestone

Comments

@devinrsmith
Copy link
Member

A deep dive into #5516 exposed a situation where the JVM was getting OOM errors while there was plenty of reclaimable heap (99.9% of heap was taken up by reclaimable SoftReference'd objects). That fix itself should greatly reduce the risk of this error in this exact situation, but fundamentally other code paths can still hit JNI critical sections and cause "Retried waiting for GCLocker too often allocating" and OOMs. See https://github.com/devinrsmith/GCLockerTooOftenAllocating for a more detailed reproduction.

In the meantime, we can mitigate the risks by increasing -XX:GCLockerRetryAllocationCount above the default of 2.

@devinrsmith devinrsmith added the bug Something isn't working label May 23, 2024
@devinrsmith devinrsmith added this to the 2. April 2024 milestone May 23, 2024
@devinrsmith devinrsmith self-assigned this May 23, 2024
devinrsmith added a commit to devinrsmith/deephaven-core that referenced this issue May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant