[
https://issues.apache.org/jira/browse/QPID-7958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16194375#comment-16194375
]
Keith Wall commented on QPID-7958:
----------------------------------
I think the problem is that for messages that are spontaneously created by the
Broker's management node and system nodes the system does not hold a message
reference. In other words, there is no analogue for the reference taken by
org/apache/qpid/server/queue/QueueEntryImpl.java:149 for normal messages.
The defect is being partially masked:
# For system node messages delivered by the 0-8 path, the NoAckConsumer takes
the first reference (ConsumerTarget_0_8.java:138). Its release causes the
message to be deleted. This release is causing the message to be deleted.
# For the management node for management interactions using a proxy message
source (i.e. !destination), on the delivery path of the response, the first
reference is taken by org/apache/qpid/server/message/RoutingResult.java:110.
The release of this reference at line 124 triggers the message's deletion from
the store.
For system node messages on the 0-10 path, no reference gets taken at all, so
the message remains in the store. This wasn't important until QPID-7783.
I think the solution most in keeping with the system is for the management node
and system nodes to hold a reference to the created message until the message
is acknowledge or the consumer is closed. I have developed this idea in the
attached patch (mostly untested).
> [Java Broker] [AMQP0-10] References to messages sent by
> $virtualhostProperties node retained by store
> -----------------------------------------------------------------------------------------------------
>
> Key: QPID-7958
> URL: https://issues.apache.org/jira/browse/QPID-7958
> Project: Qpid
> Issue Type: Bug
> Affects Versions: qpid-java-6.0.7, qpid-java-broker-7.0.0, qpid-java-6.1.3
> Reporter: Keith Wall
> Priority: Critical
> Attachments: release_system_sources_messages.diff
>
>
> On the 0-10 path, I notice that references to messages created by the
> {{${virtualhostProperties\}}} node are being retained internally within the
> store. This is leaking approximately ~1024 bytes per connection. Restarting
> the Broker or recycling the virtualhost frees the memory.
> The reference are being retained by the {{AbstractXXXMessageStore#_messages}}
> set.
> QPID-7783 added the _messages data structure. It was back ported to 6.0 and
> 6.1, so the leak might be present there too. I have not verify this.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]