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

MicroProfile 4.x: OutOfMemoryError: GC overhead limit exceeded when starting/stopping lots of apps #18426

Closed
brideck opened this issue Sep 2, 2021 · 2 comments · Fixed by #18457
Assignees
Labels
bug This bug is not present in a released version of Open Liberty in:MicroProfile/Config

Comments

@brideck
Copy link
Member

brideck commented Sep 2, 2021

When running the CDI TCK with microProfile-4.1 added to the Liberty server feature list, the server eventually runs out of memory, throwing java.lang.OutOfMemoryError: GC overhead limit exceeded from all of its threads. This behavior does not normally occur with this TCK, and is only present when the microProfile feature is included in the server config.

The CDI TCK consists of hundreds of applications that are added to the server, started, and then stopped as the tests execute. Analysis of a heap dump collected when the server was actively throwing the OOM errors has indicated that OLSmallRyeConfigProviderResolver is failing to release resources when the test applications are stopped. There is a known memory leak in SmallRye (smallrye/smallrye-config#277) and an attempt has been made to work around it in Open Liberty (#14550). The current suspicion is that the GLOBAL_CONFIG_APPLICATION_NAME case is not being handled correctly, so those applications are never released.

@brideck brideck added the bug This bug is not present in a released version of Open Liberty label Sep 2, 2021
@brideck
Copy link
Member Author

brideck commented Sep 2, 2021

Access to the heap dumps is available upon request.

@tevans78
Copy link
Member

tevans78 commented Sep 6, 2021

The root cause of this issue is the MP Config spec's assumption that there is a 1:1 relationship between Applications and ClassLoaders.... eclipse/microprofile-config#546

We're fighting a losing battle until the spec is fixed ... and that would have to be a major version change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This bug is not present in a released version of Open Liberty in:MicroProfile/Config
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants