You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/01/03 10:06:58 UTC

[jira] [Commented] (ARTEMIS-908) AMQP flow control misses unblock during heavy load

    [ https://issues.apache.org/jira/browse/ARTEMIS-908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15794676#comment-15794676 ] 

ASF GitHub Bot commented on ARTEMIS-908:
----------------------------------------

GitHub user lulf opened a pull request:

    https://github.com/apache/activemq-artemis/pull/947

    ARTEMIS-908: Hold connection lock when issuing credits

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/EnMasseProject/activemq-artemis ARTEMIS-908

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/947.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #947
    
----
commit cf7040f219f316e7c2222b2a6c7b770e3cf5f7b1
Author: Ulf Lilleengen <lu...@redhat.com>
Date:   2017-01-03T10:03:38Z

    ARTEMIS-908: Hold connection lock when issuing credits

----


> AMQP flow control misses unblock during heavy load
> --------------------------------------------------
>
>                 Key: ARTEMIS-908
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-908
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: AMQP
>            Reporter: Ulf Lilleengen
>
> I have a benchmarking setup with 1 sender and 1 receiver attached to a broker. The broker is configured with BLOCK policy when queue is full, and I've deliberately set a low global-max-size to trigger this bug.
> While sending messages, I get tons of these in the Artemis log, due to the flow control kicking in:
> 10:46:53,673 WARN  [org.apache.activemq.artemis.core.server] AMQ222183: Blocking message production on address 'myqueue'; size is currently: 105,456 bytes; max-size-bytes: -1
> 10:46:53,674 INFO  [org.apache.activemq.artemis.core.server] AMQ221046: Unblocking message production on address 'myqueue'; size is currently: 105,456 bytes; max-size-bytes: -1
> However, usually after running the test for 10-30 seconds, the sender is suddenly never unblocked and I have to restart the sender to send more messages. Every time I attach the sender, I am able to send messages for 10~30 seconds until it stops. 
> This happens with different clients, and triggers only if it can send messages really fast.
> After inspecting the flow control logic in the AMQP implementation, I noticed that there is a missing synchronized block when issuing credits in AMQPSessionCallback#offerProducerCredit, which is present in ProtonServerReceiverContext#flow (if sessionSPI is null).
> Adding a synchronized block with the connection lock to the function passed to store.checkMemory() in AMQPSessionCallback#offerProducerCredit (in the same way as in ProtonServerReceiverContext#flow), the sender seems to be unblocked correctly. I've been able to run the sender and receiver for 5 minutes without issues so far. 
> I'll submit the patch as a github PR.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)