payara / Payara

Payara Server is an open source middleware platform that supports reliable and secure deployments of Java EE (Jakarta EE) and MicroProfile applications in any environment: on premise, in the cloud or hybrid.
http://www.payara.fish
Other
883 stars 306 forks source link

Bug Report: Memory leak when using Jersey client #7054

Open albanf opened 1 week ago

albanf commented 1 week ago

Brief Summary

When using Jersey and Jackson to deserialize XML, any change to the configuration of the WebTarget causes a memory leak.

I suspect this was caused by FISH-6432 Applications Take Longer To Deploy on JDK 17) (https://github.com/payara/patched-src-hk2/compare/3.0.1.payara-p1...3.0.1.payara-p2), since it works with prior versions (as well as HK2 3.0.3, before 3.0.4 that includes the same patch).

Also posted in Jersey and HK2 projects: https://github.com/eclipse-ee4j/jersey/issues/5796, https://github.com/eclipse-ee4j/glassfish-hk2/issues/1126.

Expected Outcome

Resources are cleaned up as expected

Current Outcome

Resources are not cleaned up

Reproducer

Here is a sample project to reproduce the issue. I tested with several versions of Jersey/HK2, including the ones used in Payara 6.2024.10 (Jersey 3.1.7.payara-p1 and HK2 3.0.1.payara-p4) jersey-memory-leak.zip

Operating System

Ubuntu

JDK Version

Temurin 21.0.1

Payara Distribution

Payara Server Full Profile

skipper4 commented 1 week ago

@albanf Thanks for reporting this. Allow us time to reproduce this and revert with feedback.

skipper4 commented 5 days ago

Hello @albanf,

I was able to reproduce the issue and I have escalated this to the platform development team as Jira task FISH-10150

Thank you for the report.