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

Ganesh Murthy updated DISPATCH-1391:
------------------------------------
    Description: 
When the following program is run against the router, it  crashes -
{noformat}
from proton.utils import BlockingConnection
from time import sleep

ROUTER_ADDRESS = "amqp://127.0.0.1:5672"
RECEIVER_ADDRESS = "examples-receiver"

c = BlockingConnection(ROUTER_ADDRESS)
count = 0

while True:
    count += 1
    r = c.create_receiver(RECEIVER_ADDRESS + str(count))
    r.session.close()
    if count == 5:
        break


Here is the backtrace

(gdb) bt
#0  pn_terminus_set_address (terminus=0x0, address=0x7f3dc8039aa0 
"examples-receiver2") at 
/home/gmurthy/opensource/qpid-proton/c/src/core/engine.c:1241
#1  0x00007f3de2836a2a in qdr_terminus_copy (from=from@entry=0x7f3dc803dd18, 
to=0x0) at /home/gmurthy/opensource/qpid-dispatch/src/router_core/terminus.c:92
#2  0x00007f3de283fe1e in CORE_link_second_attach (context=<optimized out>, 
link=<optimized out>, source=0x7f3dc803dd18, target=0x7f3dc803dc18) at 
/home/gmurthy/opensource/qpid-dispatch/src/router_node.c:1322
#3  0x00007f3de28279c1 in qdr_connection_process (conn=0x7f3dc801b198) at 
/home/gmurthy/opensource/qpid-dispatch/src/router_core/connections.c:253
#4  0x00007f3de280f0f8 in writable_handler (container=0x171c000, 
container=0x171c000, conn=0x7f3dc400eb58, qd_conn=0x7f3dc400eb58) at 
/home/gmurthy/opensource/qpid-dispatch/src/container.c:332
#5  qd_container_handle_event (container=0x171c000, 
event=event@entry=0x7f3dc80134e0, conn=conn@entry=0x7f3dc4018b00, 
qd_conn=qd_conn@entry=0x7f3dc400eb58) at 
/home/gmurthy/opensource/qpid-dispatch/src/container.c:642
#6  0x00007f3de2845442 in handle (qd_server=qd_server@entry=0x1699ba0, 
e=e@entry=0x7f3dc80134e0, pn_conn=pn_conn@entry=0x7f3dc4018b00, 
ctx=ctx@entry=0x7f3dc400eb58) at 
/home/gmurthy/opensource/qpid-dispatch/src/server.c:985
#7  0x00007f3de284607c in thread_run (arg=0x1699ba0) at 
/home/gmurthy/opensource/qpid-dispatch/src/server.c:1010
#8  0x00007f3de275d4c0 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f3de23bb133 in clone () from /lib64/libc.so.6
(gdb) 
{noformat}
This is happening because the pn_link references are not cleaned up on router 
link objects (qd_link_t) during session close

  was:
When the following program is run against the router, it  crashes -
{noformat}
from proton.utils import BlockingConnection
from time import sleep

ROUTER_ADDRESS = "amqp://127.0.0.1:5672"
RECEIVER_ADDRESS = "examples-receiver"

c = BlockingConnection(ROUTER_ADDRESS)
count = 0

while True:
    count += 1
    r = c.create_receiver(RECEIVER_ADDRESS + str(count))
    r.session.close()
    if count == 5:
        break
{noformat}
This is happening because the pn_link references are not cleaned up on router 
link objects (qd_link_t) during session close


> Proton link reference not cleared on router link objects during session close
> -----------------------------------------------------------------------------
>
>                 Key: DISPATCH-1391
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1391
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Container
>    Affects Versions: 1.8.0
>            Reporter: Ganesh Murthy
>            Assignee: Ganesh Murthy
>            Priority: Major
>             Fix For: 1.9.0
>
>
> When the following program is run against the router, it  crashes -
> {noformat}
> from proton.utils import BlockingConnection
> from time import sleep
> ROUTER_ADDRESS = "amqp://127.0.0.1:5672"
> RECEIVER_ADDRESS = "examples-receiver"
> c = BlockingConnection(ROUTER_ADDRESS)
> count = 0
> while True:
>     count += 1
>     r = c.create_receiver(RECEIVER_ADDRESS + str(count))
>     r.session.close()
>     if count == 5:
>         break
> Here is the backtrace
> (gdb) bt
> #0  pn_terminus_set_address (terminus=0x0, address=0x7f3dc8039aa0 
> "examples-receiver2") at 
> /home/gmurthy/opensource/qpid-proton/c/src/core/engine.c:1241
> #1  0x00007f3de2836a2a in qdr_terminus_copy (from=from@entry=0x7f3dc803dd18, 
> to=0x0) at 
> /home/gmurthy/opensource/qpid-dispatch/src/router_core/terminus.c:92
> #2  0x00007f3de283fe1e in CORE_link_second_attach (context=<optimized out>, 
> link=<optimized out>, source=0x7f3dc803dd18, target=0x7f3dc803dc18) at 
> /home/gmurthy/opensource/qpid-dispatch/src/router_node.c:1322
> #3  0x00007f3de28279c1 in qdr_connection_process (conn=0x7f3dc801b198) at 
> /home/gmurthy/opensource/qpid-dispatch/src/router_core/connections.c:253
> #4  0x00007f3de280f0f8 in writable_handler (container=0x171c000, 
> container=0x171c000, conn=0x7f3dc400eb58, qd_conn=0x7f3dc400eb58) at 
> /home/gmurthy/opensource/qpid-dispatch/src/container.c:332
> #5  qd_container_handle_event (container=0x171c000, 
> event=event@entry=0x7f3dc80134e0, conn=conn@entry=0x7f3dc4018b00, 
> qd_conn=qd_conn@entry=0x7f3dc400eb58) at 
> /home/gmurthy/opensource/qpid-dispatch/src/container.c:642
> #6  0x00007f3de2845442 in handle (qd_server=qd_server@entry=0x1699ba0, 
> e=e@entry=0x7f3dc80134e0, pn_conn=pn_conn@entry=0x7f3dc4018b00, 
> ctx=ctx@entry=0x7f3dc400eb58) at 
> /home/gmurthy/opensource/qpid-dispatch/src/server.c:985
> #7  0x00007f3de284607c in thread_run (arg=0x1699ba0) at 
> /home/gmurthy/opensource/qpid-dispatch/src/server.c:1010
> #8  0x00007f3de275d4c0 in start_thread () from /lib64/libpthread.so.0
> #9  0x00007f3de23bb133 in clone () from /lib64/libc.so.6
> (gdb) 
> {noformat}
> This is happening because the pn_link references are not cleaned up on router 
> link objects (qd_link_t) during session close



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to