You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Prakash Saraf <pp...@gmail.com> on 2018/03/05 16:42:12 UTC

Infinite loop in Poller run - Tomcat 8.5.16 with APR native 1.2.10

Hi Team,



We are observing the high CPU utilization often in our sandbox and
production environment. We are using Tomcat 8.5.16 with APR native 1.2.10.


It looks, the Poller thread is going in infinite loop while adding sockets
which are waiting to the poller.  java/org/apache/tomcat/util/
net/AprEndpoint.java
<https://github.com/apache/tomcat/commit/890e2eb275b3654a38151b95caf16a605870b49f#diff-9be40df1998776b10f47c3351f31a9b5>
-
Line#1605, within the loop, if socket wrapper is found null, code simply
continues without fetching the next SocketInfo from list (which is done in
end of while loop). This seems to throw the server in infinite loop.


Shouldn't we be pulling the next info from list? Can someone please take a
look and suggest if my understanding is correct?

Does anyone else have faced similar issue? Any pointers will be appreciated.



*Thanks,*

*Prakash Saraf*

Re: Infinite loop in Poller run - Tomcat 8.5.16 with APR native 1.2.10

Posted by Mark Thomas <ma...@apache.org>.
Please do not cross-post.

If you aren't sure where to post a question, use the users list.

Mark


On 05/03/18 16:42, Prakash Saraf wrote:
> Hi Team,
> 
> 
> 
> We are observing the high CPU utilization often in our sandbox and
> production environment. We are using Tomcat 8.5.16 with APR native 1.2.10.
> 
> 
> It looks, the Poller thread is going in infinite loop while adding sockets
> which are waiting to the poller.  java/org/apache/tomcat/util/
> net/AprEndpoint.java
> <https://github.com/apache/tomcat/commit/890e2eb275b3654a38151b95caf16a605870b49f#diff-9be40df1998776b10f47c3351f31a9b5>
> -
> Line#1605, within the loop, if socket wrapper is found null, code simply
> continues without fetching the next SocketInfo from list (which is done in
> end of while loop). This seems to throw the server in infinite loop.
> 
> 
> Shouldn't we be pulling the next info from list? Can someone please take a
> look and suggest if my understanding is correct?
> 
> Does anyone else have faced similar issue? Any pointers will be appreciated.
> 
> 
> 
> *Thanks,*
> 
> *Prakash Saraf*
> 


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


RE: Infinite loop in Poller run - Tomcat 8.5.16 with APR native 1.2.10

Posted by Prakash Saraf <Ps...@saba.com>.
Thanks Mark!!

-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Monday, March 05, 2018 1:39 PM
To: Tomcat Users List <us...@tomcat.apache.org>
Subject: Re: Infinite loop in Poller run - Tomcat 8.5.16 with APR native 1.2.10

On 05/03/18 21:29, Mark Thomas wrote:
> On 05/03/18 16:42, Prakash Saraf wrote:
>> Hi Team,
>>
>> We are observing the high CPU utilization often in our sandbox and 
>> production environment. We are using Tomcat 8.5.16 with APR native 1.2.10.
>>
>> It looks, the Poller thread is going in infinite loop while adding 
>> sockets which are waiting to the poller.  
>> java/org/apache/tomcat/util/ net/AprEndpoint.java 
>> <https://github.com/apache/tomcat/commit/890e2eb275b3654a38151b95caf1
>> 6a605870b49f#diff-9be40df1998776b10f47c3351f31a9b5>
>> -
>> Line#1605, within the loop, if socket wrapper is found null, code 
>> simply continues without fetching the next SocketInfo from list 
>> (which is done in end of while loop). This seems to throw the server in infinite loop.
>>
>>
>> Shouldn't we be pulling the next info from list? Can someone please 
>> take a look and suggest if my understanding is correct?
> 
> Yes, you are correct. I'll get that fixed shortly.

I've fixed this but unfortunately the next set of releases were tagged this morning so the fix won't be available until 9.0.7 / 8.5.30 which - unless the current releases fail for some reason - most likely won't be available until early next month.

Mark

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


Re: Infinite loop in Poller run - Tomcat 8.5.16 with APR native 1.2.10

Posted by Mark Thomas <ma...@apache.org>.
On 05/03/18 21:29, Mark Thomas wrote:
> On 05/03/18 16:42, Prakash Saraf wrote:
>> Hi Team,
>>
>> We are observing the high CPU utilization often in our sandbox and
>> production environment. We are using Tomcat 8.5.16 with APR native 1.2.10.
>>
>> It looks, the Poller thread is going in infinite loop while adding sockets
>> which are waiting to the poller.  java/org/apache/tomcat/util/
>> net/AprEndpoint.java
>> <https://github.com/apache/tomcat/commit/890e2eb275b3654a38151b95caf16a605870b49f#diff-9be40df1998776b10f47c3351f31a9b5>
>> -
>> Line#1605, within the loop, if socket wrapper is found null, code simply
>> continues without fetching the next SocketInfo from list (which is done in
>> end of while loop). This seems to throw the server in infinite loop.
>>
>>
>> Shouldn't we be pulling the next info from list? Can someone please take a
>> look and suggest if my understanding is correct?
> 
> Yes, you are correct. I'll get that fixed shortly.

I've fixed this but unfortunately the next set of releases were tagged
this morning so the fix won't be available until 9.0.7 / 8.5.30 which -
unless the current releases fail for some reason - most likely won't be
available until early next month.

Mark

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


Re: Infinite loop in Poller run - Tomcat 8.5.16 with APR native 1.2.10

Posted by Mark Thomas <ma...@apache.org>.
On 05/03/18 16:42, Prakash Saraf wrote:
> Hi Team,
> 
> We are observing the high CPU utilization often in our sandbox and
> production environment. We are using Tomcat 8.5.16 with APR native 1.2.10.
> 
> It looks, the Poller thread is going in infinite loop while adding sockets
> which are waiting to the poller.  java/org/apache/tomcat/util/
> net/AprEndpoint.java
> <https://github.com/apache/tomcat/commit/890e2eb275b3654a38151b95caf16a605870b49f#diff-9be40df1998776b10f47c3351f31a9b5>
> -
> Line#1605, within the loop, if socket wrapper is found null, code simply
> continues without fetching the next SocketInfo from list (which is done in
> end of while loop). This seems to throw the server in infinite loop.
> 
> 
> Shouldn't we be pulling the next info from list? Can someone please take a
> look and suggest if my understanding is correct?

Yes, you are correct. I'll get that fixed shortly.

Mark

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


Re: Infinite loop in Poller run - Tomcat 8.5.16 with APR native 1.2.10

Posted by Mark Thomas <ma...@apache.org>.
Please do not cross-post.

If you aren't sure where to post a question, use the users list.

Mark


On 05/03/18 16:42, Prakash Saraf wrote:
> Hi Team,
> 
> 
> 
> We are observing the high CPU utilization often in our sandbox and
> production environment. We are using Tomcat 8.5.16 with APR native 1.2.10.
> 
> 
> It looks, the Poller thread is going in infinite loop while adding sockets
> which are waiting to the poller.  java/org/apache/tomcat/util/
> net/AprEndpoint.java
> <https://github.com/apache/tomcat/commit/890e2eb275b3654a38151b95caf16a605870b49f#diff-9be40df1998776b10f47c3351f31a9b5>
> -
> Line#1605, within the loop, if socket wrapper is found null, code simply
> continues without fetching the next SocketInfo from list (which is done in
> end of while loop). This seems to throw the server in infinite loop.
> 
> 
> Shouldn't we be pulling the next info from list? Can someone please take a
> look and suggest if my understanding is correct?
> 
> Does anyone else have faced similar issue? Any pointers will be appreciated.
> 
> 
> 
> *Thanks,*
> 
> *Prakash Saraf*
> 


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