You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/11/17 02:14:22 UTC
DO NOT REPLY [Bug 50282] New: Reference from
javax.security.auth.login.LoginContext.contextClassLoader initalized in
static code block prevents an undeployed Web application from being garbage
collected (similar to #49669)
https://issues.apache.org/bugzilla/show_bug.cgi?id=50282
Summary: Reference from
javax.security.auth.login.LoginContext.contextClassLoa
der initalized in static code block prevents an
undeployed Web application from being garbage
collected (similar to #49669)
Product: Tomcat 7
Version: 7.0.4
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: justin.almquist@pnl.gov
The class javax.security.auth.login.LoginContext has a "contextClassLoader"
field that I believe is causing a similar problem as identified in bug #49669,
which is related to the class not being garbage collected even though the
application has been undeployed.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49669
I was able to notice this by deploying a very simple spring-based webapp that
utilizes javax.security for authentication in which the LoginContext class is
used.
I then used YourKit profiler as specified in this writeup to find any lingering
classes without instances:
http://www.yourkit.com/docs/kb/class_loaders.jsp
The following class had the most instances (inside of a WebappClassLoader):
"contextClassLoader of javax.security.auth.login.Configuration [Class]"
This looks almost identical to bug #49669 with the only difference being that
the contextClassLoader field isn't static, however it is initialized in a
static code block. Thus, it looks like the solution for bug #49669 would solve
this problem as well.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50282] Reference from
javax.security.auth.login.LoginContext.contextClassLoader initalized in
static code block prevents an undeployed Web application from being garbage
collected (similar to #49669)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50282
--- Comment #3 from Konstantin Kolinko <kn...@gmail.com> 2010-11-18 19:49:56 EST ---
Is there any recipe how to reproduce this issue? (A sample webapp, and/or
configuration)?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50282] Reference from
javax.security.auth.login.LoginContext.contextClassLoader initalized in
static code block prevents an undeployed Web application from being garbage
collected (similar to #49669)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50282
sylvain.laurent@gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50282] Reference from
javax.security.auth.login.LoginContext.contextClassLoader initalized in
static code block prevents an undeployed Web application from being garbage
collected (similar to #49669)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50282
Justin Almquist <ju...@pnl.gov> changed:
What |Removed |Added
----------------------------------------------------------------------------
Platform|PC |Macintosh
OS/Version| |All
--- Comment #1 from Justin Almquist <ju...@pnl.gov> 2010-11-17 13:47:15 EST ---
I think I confused myself a little while researching this and somehow
referenced javax.security.auth.login.LoginContext when in fact I *meant*
javax.security.auth.login.Configuration. The LoginContext may be a problem as
well, however the Configuration class is what is being listed in YourKit as the
offending class causing the WebappClassloader to stick around. Once again,
here's the output of YourKit:
"contextClassLoader of javax.security.auth.login.Configuration [Class]"
Then, looking at the code for Configuration
(http://kickjava.com/src/javax/security/auth/login/Configuration.java.htm), the
following line of code is similar to the problem fixed by bug #49669
(https://issues.apache.org/bugzilla/show_bug.cgi?id=49669)
"private static ClassLoader JavaDoc contextClassLoader;"
Sorry for any confusion...
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50282] Reference from
javax.security.auth.login.LoginContext.contextClassLoader initalized in
static code block prevents an undeployed Web application from being garbage
collected (similar to #49669)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50282
--- Comment #4 from Justin Almquist <ju...@pnl.gov> 2010-11-19 16:19:34 EST ---
I don't have a sample webapp, however this article describes exactly how we
setup our authentication mechanism using JAAS:
http://download.oracle.com/javase/1.4.2/docs/guide/security/jgss/tutorials/AcnOnly.html
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50282] Reference from
javax.security.auth.login.LoginContext.contextClassLoader initalized in
static code block prevents an undeployed Web application from being garbage
collected (similar to #49669)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50282
--- Comment #5 from Sylvain Laurent <sy...@gmail.com> 2010-12-03 17:21:17 EST ---
patch applied on trunk, will be available for tomcat 7.0.6
Backport to tomcat 6 proposed.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50282] Reference from
javax.security.auth.login.LoginContext.contextClassLoader initalized in
static code block prevents an undeployed Web application from being garbage
collected (similar to #49669)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50282
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #6 from Mark Thomas <ma...@apache.org> 2011-01-08 14:24:12 EST ---
Applied to 6.0.x and will be included in 6.0.30 onwards.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 50282] Reference from
javax.security.auth.login.LoginContext.contextClassLoader initalized in
static code block prevents an undeployed Web application from being garbage
collected (similar to #49669)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50282
--- Comment #2 from sylvain.laurent@gmail.com 2010-11-18 16:53:47 EST ---
Created an attachment (id=26309)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=26309)
patch for tc 7
Here is a patch for tc 7. It just loads the faulty class in the
JreMemoryLeakPreventionListener:
Class.forName("javax.security.auth.login.Configuration", true,
ClassLoader.getSystemClassLoader());
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org