[ 
https://issues.apache.org/jira/browse/PROTON-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Kamke updated PROTON-1393:
-----------------------------------
    Description: 
{{DeliveryImpl}} manages several doubly linked lists (of links, work and 
transportWork). However it does not function properly if removal is done out of 
order. It leaves object references in the next/previous pointers which on a 
large scale inhibit the system from garbage collecting these object, namely the 
{{DeliveryImpl}} object graph.

In practice this was discovered when message consumers delay settlement of 
messages until after a period of time elapses (i.e. some async work is done in 
another thread). This causes out of order settlement to occur, leaving object 
references. Eventually the JVM will run out of memory and the process will 
crash. The heap can be examined to discover a large number of {{settled}} 
{{DeliveryImpl}} s which are holding references to themselves.

  was:
{{DeliveryImpl}} manages several doubly linked lists (of links, work and 
transportWork). However it does not function properly if removal is done out of 
order. It leaves object references in the next/previous pointers which on a 
large scale inhibit the system from garbage collecting these object, namely the 
{{DeliveryImpl}} object graph.

In practice this was discovered when message consumers delay settlement of 
messages until after a period of time elapses (i.e. some async work is done in 
another thread). This causes out of order settlement to occur, leaving object 
references. Eventually the JVM will run out of memory and the process will 
crash. The heap can be examined to discover a large number of {{settled}} 
{{DeliveryImpl}}s which are holding references to themselves.


> Memory leak with delayed settlement
> -----------------------------------
>
>                 Key: PROTON-1393
>                 URL: https://issues.apache.org/jira/browse/PROTON-1393
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-j
>    Affects Versions: 0.16.0
>            Reporter: Jonathan Kamke
>
> {{DeliveryImpl}} manages several doubly linked lists (of links, work and 
> transportWork). However it does not function properly if removal is done out 
> of order. It leaves object references in the next/previous pointers which on 
> a large scale inhibit the system from garbage collecting these object, namely 
> the {{DeliveryImpl}} object graph.
> In practice this was discovered when message consumers delay settlement of 
> messages until after a period of time elapses (i.e. some async work is done 
> in another thread). This causes out of order settlement to occur, leaving 
> object references. Eventually the JVM will run out of memory and the process 
> will crash. The heap can be examined to discover a large number of 
> {{settled}} {{DeliveryImpl}} s which are holding references to themselves.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to