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

Hibernate session related leak on module undeployment

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Rejected
    • 11.0.0.Final, 12.0.0.Final
    • None
    • None
    • None
    • Hide

      When undeploying this project SessionFactoryImpl remains in the memory.

      It seems that problem is dependent on the several factors

      1. Module includes custom Hibernate Envers revision entity
      2. Module includes entity with embedded id
      3. Hibernate metamodule generator hibernate-jpamodelgen is included in the classpath
        If any of the above is false, leak doesn't occur.
      Show
      When undeploying this project SessionFactoryImpl remains in the memory. It seems that problem is dependent on the several factors Module includes custom Hibernate Envers revision entity Module includes entity with embedded id Hibernate metamodule generator hibernate-jpamodelgen is included in the classpath If any of the above is false, leak doesn't occur.

    Description

      In some cases it seems that removing deployment from the Wildfly, doesn't free up org.hibernate.internal.SessionFactoryImpl- instance related to the deployment. (plus some other Hibernate related classes). This can be seen by taking memory dump with VisualVM and looking up SessionFactoryImpl instances.

      This leads to cumulative memory leak in cases, where application is repeatedly deployed/undeployed (or updated).

      updated: Seems to occur on 12.0.0.Final also

      Memory dumps can be found at https://drive.google.com/drive/folders/1WbHB6hRpr_lrc4yb4yxWLpeObmJlNCzD (wildfly-leak-1 is after first deployment, wildfly-leak-2 after few re-deploys)

      server.log https://drive.google.com/file/d/1I32OTnPWeopVEtRC3ol-pjkH2dlkLizD/view?usp=sharing

      Attachments

        Activity

          People

            smarlow@redhat.com Scott Marlow
            jsyri_jira Joni Syri (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: