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

Chuck Rolke commented on DISPATCH-945:
--------------------------------------

Reproducing this issue results in a hang instead of a crash:

{{(gdb) thread apply all bt}}

{{Thread 1 (Thread 0x7f9e2c1d91c0 (LWP 10896)):}}
{{#0  0x00007f9e2b6edbca in __pthread_mutex_lock_full () from 
/lib64/libpthread.so.0}}
{{#1  0x00007f9e2bd99735 in sys_mutex_lock (mutex=0xcd7000) at 
/home/chug/git/qpid-dispatch/src/posix/threading.c:56}}
{{#2  0x00007f9e2bd85431 in qd_link_free (link=0x7f9e100494e0) at 
/home/chug/git/qpid-dispatch/src/container.c:791}}
{{#3  0x00007f9e2bdba536 in AMQP_link_detach_handler (context=0xce40c0, 
link=0x7f9e100494e0, dt=QD_LOST)}}
{{    at /home/chug/git/qpid-dispatch/src/router_node.c:730}}
{{#4  0x00007f9e2bd838f4 in close_links (container=0xb6de00, 
conn=0x7f9e100162f0, print_log=true)}}
{{    at /home/chug/git/qpid-dispatch/src/container.c:295}}
{{#5  0x00007f9e2bd83943 in close_handler (container=0xb6de00, 
conn=0x7f9e100162f0, qd_conn=0x7f9e1000c9e0)}}
{{    at /home/chug/git/qpid-dispatch/src/container.c:308}}
{{#6  0x00007f9e2bd84489 in qd_container_handle_event (container=0xb6de00, 
event=0xcd7010) at /home/chug/git/qpid-dispatch/src/container.c:558}}
{{#7  0x00007f9e2bdc0abf in handle (qd_server=0xcfef70, e=0xcd7010) at 
/home/chug/git/qpid-dispatch/src/server.c:940}}
{{#8  0x00007f9e2bdc24ee in qd_connection_handle (c=0x7f9e1000c9e0, e=0xcd7010) 
at /home/chug/git/qpid-dispatch/src/server.c:1466}}
{{#9  0x00007f9e2bdc3c65 in handle_events (c=0x7f9e1000d330) at 
/home/chug/git/qpid-dispatch/src/http-libwebsockets.c:150}}
{{#10 0x00007f9e2bdc4aef in callback_amqpws (wsi=0x7f9e1000ab70, 
reason=LWS_CALLBACK_CLOSED, user=0x7f9e1000d330, in=0x0, len=0)}}
{{    at /home/chug/git/qpid-dispatch/src/http-libwebsockets.c:462}}
{{#11 0x00007f9e2ac78fa1 in lws_close_free_wsi () from 
/lib64/libwebsockets.so.11}}
{{#12 0x00007f9e2ac80879 in lws_context_destroy.part () from 
/lib64/libwebsockets.so.11}}
{{#13 0x00007f9e2bdc4e58 in qd_http_server_free (hs=0xb7ce80) at 
/home/chug/git/qpid-dispatch/src/http-libwebsockets.c:533}}
{{#14 0x00007f9e2bdc161c in qd_server_free (qd_server=0xcfef70) at 
/home/chug/git/qpid-dispatch/src/server.c:1176}}
{{#15 0x00007f9e2bd86656 in qd_dispatch_free (qd=0xa24280) at 
/home/chug/git/qpid-dispatch/src/dispatch.c:307}}
{{#16 0x00000000004016d4 in main_process (}}
{{    config_path=0x7ffc68bc596f 
"/home/chug/Research/qdr/message-copy/gen-test-network/2017-05-16_13-46-48_2/websocket.conf",
 }}
{{    python_pkgdir=0x7ffc68bc59cd "/home/chug/git/qpid-dispatch/python", fd=2) 
at /home/chug/git/qpid-dispatch/router/src/main.c:115}}
{{#17 0x0000000000401fa8 in main (argc=5, argv=0x7ffc68bc3b08) at 
/home/chug/git/qpid-dispatch/router/src/main.c:318}}

> Crash on shutdown when a http+websocket connection is open
> ----------------------------------------------------------
>
>                 Key: DISPATCH-945
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-945
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Container
>    Affects Versions: 1.0.1
>            Reporter: Ted Ross
>            Assignee: Chuck Rolke
>            Priority: Major
>             Fix For: 1.1.0
>
>
> If the router is shut down when there is an active HTTP+websockets 
> connection, the router segfaults.
> This crash appears to be a result of improper shutdown ordering.  When the 
> connection is closed, the container module has already been freed.  This 
> results in the dereferencing of invalid pointers.



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

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

Reply via email to