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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 11.0.0.Alpha1
    • 10.1.0.Final
    • REST, XML Frameworks
    • None
    • 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

      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

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

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

                Created:
                Updated:
                Resolved: