-
Notifications
You must be signed in to change notification settings - Fork 37
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
Repeated creation of type systems can exhaust JVM metaspace #371
Comments
reckart
added a commit
that referenced
this issue
Aug 15, 2024
- Adding a "test case" - actually needs manual observation at the moment
reckart
added a commit
that referenced
this issue
Aug 15, 2024
- Added test case to check for the leak
reckart
added a commit
that referenced
this issue
Aug 16, 2024
- Deprecated various methods that should get differnent signatures or visibility scopes - Added a cache for generators - Always use the lookup of the JCas wrapper class itself
reckart
added a commit
that referenced
this issue
Aug 16, 2024
- Deprecated various methods that should get differnent signatures or visibility scopes - Added a cache for generators - Always use the lookup of the JCas wrapper class itself
reckart
added a commit
that referenced
this issue
Aug 28, 2024
…ype-systems-can-exhaust-JVM-metaspace Issue #371: Repeated creation of type systems can exhaust JVM metaspace
reckart
added a commit
that referenced
this issue
Aug 28, 2024
…ns-a-JCAS-class-that-is-used-as-a-feature-range-outside-the-PEAR * release/3.5.x: Issue #371: Repeated creation of type systems can exhaust JVM metaspace Issue #371: Repeated creation of type systems can exhaust JVM metaspace % Conflicts: % uimaj-core/src/main/java/org/apache/uima/cas/impl/FSClassRegistry.java
reckart
added a commit
that referenced
this issue
Aug 28, 2024
* release/3.5.x: Issue #382: Warning when PEAR contains a JCAS class that is used as a feature range outside the PEAR Issue #382: Warning when PEAR contains a JCAS class that is used as a feature range outside the PEAR Issue #382: Warning when PEAR contains a JCAS class that is used as a feature range outside the PEAR Issue #382: Warning when PEAR contains a JCAS class that is used as a feature range outside the PEAR Issue #371: Repeated creation of type systems can exhaust JVM metaspace Issue #371: Repeated creation of type systems can exhaust JVM metaspace
reckart
added a commit
that referenced
this issue
Aug 28, 2024
* main: Issue #382: Warning when PEAR contains a JCAS class that is used as a feature range outside the PEAR Issue #382: Warning when PEAR contains a JCAS class that is used as a feature range outside the PEAR Issue #382: Warning when PEAR contains a JCAS class that is used as a feature range outside the PEAR Issue #382: Warning when PEAR contains a JCAS class that is used as a feature range outside the PEAR Issue #371: Repeated creation of type systems can exhaust JVM metaspace Issue #371: Repeated creation of type systems can exhaust JVM metaspace % Conflicts: % uimaj-core/src/main/java/org/apache/uima/cas/CASRuntimeException.java % uimaj-core/src/main/java/org/apache/uima/cas/impl/FSClassRegistry.java
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When repeatedly creating type system instances with lots of classes on a Java 17+ system, it appears that the JVM class metaspace can be exhausted.
To Reproduce
Steps to reproduce the behavior:
Diagnosis so far: it appears that
TypeSystemImpl.computeAdjustedFeatureOffsets()
will always initialize thetype2jcci
map of theTypeSystemImpl
instance. As part of this,FSClassRegistry.createJCasClassInfo()
is repeatedly called which creates new generator callsites (lambdas) that start clogging up the metaspace.The problem happens in particular if CASes are created using a
ResourceManager
with a custom extension classpath.Expected behavior
A solution might be to use the global JCCI cache maintained in
FSClassRegistry
when populating theTypeSystemImpl.type2jcci
maps to avoid repeatedly creating the generator lambdas.Please complete the following information:
References
The text was updated successfully, but these errors were encountered: