WFLY-7728 Increased Memory footprint in recent builds #9476

Merged
merged 1 commit into from Dec 16, 2016

Projects

None yet

3 participants

@ctomc
Member
ctomc commented Dec 13, 2016 edited
  • fix memory leaks in testsuite
  • fix memory leak when using expression language in non web deployments
@@ -46,6 +48,7 @@ public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentU
@Override
public void undeploy(final DeploymentUnit context) {
-
+ final Module module = context.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE);
+ FactoryFinderCache.clearClassLoader(module.getClassLoader());
@ctomc
ctomc Dec 13, 2016 Member

@stuartwdouglas wdyt about this?

We already have similar cache clear for web deployments, but in case of bean validation EL can also get used and as such expression language factories loaded and classloaders cached.

I am not really sure this is the right place for such fix.

@stuartwdouglas
stuartwdouglas Dec 13, 2016 Contributor

This methods is already called in org.wildfly.extension.undertow.deployment.UndertowDeploymentService#stopContext

@stuartwdouglas
stuartwdouglas Dec 13, 2016 Contributor

Sorry, I did not notice that you already mentioned that. I think calling it here is fine however you should remove the call in stopContext, as there is no need to clear it twice.

@ctomc
ctomc Dec 14, 2016 Member

ok, tnx.

@ctomc
ctomc Dec 14, 2016 Member

ah now I see the confusion, EL can get used by HV and similar also in non web deployments, in cases like that we don't clean after ourselfs.
I updated PR to remove cleanup in undertow subsystem as well.

@ctomc ctomc changed the title from [do not merge] WFLY-7728 Increased Memory footprint in recent builds to WFLY-7728 Increased Memory footprint in recent builds Dec 14, 2016
@ctomc ctomc JBEAP-6731 reduce memory usage of testsuite
 - fix potential classloader leak when using EL in non web deployment
fc93a28
@kabir
Contributor
kabir commented Dec 16, 2016

Retest this please

@kabir kabir merged commit 9e648dc into wildfly:master Dec 16, 2016

3 checks passed

Linux Finished TeamCity Build WildFly :: Pull Request :: Linux : Tests passed: 3633, ignored: 110
Details
Linux with security manager Finished TeamCity Build WildFly :: Pull Request :: Linux SM : Tests passed: 1095, ignored: 45
Details
Windows Finished TeamCity Build WildFly :: Pull Request :: Windows : Tests passed: 3614, ignored: 112
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment