[hibernate-dev] report of a WildFly memory leak that may come from hibernate service loader...

Brett Meyer brmeyer at redhat.com
Wed Jul 24 11:17:39 EDT 2013


Thinking through hibernate-osgi cleanup in general in https://hibernate.atlassian.net/browse/HHH-8378

----- Original Message -----
From: "Brett Meyer" <brmeyer at redhat.com>
To: "Steve Ebersole" <steve at hibernate.org>
Cc: "Scott Marlow" <smarlow at redhat.com>, "hibernate-dev" <hibernate-dev at lists.jboss.org>
Sent: Wednesday, July 24, 2013 11:13:04 AM
Subject: Re: [hibernate-dev] report of a WildFly memory leak that may come from hibernate service loader...

In hibernate-osgi, one area that should be cleaned up is the static ClassLoaderHelper#overridenClassLoader (used in #withTccl, etc.) -- that's not currently nulled-out when the hibernate-osgi bundle is deactivated.  Other than that, I only use BootstrapServiceRegistryBuilder#with to add the OsgiClassLoader.

----- Original Message -----
From: "Steve Ebersole" <steve at hibernate.org>
To: "Scott Marlow" <smarlow at redhat.com>
Cc: "hibernate-dev" <hibernate-dev at lists.jboss.org>
Sent: Monday, July 15, 2013 2:53:40 PM
Subject: Re: [hibernate-dev] report of a WildFly memory leak that may come from hibernate service loader...

My guess would be that the service registry is not being released.  Let me
look...

Brett, that makes me wonder if we ever properly deal with releasing the
OSGi classloader stuff...
 http://lists.jboss.org/pipermail/wildfly-dev/2013-July/000466.html
contains the details about deployment level classes are leaking (CDI
beanmanager passed into deployment, bean validation factory, others...).

In WildFly 8, We do have a
META-INF/services/org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformProvider

file that contains org.jboss.as.jpa.hibernate4.DefaultJtaPlatform

The org.jboss.as.jpa.hibernate4.DefaultJtaPlatform is a system module
class but could also be an application deployment class.

Question:  Do we have a way to unload services that have been loaded
when the original classloader (deployment) is no longer needed (e.g.
when SessionFactory is closed)?

I'm not sure that would help for the leak that I am reproducing which
could be a different problem.

By the way, this is with Hibernate ORM 4.3.0.Beta3.

Scott
_______________________________________________
hibernate-dev mailing list
hibernate-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev
_______________________________________________
hibernate-dev mailing list
hibernate-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


More information about the hibernate-dev mailing list