I should also mention, that I have an open bug report on Resin 4.0.27 
which seems to cause classloader leaks.
http://bugs.caucho.com/view.php?id=5010

In pretty much every heap dump I analyze for ZombieClassLoaderMarker 
these days, com.caucho.config.inject.InjectManager turns up somewhere in 
the path to root. Not sure if it will fix all the problems, but it sure 
would be interesting to try a Resin version without this issue.

P.S. I did some experimenting with Resin Pro vs Open Source today, and 
on both found some strange paths leading to "<JNI Local> 
com.caucho.env.thread2.ResinThread2". Disabling JNI (on Windows, 
removing resin_os.dll) seemed to postpone the crash (which again 
included InjectManager) substantially. Not enought statistics to draw 
conclustions, but there *may* be something fishy about the JNI 
connection under Windows.

</Mattias>

----- Original Message -----
Subject: Re: [Resin-interest] Out of PermGen space
Date: Wed, 25 Apr 2012 15:04:53 -0700
From: Rick Mann <rm...@latencyzero.com>

Thanks, Mattias, that's cool!

-- 
Rick

On Apr 24, 2012, at 22:17 , Mattias Jiderhamn wrote:

 > Hi Rick.
 >
 > After having had these issues for years, I started blogging about it 
and how to find classloader leaks [1]. I also compiled a list of API 
calls and third party libraries known to trigger these leaks [2], and as 
you can see, it is quite common both to cause these problems yourself 
and to have them caused by some dependency.
 >
 > Having done the research, I ended up creating a small library that 
you can add to you web application, that will clean up strong references 
keeping your classloader from being garbage collected [3]. Somewhat like 
Tomcat has built in, but taking care of more of the known problems. I 
suggest you add this library to you app and watch the logs (feel free to 
report your findings).
 >
 > Having said that, I should admit that I'm still seeing PermGen 
crashes running under Resin, even when there are no visible strong 
references to my classloader. I have not had time to investigate whether 
this is caused by Resin (such as the HotSwap capability), or if it is 
some JVM bug (and possibly something with IntelliJ, as the problem 
increases using the IntelliJ Resin plugin). I should probably try 
turning HotSwap off, or try another application server - or another JVM. 
Someday...
 >
 > Good luck!
 >
 > </Mattias>
 >
 > 1: 
http://java.jiderhamn.se/2011/12/11/classloader-leaks-i-how-to-find-classloader-leaks-with-eclipse-memory-analyser-mat/
 > 2: 
http://java.jiderhamn.se/2012/02/26/classloader-leaks-v-common-mistakes-and-known-offenders/
 > 3: 
http://java.jiderhamn.se/2012/03/04/classloader-leaks-vi-this-means-war-leak-prevention-library/
 >
 >
 > ----- Original Message -----
 > Subject: [Resin-interest] Out of PermGen space
 > Date: Tue, 24 Apr 2012 13:54:40 -0700
 > From: Rick Mann <rm...@latencyzero.com>
 >
 > When I'm making changes to the code of a webapp, Resin kindly reloads 
it for me. I can usually get a handful of reloads in before Resin 
complains about being out of PermGen space.
 >
 > Is there something I'm doing wrong in my app that it leaks like this?
 >
 > --
 > Rick
 >
 >
 > _______________________________________________
 > resin-interest mailing list
 > resin-interest@caucho.com
 > http://maillist.caucho.com/mailman/listinfo/resin-interest
 >
 >
 > --
 >
 > </Mattias>
 >
 > _______________________________________________
 > resin-interest mailing list
 > resin-interest@caucho.com
 > http://maillist.caucho.com/mailman/listinfo/resin-interest


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

-- 

   </Mattias>



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to