You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by fl...@arcor.de on 2016/10/15 21:40:57 UTC

Was bug 58646 (NullPointerException in InternalNioOutputBuffer) also fixed for 8.5.5?

Hello!
Some days ago we stumpled about a problem which looks at least very similar to this one:
https://bz.apache.org/bugzilla//show_bug.cgi?id=58646

With tomcat 8.5.5 we saw a lot of these Exceptions after some time with real users on the platform:

org.apache.catalina.connector.CoyoteAdapter.checkRecycled Encountered a non-recycled response and recycled it forcedly.
org.apache.catalina.connector.CoyoteAdapter$RecycleRequiredException

We couldn't find a way to reproduce the error, but with downgrade to tomcat 8.0.38 they never happened again. 

I wonder if this bug was fixed for tomcat 8.5.x as well or only for 7.0.x and 8.0.x? 

I guess the fixed method from tomcat 8.0.32 to 8.0.33 was:
org.apache.coyote.http11.Http11NioProcessor.breakKeepAliveLoop(SocketWrapperBase<NioChannel> socketWrapper)

which is now in 8.5.5:
org.apache.coyote.http11.Http11NioProcessor.breakKeepAliveLoop(SocketWrapper<?> socketWrapper) 

The content of the method from 8.0.32 and 8.5.5 is the same. So I would assume this bug is still open in 8.5.5.

Thank you very much!

Best regards
Florian

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


Re: Aw: Re: Was bug 58646 (NullPointerException in InternalNioOutputBuffer) also fixed for 8.5.5?

Posted by Andrew Garland <an...@sunbirddcim.com>.
Mark,

FYI I created https://bz.apache.org/bugzilla/show_bug.cgi?id=60918 which is
a bug report for 8.5.11 with similar characteristics to the one reported in
bug 58646 



--
View this message in context: http://tomcat.10.x6.nabble.com/Was-bug-58646-NullPointerException-in-InternalNioOutputBuffer-also-fixed-for-8-5-5-tp5056250p5061726.html
Sent from the Tomcat - User mailing list archive at Nabble.com.

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


Re: Aw: Re: Was bug 58646 (NullPointerException in InternalNioOutputBuffer) also fixed for 8.5.5?

Posted by Mark Thomas <ma...@apache.org>.
On 16/10/2016 14:07, flea@arcor.de wrote:
> Hello Mark!
> Thank you very much! This helps! I think there is nothing we do with request/response objects after their lifetime but we will double check it! If we find a way to reproduce it and it looks like a tomcat bug I will open a bug ticket.
> Best regards
> Florian

Perfect. Many thanks.

Mark


> 
>> On 15/10/2016 22:40, flea@arcor.de wrote:
>>> Hello!
>>> Some days ago we stumpled about a problem which looks at least very
>> similar to this one:
>>> https://bz.apache.org/bugzilla//show_bug.cgi?id=58646
>>>
>>> With tomcat 8.5.5 we saw a lot of these Exceptions after some time with
>> real users on the platform:
>>>
>>> org.apache.catalina.connector.CoyoteAdapter.checkRecycled Encountered a
>> non-recycled response and recycled it forcedly.
>>> org.apache.catalina.connector.CoyoteAdapter$RecycleRequiredException
>>>
>>> We couldn't find a way to reproduce the error, but with downgrade to
>> tomcat 8.0.38 they never happened again. 
>>>
>>> I wonder if this bug was fixed for tomcat 8.5.x as well or only for 7.0.x
>> and 8.0.x?
>>
>> It was fixed for 9.0.x (trunk) and 8.5.x.
>>
>>> I guess the fixed method from tomcat 8.0.32 to 8.0.33 was:
>>>
>> org.apache.coyote.http11.Http11NioProcessor.breakKeepAliveLoop(SocketWrapper
>> Base<NioChannel> socketWrapper)
>>
>> Nope.
>>
>> The bug was in NioEndpoint$Poller.processSendfile()
>>
>>> which is now in 8.5.5:
>>>
>> org.apache.coyote.http11.Http11NioProcessor.breakKeepAliveLoop(SocketWrapper
>> <?> socketWrapper) 
>>>
>>> The content of the method from 8.0.32 and 8.5.5 is the same. So I would
>> assume this bug is still open in 8.5.5.
>>
>> That assumption is incorrect.
>>
>> This was the 8.0.x fix:
>> http://svn.apache.org/viewvc?view=revision&revision=1731093
>>
>> The refactoring in trunk (later copied into 8.5.x) fixed this error a
>> month or so before that.
>>
>> It is possible that what you are seeing is a Tomcat bug. It is more
>> likely that the changes in 8.5.x have exposed a timing sensitive bug in
>> your application or a library it uses. The typical cause is a component
>> retaining a reference to the request or response object beyond the
>> lifetime of a single request. Tomcat reuses these objects internally and
>> retained references will cause these sorts of errors. You can try
>> setting the system property
>> org.apache.catalina.connector.RECYCLE_FACADES to true.
>>
>> Mark
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


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


Aw: Re: Was bug 58646 (NullPointerException in InternalNioOutputBuffer) also fixed for 8.5.5?

Posted by fl...@arcor.de.
Hello Mark!
Thank you very much! This helps! I think there is nothing we do with request/response objects after their lifetime but we will double check it! If we find a way to reproduce it and it looks like a tomcat bug I will open a bug ticket.
Best regards
Florian

> On 15/10/2016 22:40, flea@arcor.de wrote:
> > Hello!
> > Some days ago we stumpled about a problem which looks at least very
> similar to this one:
> > https://bz.apache.org/bugzilla//show_bug.cgi?id=58646
> > 
> > With tomcat 8.5.5 we saw a lot of these Exceptions after some time with
> real users on the platform:
> > 
> > org.apache.catalina.connector.CoyoteAdapter.checkRecycled Encountered a
> non-recycled response and recycled it forcedly.
> > org.apache.catalina.connector.CoyoteAdapter$RecycleRequiredException
> > 
> > We couldn't find a way to reproduce the error, but with downgrade to
> tomcat 8.0.38 they never happened again. 
> > 
> > I wonder if this bug was fixed for tomcat 8.5.x as well or only for 7.0.x
> and 8.0.x?
> 
> It was fixed for 9.0.x (trunk) and 8.5.x.
> 
> > I guess the fixed method from tomcat 8.0.32 to 8.0.33 was:
> >
> org.apache.coyote.http11.Http11NioProcessor.breakKeepAliveLoop(SocketWrapper
> Base<NioChannel> socketWrapper)
> 
> Nope.
> 
> The bug was in NioEndpoint$Poller.processSendfile()
> 
> > which is now in 8.5.5:
> >
> org.apache.coyote.http11.Http11NioProcessor.breakKeepAliveLoop(SocketWrapper
> <?> socketWrapper) 
> > 
> > The content of the method from 8.0.32 and 8.5.5 is the same. So I would
> assume this bug is still open in 8.5.5.
> 
> That assumption is incorrect.
> 
> This was the 8.0.x fix:
> http://svn.apache.org/viewvc?view=revision&revision=1731093
> 
> The refactoring in trunk (later copied into 8.5.x) fixed this error a
> month or so before that.
> 
> It is possible that what you are seeing is a Tomcat bug. It is more
> likely that the changes in 8.5.x have exposed a timing sensitive bug in
> your application or a library it uses. The typical cause is a component
> retaining a reference to the request or response object beyond the
> lifetime of a single request. Tomcat reuses these objects internally and
> retained references will cause these sorts of errors. You can try
> setting the system property
> org.apache.catalina.connector.RECYCLE_FACADES to true.
> 
> Mark
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

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


Re: Was bug 58646 (NullPointerException in InternalNioOutputBuffer) also fixed for 8.5.5?

Posted by Mark Thomas <ma...@apache.org>.
On 15/10/2016 22:40, flea@arcor.de wrote:
> Hello!
> Some days ago we stumpled about a problem which looks at least very similar to this one:
> https://bz.apache.org/bugzilla//show_bug.cgi?id=58646
> 
> With tomcat 8.5.5 we saw a lot of these Exceptions after some time with real users on the platform:
> 
> org.apache.catalina.connector.CoyoteAdapter.checkRecycled Encountered a non-recycled response and recycled it forcedly.
> org.apache.catalina.connector.CoyoteAdapter$RecycleRequiredException
> 
> We couldn't find a way to reproduce the error, but with downgrade to tomcat 8.0.38 they never happened again. 
> 
> I wonder if this bug was fixed for tomcat 8.5.x as well or only for 7.0.x and 8.0.x?

It was fixed for 9.0.x (trunk) and 8.5.x.

> I guess the fixed method from tomcat 8.0.32 to 8.0.33 was:
> org.apache.coyote.http11.Http11NioProcessor.breakKeepAliveLoop(SocketWrapperBase<NioChannel> socketWrapper)

Nope.

The bug was in NioEndpoint$Poller.processSendfile()

> which is now in 8.5.5:
> org.apache.coyote.http11.Http11NioProcessor.breakKeepAliveLoop(SocketWrapper<?> socketWrapper) 
> 
> The content of the method from 8.0.32 and 8.5.5 is the same. So I would assume this bug is still open in 8.5.5.

That assumption is incorrect.

This was the 8.0.x fix:
http://svn.apache.org/viewvc?view=revision&revision=1731093

The refactoring in trunk (later copied into 8.5.x) fixed this error a
month or so before that.

It is possible that what you are seeing is a Tomcat bug. It is more
likely that the changes in 8.5.x have exposed a timing sensitive bug in
your application or a library it uses. The typical cause is a component
retaining a reference to the request or response object beyond the
lifetime of a single request. Tomcat reuses these objects internally and
retained references will cause these sorts of errors. You can try
setting the system property
org.apache.catalina.connector.RECYCLE_FACADES to true.

Mark


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