You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Colin MacNaughton (JIRA)" <ji...@apache.org> on 2009/11/12 08:45:52 UTC

[jira] Created: (AMQ-2487) MemoryUsage not properly accounted for when expiring messages to DLQ: can lead to hang.

MemoryUsage not properly accounted for when expiring messages to DLQ: can lead to hang.
---------------------------------------------------------------------------------------

                 Key: AMQ-2487
                 URL: https://issues.apache.org/activemq/browse/AMQ-2487
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.4.0
         Environment: N/A
            Reporter: Colin MacNaughton
             Fix For: 5.4.0


Given the following broker destination policy
{code:xml} 
    <destinationPolicy>
      <policyMap>
        <policyEntries>
          <policyEntry topic=">" producerFlowControl="true"
            memoryLimit="1mb">
            <pendingSubscriberPolicy>
              <vmCursor />
            </pendingSubscriberPolicy>
          </policyEntry>
          <policyEntry queue=">" producerFlowControl="true"
            memoryLimit="1mb">
            <!--
              Use VM cursor for better latency For more information,
              see: http://activemq.apache.org/message-cursors.html
            -->
            <pendingQueuePolicy>
              <vmQueueCursor />
            </pendingQueuePolicy>
          </policyEntry>
        </policyEntries>
      </policyMap>
    </destinationPolicy>
{code}

If I send message to queue://TESTQ1 with an expiration of 1second, with an unreliable/slow receiver, the publisher eventually hangs sending to the queue. The underlying problem is that when the message is expired to the DLQ the MemoryUsage reference is left pointing the TESTQ1's memory limiter, instead of being reset to the DLQ limiter, and when it is added to the DLQ, TESTQ1's memory limiter is updated counteracting the decrement that is done by the TESTQ1 when the message is expired. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-2487) MemoryUsage not properly accounted for when expiring messages to DLQ: can lead to hang.

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully resolved AMQ-2487.
-----------------------------

    Resolution: Fixed

resolved in r882096 - some more validation of memory usage and fix issue with storequeuecursor and browse effecting memory usage.

> MemoryUsage not properly accounted for when expiring messages to DLQ: can lead to hang.
> ---------------------------------------------------------------------------------------
>
>                 Key: AMQ-2487
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2487
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.0
>         Environment: N/A
>            Reporter: Colin MacNaughton
>            Assignee: Gary Tully
>             Fix For: 5.3.1, 5.4.0
>
>         Attachments: AMQ-2487patch.txt
>
>
> Given the following broker destination policy
> {code:xml} 
>     <destinationPolicy>
>       <policyMap>
>         <policyEntries>
>           <policyEntry topic=">" producerFlowControl="true"
>             memoryLimit="1mb">
>             <pendingSubscriberPolicy>
>               <vmCursor />
>             </pendingSubscriberPolicy>
>           </policyEntry>
>           <policyEntry queue=">" producerFlowControl="true"
>             memoryLimit="1mb">
>             <!--
>               Use VM cursor for better latency For more information,
>               see: http://activemq.apache.org/message-cursors.html
>             -->
>             <pendingQueuePolicy>
>               <vmQueueCursor />
>             </pendingQueuePolicy>
>           </policyEntry>
>         </policyEntries>
>       </policyMap>
>     </destinationPolicy>
> {code}
> If I send message to queue://TESTQ1 with an expiration of 1second, with an unreliable/slow receiver, the publisher eventually hangs sending to the queue. The underlying problem is that when the message is expired to the DLQ the MemoryUsage reference is left pointing the TESTQ1's memory limiter, instead of being reset to the DLQ limiter, and when it is added to the DLQ, TESTQ1's memory limiter is updated counteracting the decrement that is done by the TESTQ1 when the message is expired. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-2487) MemoryUsage not properly accounted for when expiring messages to DLQ: can lead to hang.

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully resolved AMQ-2487.
-----------------------------

    Resolution: Fixed

resolve in r835325, modified an existing test to verify.

> MemoryUsage not properly accounted for when expiring messages to DLQ: can lead to hang.
> ---------------------------------------------------------------------------------------
>
>                 Key: AMQ-2487
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2487
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.0
>         Environment: N/A
>            Reporter: Colin MacNaughton
>            Assignee: Gary Tully
>             Fix For: 5.4.0
>
>         Attachments: AMQ-2487patch.txt
>
>
> Given the following broker destination policy
> {code:xml} 
>     <destinationPolicy>
>       <policyMap>
>         <policyEntries>
>           <policyEntry topic=">" producerFlowControl="true"
>             memoryLimit="1mb">
>             <pendingSubscriberPolicy>
>               <vmCursor />
>             </pendingSubscriberPolicy>
>           </policyEntry>
>           <policyEntry queue=">" producerFlowControl="true"
>             memoryLimit="1mb">
>             <!--
>               Use VM cursor for better latency For more information,
>               see: http://activemq.apache.org/message-cursors.html
>             -->
>             <pendingQueuePolicy>
>               <vmQueueCursor />
>             </pendingQueuePolicy>
>           </policyEntry>
>         </policyEntries>
>       </policyMap>
>     </destinationPolicy>
> {code}
> If I send message to queue://TESTQ1 with an expiration of 1second, with an unreliable/slow receiver, the publisher eventually hangs sending to the queue. The underlying problem is that when the message is expired to the DLQ the MemoryUsage reference is left pointing the TESTQ1's memory limiter, instead of being reset to the DLQ limiter, and when it is added to the DLQ, TESTQ1's memory limiter is updated counteracting the decrement that is done by the TESTQ1 when the message is expired. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (AMQ-2487) MemoryUsage not properly accounted for when expiring messages to DLQ: can lead to hang.

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully reopened AMQ-2487:
-----------------------------


moveMessages and other jmx operations seem to suffer from the same memory usage reuse issue. need to track those down and fix them before closing this.

> MemoryUsage not properly accounted for when expiring messages to DLQ: can lead to hang.
> ---------------------------------------------------------------------------------------
>
>                 Key: AMQ-2487
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2487
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.0
>         Environment: N/A
>            Reporter: Colin MacNaughton
>            Assignee: Gary Tully
>             Fix For: 5.3.1, 5.4.0
>
>         Attachments: AMQ-2487patch.txt
>
>
> Given the following broker destination policy
> {code:xml} 
>     <destinationPolicy>
>       <policyMap>
>         <policyEntries>
>           <policyEntry topic=">" producerFlowControl="true"
>             memoryLimit="1mb">
>             <pendingSubscriberPolicy>
>               <vmCursor />
>             </pendingSubscriberPolicy>
>           </policyEntry>
>           <policyEntry queue=">" producerFlowControl="true"
>             memoryLimit="1mb">
>             <!--
>               Use VM cursor for better latency For more information,
>               see: http://activemq.apache.org/message-cursors.html
>             -->
>             <pendingQueuePolicy>
>               <vmQueueCursor />
>             </pendingQueuePolicy>
>           </policyEntry>
>         </policyEntries>
>       </policyMap>
>     </destinationPolicy>
> {code}
> If I send message to queue://TESTQ1 with an expiration of 1second, with an unreliable/slow receiver, the publisher eventually hangs sending to the queue. The underlying problem is that when the message is expired to the DLQ the MemoryUsage reference is left pointing the TESTQ1's memory limiter, instead of being reset to the DLQ limiter, and when it is added to the DLQ, TESTQ1's memory limiter is updated counteracting the decrement that is done by the TESTQ1 when the message is expired. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AMQ-2487) MemoryUsage not properly accounted for when expiring messages to DLQ: can lead to hang.

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully reassigned AMQ-2487:
-------------------------------

    Assignee: Gary Tully

> MemoryUsage not properly accounted for when expiring messages to DLQ: can lead to hang.
> ---------------------------------------------------------------------------------------
>
>                 Key: AMQ-2487
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2487
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0
>         Environment: N/A
>            Reporter: Colin MacNaughton
>            Assignee: Gary Tully
>             Fix For: 5.4.0
>
>         Attachments: AMQ-2487patch.txt
>
>
> Given the following broker destination policy
> {code:xml} 
>     <destinationPolicy>
>       <policyMap>
>         <policyEntries>
>           <policyEntry topic=">" producerFlowControl="true"
>             memoryLimit="1mb">
>             <pendingSubscriberPolicy>
>               <vmCursor />
>             </pendingSubscriberPolicy>
>           </policyEntry>
>           <policyEntry queue=">" producerFlowControl="true"
>             memoryLimit="1mb">
>             <!--
>               Use VM cursor for better latency For more information,
>               see: http://activemq.apache.org/message-cursors.html
>             -->
>             <pendingQueuePolicy>
>               <vmQueueCursor />
>             </pendingQueuePolicy>
>           </policyEntry>
>         </policyEntries>
>       </policyMap>
>     </destinationPolicy>
> {code}
> If I send message to queue://TESTQ1 with an expiration of 1second, with an unreliable/slow receiver, the publisher eventually hangs sending to the queue. The underlying problem is that when the message is expired to the DLQ the MemoryUsage reference is left pointing the TESTQ1's memory limiter, instead of being reset to the DLQ limiter, and when it is added to the DLQ, TESTQ1's memory limiter is updated counteracting the decrement that is done by the TESTQ1 when the message is expired. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2487) MemoryUsage not properly accounted for when expiring messages to DLQ: can lead to hang.

Posted by "Colin MacNaughton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Colin MacNaughton updated AMQ-2487:
-----------------------------------

    Attachment: AMQ-2487patch.txt

Patch file attached. It is worth investigating if there are other problematic scenarios where BrokerRegion.doResend might be using the wrong MemoryUsage

> MemoryUsage not properly accounted for when expiring messages to DLQ: can lead to hang.
> ---------------------------------------------------------------------------------------
>
>                 Key: AMQ-2487
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2487
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0
>         Environment: N/A
>            Reporter: Colin MacNaughton
>             Fix For: 5.4.0
>
>         Attachments: AMQ-2487patch.txt
>
>
> Given the following broker destination policy
> {code:xml} 
>     <destinationPolicy>
>       <policyMap>
>         <policyEntries>
>           <policyEntry topic=">" producerFlowControl="true"
>             memoryLimit="1mb">
>             <pendingSubscriberPolicy>
>               <vmCursor />
>             </pendingSubscriberPolicy>
>           </policyEntry>
>           <policyEntry queue=">" producerFlowControl="true"
>             memoryLimit="1mb">
>             <!--
>               Use VM cursor for better latency For more information,
>               see: http://activemq.apache.org/message-cursors.html
>             -->
>             <pendingQueuePolicy>
>               <vmQueueCursor />
>             </pendingQueuePolicy>
>           </policyEntry>
>         </policyEntries>
>       </policyMap>
>     </destinationPolicy>
> {code}
> If I send message to queue://TESTQ1 with an expiration of 1second, with an unreliable/slow receiver, the publisher eventually hangs sending to the queue. The underlying problem is that when the message is expired to the DLQ the MemoryUsage reference is left pointing the TESTQ1's memory limiter, instead of being reset to the DLQ limiter, and when it is added to the DLQ, TESTQ1's memory limiter is updated counteracting the decrement that is done by the TESTQ1 when the message is expired. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2487) MemoryUsage not properly accounted for when expiring messages to DLQ: can lead to hang.

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully updated AMQ-2487:
----------------------------

    Affects Version/s:     (was: 5.4.0)
                       5.3.0

> MemoryUsage not properly accounted for when expiring messages to DLQ: can lead to hang.
> ---------------------------------------------------------------------------------------
>
>                 Key: AMQ-2487
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2487
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.3.0
>         Environment: N/A
>            Reporter: Colin MacNaughton
>            Assignee: Gary Tully
>             Fix For: 5.4.0
>
>         Attachments: AMQ-2487patch.txt
>
>
> Given the following broker destination policy
> {code:xml} 
>     <destinationPolicy>
>       <policyMap>
>         <policyEntries>
>           <policyEntry topic=">" producerFlowControl="true"
>             memoryLimit="1mb">
>             <pendingSubscriberPolicy>
>               <vmCursor />
>             </pendingSubscriberPolicy>
>           </policyEntry>
>           <policyEntry queue=">" producerFlowControl="true"
>             memoryLimit="1mb">
>             <!--
>               Use VM cursor for better latency For more information,
>               see: http://activemq.apache.org/message-cursors.html
>             -->
>             <pendingQueuePolicy>
>               <vmQueueCursor />
>             </pendingQueuePolicy>
>           </policyEntry>
>         </policyEntries>
>       </policyMap>
>     </destinationPolicy>
> {code}
> If I send message to queue://TESTQ1 with an expiration of 1second, with an unreliable/slow receiver, the publisher eventually hangs sending to the queue. The underlying problem is that when the message is expired to the DLQ the MemoryUsage reference is left pointing the TESTQ1's memory limiter, instead of being reset to the DLQ limiter, and when it is added to the DLQ, TESTQ1's memory limiter is updated counteracting the decrement that is done by the TESTQ1 when the message is expired. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.