tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Bug that spans tomcat and tomcat-native
Date Mon, 27 Jun 2016 16:17:40 GMT
On 27/06/2016 17:04, therealneworld@gmail.com wrote:
> On Mon, Jun 27, 2016 at 11:54 AM, Rainer Jung <rainer.jung@kippdata.de> wrote:

Thanks for the feedback.

<snip/>

>> So we could probably work around the problem of the poor hashing function by
>> passing in IDs that work for hashing (pre-hashed ID?). Of course then we
>> loose the direct association of the OpenSSL thread ID with the real platform
>> thread id.
>>
>> Currently our callback in tcnative is ssl_set_thread_id() which refers to
>> ssl_thread_id(), which on Linux gets the ID from the APR function
>> apr_os_thread_current(). So we could add some hashing formula in
>> ssl_thread_id().
> 
> I think just using the real thread id would work, since now it isn't
> using the real thread id instead it is using the address location of
> errno. If this was the real thread id I think the hash algorithm and
> bucket selection they have now will work much better since the thread
> ids are basically numerically increasing and aren't aligned to powers
> of 2.

Just so you aren't surprised, I'm going to go ahead and start the 1.2.8
release without this fix.

Regarding this fix, I plan to add Rainer's suggested debug code to try
and confirm my previous analysis and then code up a fix based on the
real thread id for Nate to test. Nate, if you have enough info in this
thread to work on a patch along those lines yourself please do feel free
to go ahead and don't wait for me.

Thanks,

Mark

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


Mime
View raw message