Skip to content

generated Shared_AnnotationLiteral causes memory leak #27262

@querdenker2k

Description

@querdenker2k

Describe the bug

I wrote an application using Smallrye Fault-Tolerance.
One org.eclipse.microprofile.faulttolerance.Retry_Shared_AnnotationLiteral class (and my own interceptors there as well) is generated per webservice call and will not be removed.
This causes a memory leak.

Expected behavior

These classes should be freed up by the classloader and then garbage collected.

Actual behavior

One AnnotationLiteral per Annotation is created and left in Classloader.

How to Reproduce?

Currently i don't have a small reproducer.
I am using CXF to accept the webservice calls.
The application calls external service with the help of Smallrye Faulttolerance where i have custom annotations as well.
With each call there will be new instances of the generated AnnotationLiteral classes

Output of uname -a or ver

Linux s2140414 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "11.0.16" 2022-07-19 OpenJDK Runtime Environment GraalVM CE 21.3.3 (build 11.0.16+8-jvmci-21.3-b20) OpenJDK 64-Bit Server VM GraalVM CE 21.3.3 (build 11.0.16+8-jvmci-21.3-b20, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.11.2.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d) Maven home: /opt/maven/current Java version: 11.0.16, vendor: GraalVM Community, runtime: /opt/java/graalvm-ce-java11-21.3.3 Default locale: de_DE, platform encoding: UTF-8 OS name: "linux", version: "5.15.0-46-generic", arch: "amd64", family: "unix"

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions