Memory leak as a result of no cleanup for ThreadLocal in CodedOutputStream?? #7082
Unanswered
asclark109
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using the io.opentelemetry:opentelemetry-exporter-common:1.38.0 jar in my java web application project running on Tomcat 10. I am getting memory leaks at application shutdown (one is a io.netty.util.internal.InternalThreadLocalMap that is tracked in Netty). The other appears below.
I have looked at your class CodedOutputStream.java (in release 1.38.0 and on main): https://github.com/open-telemetry/opentelemetry-java/blob/main/exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/CodedOutputStream.java
I notice that a ThreadLocal is created and updated but never cleaned up (i.e. I see no calls like THREAD_LOCAL_CODED_OUTPUT_STREAM.remove()).
If someone can offer help to get around this (or patch a fix), it would be appreciated. thanks.
Only discussion page I could find on ThreadLocals #6584
Created an associated issue here: #7083
Beta Was this translation helpful? Give feedback.
All reactions