[MAGNOLIA-4065] Severe warning about potential memory leak in Guice when shutting down tomcat Created: 16/Feb/12  Updated: 04/Mar/19  Resolved: 24/Jun/16

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 5.3, 5.4
Fix Version/s: 5.5

Type: Bug Priority: Neutral
Reporter: Daniel Lipp Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: 5d
Time Spent: Not Specified
Original Estimate: 5d

Attachments: Text File catalina.5.4.8-SNAPSHOT.log     Text File catalina.5.5-SNAPSHOT.log    
Issue Links:
relation
is related to MAGNOLIA-6337 Upgrade to Google Guice 4.0 Closed
is related to MGNLCE-43 Upgrade to Tomcat 8 Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Saigon 49
Story Points: 5

 Description   

When shutting down the ee-bundle (4.5 b6) running with tomcat (6 or 7) we get the lot of severe warnings like:
Feb 16, 2012 7:24:39 AM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [/magnoliaPublic] created a ThreadLocal with key of type [com.google.inject.internal.InjectorImpl$1] (value [com.google.inject.internal.InjectorImpl$1@68c4ecf8]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@4ef96dc3]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.



 Comments   
Comment by Daniel Lipp [ 16/Feb/12 ]

This is a known issue when using guice together with tomcat so I decreased priority: http://stackoverflow.com/questions/6025089/guice-tomcat-potential-memory-leak

Comment by Jan Haderka [ 20/Jun/12 ]

The related guice issues:
http://code.google.com/p/google-guice/issues/detail?id=630
http://code.google.com/p/google-guice/issues/detail?id=288
specially: http://code.google.com/p/google-guice/issues/detail?id=288#c82

Comment by Tobias Mattsson [ 03/Dec/13 ]

Word from the Guice team is this is improved in Guice 4 thanks to it using Guava 10. Guice 4 is currently in beta.

Comment by Richard Gange [ 26/May/16 ]

Per DEV-132 this issue can be closed. Magnolia 5.4 currently uses Guava 18. When we combined that with Guice 4 in Magnolia 5.5 it should be fixed.

Comment by Sang Ngo Huu [ 23/Jun/16 ]

Guice's problem is not occured on 5.5-SNAPSHOT version, but still in 5.4.8-SNAPSHOT, please see log file catalina.5.4.8-SNAPSHOT.log catalina.5.5-SNAPSHOT.log

Comment by Mikaël Geljić [ 24/Jun/16 ]

Thanks sang.ngo for confirming.

The Jackrabbit session close issue is a known one, see MAGNOLIA-4005 and https://issues.apache.org/jira/browse/JCR-3246

I'll close this one then.

Generated at Mon Feb 12 03:52:19 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.