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

Memory leak when doing deploy/undeploy app using REST and JPA

    XMLWordPrintable

Details

    • Hide
      1. decrease metaspace in EAP - e.g. -XX:MetaspaceSize=1M -XX:MaxMetaspaceSize=100m
      2. build and deploy attached app
      3. get http://localhost:8080/memoryLeak/webresources/user
      4. undeploy
      5. repeat from step 2 until OOM occurs
      Show
      decrease metaspace in EAP - e.g. -XX:MetaspaceSize=1M -XX:MaxMetaspaceSize=100m build and deploy attached app get http://localhost:8080/memoryLeak/webresources/user undeploy repeat from step 2 until OOM occurs

    Description

      It seems that exposing some type (ApplicationUser in attached app) which has enum type as attribute via REST api could cause memory leak (See steps to reproduce). You can observe that person.joey.test.UserType instances are kept in memory when GC happens (metaspace exceeds) and the path to GC root looks:

      Note that this map https://github.com/FasterXML/jackson-databind/blob/jackson-databind-2.7.4/src/main/java/com/fasterxml/jackson/databind/util/ClassUtil.java#L366 was not available in 2.5.4 version used in WF 10.0.0.Final

      Attachments

        1. gc_path.png
          gc_path.png
          112 kB
        2. mem-leak.zip
          118 kB

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              tremes1@redhat.com Tomas Remes
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: