Metaspace leak in Spring Boot / Tomcat apps after upgrading to 1.64.0 — tied to DD_APPSEC_SCA_ENABLED
@jandro996 đang làm issue này rồi.
Từ ngày 17/7/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Tracer Version(s)
1.64.0
Java Version(s)
21.0.11
JVM Vendor
Amazon Corretto
Bug Report
After upgrading dd-trace-java from 1.63.2 to 1.64.0, our Spring Boot applications (Tomcat based) started running out of Metaspace within about a day of deployment. Metaspace grows continuously in a straight line rather than plateauing, until it hits the configured limit and the JVM/pod is killed.
Downgrading to 1.63.2 with no other changes resolves the issue. On 1.64.0, setting DD_APPSEC_SCA_ENABLED=false also resolves it (all other flags unchanged). This strongly points at the SCA reachability work shipped in 1.64.0 (possibly #11352 "Implement SCA Reachability runtime detection" and/or #11614 "Migrate SCA Reachability to method-level symbol database") as the likely root cause, but we haven't been able to confirm the exact mechanism from our side.
I created a Datadog Helpdesk issue for this as well at Request #2955022 (with uploaded class load file).
Expected Behavior
Expected behavior
Metaspace usage should stabilize after the application warms up (JIT/class loading settles), as it did on 1.63.2 and as it does on 1.64.0 when Datadog instrumentation is fully disabled.
Actual behavior
Metaspace (jvm.gc.metaspace_size) grows continuously and roughly linearly for the life of the process. Example from one affected pod:
15:00 — Metaspace: ~110 MB
06:00 next day — Metaspace: ~200 MB
Growth does not plateau; left running, the process eventually hits the configured Metaspace limit and OOMs. This started the same day we rolled out a new image built against 1.64.0 — no other code or config changes shipped alongside it.
Reproduction Code
Run a Spring Boot (Tomcat) service on Java 21 with dd-java-agent 1.64.0 and the configuration above (in particular DD_APPSEC_SCA_ENABLED=true).
Let it run under normal traffic for several hours while monitoring jvm.gc.metaspace_size (or jcmd VM.metaspace / a JFR/heap capture).
Observe continuous, non-plateauing Metaspace growth until the container is OOM-killed (roughly within 24h in our environment, depending on Metaspace limit and traffic).
- Ngôn ngữ chính
- Java
- Star
- 737
- Fork
- 361
- Merge trung bình
- 3 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 173
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DataDog/dd-trace-java
-
type: feature request
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 70/100
DataDog/dd-trace-java#10245 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 62/100
DataDog/dd-trace-java#12608 ·
-
type: bug report
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
DataDog/dd-trace-java#12597 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
DataDog/dd-trace-java#12540 · 4 bình luận · 1 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
DataDog/dd-trace-java#12480 ·
Tất cả issue của DataDog/dd-trace-java
Issue tương tự
-
certification
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Đang mởbug ecr
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Needs: Triage Type: Feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
github/copilot-sdk#2760 ·