Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 50493 invoked from network); 7 May 2010 05:02:53 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 May 2010 05:02:53 -0000 Received: (qmail 27488 invoked by uid 500); 7 May 2010 05:02:52 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 27306 invoked by uid 500); 7 May 2010 05:02:52 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 27297 invoked by uid 99); 7 May 2010 05:02:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 05:02:51 +0000 X-ASF-Spam-Status: No, hits=-3.8 required=10.0 tests=AWL,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rainer.jung@kippdata.de designates 195.227.30.149 as permitted sender) Received: from [195.227.30.149] (HELO mailserver.kippdata.de) (195.227.30.149) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 05:02:44 +0000 Received: from [195.227.30.209] (notebook-rj [195.227.30.209]) by mailserver.kippdata.de (8.13.5/8.13.5) with ESMTP id o4752Lcr025691 for ; Fri, 7 May 2010 07:02:22 +0200 (CEST) Message-ID: <4BE39ED8.6050001@kippdata.de> Date: Fri, 07 May 2010 07:02:16 +0200 From: Rainer Jung User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: clearReferencesThreads, Poller SunPKCS11-Solaris and strange context class loader References: <4BE30FAA.1040607@kippdata.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit On 06.05.2010 23:24, Sylvain Laurent wrote: > When you analyzed the heap dump, what path to GC roots was retaining the classloader in memory ? I did the heap dump before the context restart. Note: I don't want to debug a memory leak. I'm wondering why the PCKS Token Poller thread was captured by the leak prevention. Since we know the code, it was because its context class loader was equal to the WebappClassLoader of /manager. That's what I don't understand. See my original post. Regards, Rainer > On 6 mai 2010, at 20:51, Rainer Jung wrote: > >> While doing some testing with 6.0.26 I noticed, that when shutting it down it logs an error about thread "Poller SunPKCS11-Solaris" not being stopped. When I add the more explicit logging from tc6 trunk, it says the thread was started by /manager. >> >> The thread sits in >> >> java.lang.Thread.State: TIMED_WAITING (sleeping) >> at java.lang.Thread.sleep(Native Method) >> at sun.security.pkcs11.SunPKCS11$TokenPoller.run(SunPKCS11.java:681) >> at java.lang.Thread.run(Thread.java:619) >> >> and is started for some version of the JDK (noted on Solaris for e.g. 1.5.0_22 and 1.6.0_3, not for 1.6.0_17) even without having anything related to keystores, https or similar configured in Tomcat (default config). The only non-default is using Log4J instead of Juli. >> >> What is strange, is that the check whether the context class loader of the thread is equal to the WebappClassLoader of the context to unload passes. I added an additional output by explicitely printing the contextName of the two loaders and in fact both print "/manager". >> >> When deploying two instances of the manager and reloading the original instance with the additional one, I get the same warning. >> >> In a heap dump, it seems the context class loader of the thread is the system class loader and not of type WebappClassLoader. Any idea, why the context class loader test fails? Is there any reason why the context class loader of the thread might change when doing the manager reload or shutdown? >> >> Regards, >> >> Rainer >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org