Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-14094

Potential memory leak when using opentracing

    XMLWordPrintable

Details

    • Hide
      Show
      Use the application provided here:  https://github.com/erard22/wildfly-memory-leak Build it using maven: mvn package Deploy it to the wildfly of your choice Fire some requests: mvn gatling:test Check Heap
    • Undefined
    • ---
    • ---

    Description

      Depending on the CDI/EJB scope the usage together with opentracing can end up in a memory leak.

      Here I did a little sample project to simulate the issue: 

      https://github.com/erard22/wildfly-memory-leak

      Requests handeled by this class

      @ApplicationScoped
      @Traced
      public class HelloWorldService {
      
          public String sayHello() {
              return "Hello World!";
          }
      } 

      leave an instance of class org.jboss.weld.contexts.CreationalContextImpl back on the heap.

      Also when using @Stateless. It disapears when you change to @Dependent. I did some tests with different versions. It seems the issue was introduced with wildfly-19. Before it worked. I also did it with EAP. There it was fine with 7.3.0 but is now present in 7.3.3.

       

       

      Attachments

        1. bad_heapdump.png
          39 kB
          Michel Erard
        2. good_heapdump.png
          43 kB
          Michel Erard
        3. image-2020-11-23-11-59-50-907.png
          32 kB
          Roland Spindelbalker-Davila

        Issue Links

          Activity

            People

              manovotn Matěj Novotný
              michel.erard@gmail.com Michel Erard (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: