[jboss-jira] [JBoss JIRA] (JGRP-1675) Threads stuck in FlowControl.decrementIfEnoughCredits

Dan Berindei (JIRA) jira-events at lists.jboss.org
Thu Oct 17 16:11:02 EDT 2013


    [ https://issues.jboss.org/browse/JGRP-1675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12823031#comment-12823031 ] 

Dan Berindei commented on JGRP-1675:
------------------------------------

I have a test that hangs reliably on my machine with 3.4.0.Final: https://github.com/danberindei/infinispan/blob/73ca65f9b629698da68916c720ec4efa0d97e2b4/core/src/test/java/org/infinispan/stress/RemoteGetStressTest.java

The test is using Infinispan, but it should be pretty easy to replicate it with JGroups only if necessary. This is what it does:
* Populate a distributed cache with huge values (100kb), making sure the coordinator doesn't own any entries.
* Launch 500 remote get operations in parallel from a single node, resulting in 1500 response messages (numOwners is 3).
* Slow down the processing of response messages by adding a {{Thread.sleep(Random.nextInt(10))}} to keep the OOB threads busy.

Interesting enough, with max_credits=1m and min_threshold=0.40, the FC logs always show at least 390k remaining credits. Yet the remote get operations still time out after 60 seconds, and the OOB threads on most nodes are stuck in {{FlowControl.decrementIfEnoughCredits()}}.
                
> Threads stuck in FlowControl.decrementIfEnoughCredits
> -----------------------------------------------------
>
>                 Key: JGRP-1675
>                 URL: https://issues.jboss.org/browse/JGRP-1675
>             Project: JGroups
>          Issue Type: Bug
>    Affects Versions: 3.4
>            Reporter: Radim Vansa
>            Assignee: Bela Ban
>             Fix For: 3.4
>
>
> I have recently observed a repeated situation where many (or all) threads have been stuck waiting for credits in FlowControl protocol.
> The credit request was not handled on the other node as this is non-oob message and some (actually many of them - cause unknown) messages before the request have been lost - therefore the request was waiting for them to be re-sent.
> However, these have not been re-sent properly as the retransmission request was not received - all OOB threads were stuck in the FlowControl protocol as these handled some other request and tried to send a response - but the response could not be sent until FlowControl gets the credits.
> The probability of such situation could be lowered by tagging the credit request to be OOB - then it would be handled immediately. If the credit replenish message would then be processed in regular OOB pool, this could get already depleted by many requests, but setting up the internal thread pool would solve the problem.
> Other consideration would be to allow releasing thread from FlowControl (let it send the message even without credits) if it waits there for too long.
> h3. Workaround
> It appears that setting MFC and UFC max_credits to 10M or removing these protocols at all is a workaround for this issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list