You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2014/10/31 14:02:33 UTC
[jira] [Comment Edited] (TAP5-2411) Tapestry webapp leaks a
ThreadLocal
[ https://issues.apache.org/jira/browse/TAP5-2411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14191747#comment-14191747 ]
Jochen Kemnade edited comment on TAP5-2411 at 10/31/14 1:02 PM:
----------------------------------------------------------------
Alright, the key is the id/index of the value in the perthread map. So it's probably {{org.apache.tapestry5.ioc.internal.ServiceActivityTrackerImpl}} as that's the only spot that uses a {{PerThreadValue<Status>}}. Could it be the registry startup? Should we call {{registry.cleanupThread()}} at the end of {{TapestryFilter.init(FilterConfig)}}?
was (Author: jkemnade):
Alright, the key is the key of the value in the perthread map. So it's probably {{org.apache.tapestry5.ioc.internal.ServiceActivityTrackerImpl}} as that's the only spot that uses a {{PerThreadValue<Status>}}. Could it be the registry startup? Should we call {{registry.cleanupThread()}} at the end of {{TapestryFilter.init(FilterConfig)}}?
> Tapestry webapp leaks a ThreadLocal
> -----------------------------------
>
> Key: TAP5-2411
> URL: https://issues.apache.org/jira/browse/TAP5-2411
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-ioc
> Affects Versions: 5.4
> Reporter: Jochen Kemnade
>
> When re-deploying a Tapestry webapp in a Tomcat container, I often see a warning like this:
> {noformat}
> 21-Oct-2014 12:03:37.349 SEVERE [http-nio-9280-exec-14] org.apache.catalina.loader.WebappClassLoader.checkThreadLocalMapForLeaks The web application [/webapp] created a ThreadLocal with key of type [org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl.
> MapHolder] (value [org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl$MapHolder@55d6dc57]) and a value of type [java.util.HashMap] (value [{1=DEFINED, 2=DEFINED, 3=DEFINED, 4=DEFINED, 5=DEFINED, 6=DEFINED, 7=DEFINED, 8=DEFINED, 9=DEFINED, 10=DEFINED,
> 11=DEFINED, 12=DEFINED, 13=DEFINED}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
> {noformat}
> I'm not yet sure where this comes from. It looks like a {{Map<Number, org.apache.tapestry5.ioc.services.Status>}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)