[
https://issues.apache.org/jira/browse/QPID-7958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16194375#comment-16194375
]
Keith Wall edited comment on QPID-7958 at 10/6/17 12:20 PM:
------------------------------------------------------------
The first part of the defect relates only to the system nodes. The defect
appears on the 0-10 path because, unlike the 0-8 path, a reference to the
message geneated by the system node is never taken. On the 0-8 path,
the reference happens to be taken by the NoAckConsumer
(ConsumerTarget_0_8.java:138). When this reference is decremented, the message
is deleted.
The defect here is that
{{org.apache.qpid.server.virtualhost.AbstractSystemMessageSource.Consumer#pullMessage}}
should be providing a message reference in the same way as
{{org.apache.qpid.server.management.amqp.ManagementNodeConsumer#pullMessage}}
etc.
There is a second aspect to the defect that is common between system nodes and
the management node. If the client fails to consume the message, the message
will be leaked. On closing the consumer we should be releasing any messages
remaining on the internal queue.
Finally, we should be disposing of the converted messages.
was (Author: k-wall):
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
>
> 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 verified this-.
> (updated 2017/10/06 does not affect 6.1 or 6.0. The
> MessageInstanceConsumerPair, which is no longer on master, unconditionally
> took a reference, so a reference was already taken).
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]