tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: clearReferencesThreads, Poller SunPKCS11-Solaris and strange context class loader
Date Fri, 07 May 2010 18:08:40 GMT
On 05/07/2010 08:03 AM, Rainer Jung wrote:
> On 07.05.2010 14:23, Konstantin Kolinko wrote:
>> 2010/5/7 Rainer Jung<rainer.jung@kippdata.de>:
>>> On 07.05.2010 11:00, Konstantin Kolinko wrote:
>>>>
>>>> 2010/5/7 Rainer Jung<rainer.jung@kippdata.de>:
>>>>>
>>>>> 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.
>>>>>
>>>>
>>>> TCCL is inherited from the parent thread. It means that that thread
>>>> was started either during request processing, or during webapplication
>>>> startup.
>>>
>>> But unfortunately that doesn't provide consistent results.
>>>
>>> If I sart Tomcat without any webapp (but with ROOT context) the 
>>> thread is
>>> started too. The heap dump shows the system cl as the tccl, but during
>>> restart or shutdown the leak prevention retrieves the tccl and finds 
>>> it s
>>> equal to the WebappClassLoader of the manager.
>>>
>>> I'm confused.
>>>
>>>> BTW, 4th result in
>>>> http://www.google.com/search?q=SunPKCS11+TokenPoller
>>>> gives source code for that class.
>>>
>>> I'll see, but I guess the point is more about who starts it when and 
>>> why,
>>> less about what it does.
>>>
>>
>> What is this all about, I means this PKCS11 tokens?
>> Is it something that is used in your configuration?
>
> No, not at all. There's not HTTPS connector, no keystore no nothing.
> The PKCS11 provider comes with the JDK but I'm not aware of anything 
> that uses it. Default Tomcat configuration plus log4j.
>
> It's there after JDK start with some version of the JDK. It's not 
> there if I only start a plain Java test doing only a sleep using the 
> same JDK.

well, if the app uses java.net.URL to a https, then this would make 
sense that the thread got started with the webapp's class loader

>
>> I mean, what are those "tokens" that it works with? (for a newbie)
>> Do you use JAAS?
>
> Not that I'm aware of.
>
>>  From the code, e.g.
>> SunPKCS11#uninitToken() calls
>> 1) destroyPoller()
>> 2) createPoller()
>>
>> which restarts the thread. So the one at shutdown time might be
>> different from the one that you see when Tomcat starts.
>
> Hmmm. Will dig deeper over the weekend.
>
> Regards,
>
> Rainer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message