qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Moravec (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PROTON-905) Long-lived connections leak sessions and links
Date Wed, 04 Jul 2018 08:19:00 GMT

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

Pavel Moravec commented on PROTON-905:
--------------------------------------

I think this Jira is behind qdrouterd memory accumulation as described in [https://issues.jboss.org/browse/ENTMQIC-2023]
- copying the (more trivial, slower) reproducer of a client connecting to qdrouterd here:

 
|{color:#000000}import random{color}|
|{color:#000000}from proton.utils import BlockingConnection{color}|
|{color:#000000}from time import sleep{color}|
|{color:#000000}from uuid import uuid4{color}|
| |
|{color:#000000}ROUTER_ADDRESS = "proton+amqp://0.0.0.0:5672"{color}|
|{color:#000000}ADDRESS = "test.address"{color}|
|{color:#000000}HEARTBEAT = 5{color}|
|{color:#000000}SLEEP_MIN = 0.1{color}|
|{color:#000000}SLEEP_MAX = 0.2{color}|
| |
|{color:#000000}conn = BlockingConnection(ROUTER_ADDRESS, ssl_domain=None, heartbeat=HEARTBEAT){color}|
| |
|{color:#000000}while True:{color}|
|{color:#000000} recv = conn.create_receiver('%s' %(ADDRESS), name=str(uuid4()), dynamic=False,
options=None){color}|
|{color:#000000} sleep(random.uniform(SLEEP_MIN,SLEEP_MAX)){color}|
|{color:#000000} recv.close(){color}|
|{color:#000000} sleep(random.uniform(SLEEP_MIN,SLEEP_MAX)) {color}|

> Long-lived connections leak sessions and links
> ----------------------------------------------
>
>                 Key: PROTON-905
>                 URL: https://issues.apache.org/jira/browse/PROTON-905
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: 0.9.1, 0.10
>            Reporter: Ken Giusti
>            Priority: Minor
>              Labels: leak
>             Fix For: proton-c-future
>
>         Attachments: test-send.py
>
>
> I found this issue while debugging a crash dump of qpidd.
> Long lived connections do not free its sessions/link.
> This only applies when NOT using the event model.  The version of qpidd I tested against
(0.30) still uses the iterative model.  Point to consider, I don't know why this is the case.
> Details:  I have a test script that opens a single connection, then continually creates
sessions/links over that connection, sending one message before closing and freeing the sessions/links.
 See attached.
> Over time the qpidd run time consumes all memory on the system and is killed by OOM.
 To be clear, I'm using drain to remove all sent messages - there is no message build up.
> On debugging this, I'm finding thousands of session objects on the connections free sessions
weakref list.  Every one of those sessions has a refcount of one.
> Once the connection is finalized, all session objects are freed.  But until then, freed
sessions continue to accumulate indefinitely.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message