On 04/02/2020 15:37, Manuel Dominguez Sarmiento wrote:
> Thanks Mark. I just wanted to clarify that the issue is not only present
> when the request arrives at AccessLogValve, but while the request is
> being serviced as well.
> We noticed this bug because we were getting random NullPointerExceptions
> when trying to do anything with the result from
> HttpServletRequest.getRemoteAddr() in our servlets.
> 
> Should the fix solve this as well?

It depends. The only way I can see this happening is if the application
swallows an IOException and continues. It probably won't fix that and I
don't think we'd consider an NPE an error in those circumstances.

Mark


> 
> - Manuel Dominguez Sarmiento
>> On 03/02/2020 19:24, Mark Thomas wrote:
>>
>> <snip/>
>>
>>> I haven't fixed this but I can reproduce it easily with the h2spec test
>>> suite. As I have a reproducible test case I'm hopeful I'll be able to
>>> find a fix fairly quickly.
>> I've just committed a fix. It is in:
>> - master for 10.0.0.0-M1 onwards
>> - 9.0.x for 9.0.31 onwards
>> - 8.5.x for 8.5.51 onwards
>>
>> 7.0.x was not affected.
>>
>> The issue was that by the time the AccessLogValve tried to obtain the
>> remote host/addr/port the connection had been closed and the information
>> was not available. This was a result of the change below which removed a
>> potential path for a request to see incorrect remote client information.
>>
>> This entry in the changelog:
>> <quote>
>> Decouple the socket wrapper, which is not recycled, from the NIOx
>> channel after close, and replace it with a dummy static object.
>> </quote>
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to