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

Gordon Sim commented on DISPATCH-1776:
--------------------------------------

With latest code the failure is much less frequent, but running the ping 
example abive several times I got:

 
{noformat}
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `qdrouterd -c 
/home/gordon/projects/router-config-examples/http2-bridges.conf'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fa1cbbb80cb in qd_message_stream_data_release (stream_data=0x0) at 
/home/gordon/projects/dispatch/src/message.c:2514
2514        qd_message_pvt_t     *pvt     = stream_data->owning_message;
[Current thread is 1 (Thread 0x7fa1c29bf700 (LWP 2061461))]
Missing separate debuginfos, use: dnf debuginfo-install 
cyrus-sasl-lib-2.1.27-2.fc31.x86_64 glibc-2.30-10.fc31.x86_64 
keyutils-libs-1.6-3.fc31.x86_64 krb5-libs-1.17-46.fc31.x86_64 
libcom_err-1.45.5-1.fc31.x86_64 libev-4.27-1.fc31.x86_64 
libffi-3.1-23.fc31.x86_64 libnghttp2-1.41.0-1.fc31.x86_64 
libselinux-2.9-5.fc31.x86_64 libuv-1.34.2-1.fc31.x86_64 
libwebsockets-3.2.1-1.fc31.x86_64 libxcrypt-4.4.15-1.fc31.x86_64 
openssl-libs-1.1.1d-2.fc31.x86_64 pcre2-10.34-8.fc31.x86_64 
python3-libs-3.7.6-2.fc31.x86_64 zlib-1.2.11-20.fc31.x86_64
(gdb) bt
#0  0x00007fa1cbbb80cb in qd_message_stream_data_release (stream_data=0x0) at 
/home/gordon/projects/dispatch/src/message.c:2514
#1  0x00007fa1cbb8fde1 in read_data_callback (session=<optimized out>, 
stream_id=<optimized out>, buf=<optimized out>, length=<optimized out>, 
data_flags=0x7fa1c29bdcf4, source=<optimized out>, user_data=0x812c88)
    at /home/gordon/projects/dispatch/src/adaptors/http2/http2_adaptor.c:1009
#2  0x00007fa1cb6d5ce9 in nghttp2_session_pack_data () from 
/lib64/libnghttp2.so.14
#3  0x00007fa1cb6d68bb in nghttp2_session_mem_send_internal () from 
/lib64/libnghttp2.so.14
#4  0x00007fa1cb6d7079 in nghttp2_session_send () from /lib64/libnghttp2.so.14
#5  0x00007fa1cbb9387d in handle_outgoing_http 
(stream_data=stream_data@entry=0x7fa1b402a208) at 
/home/gordon/projects/dispatch/src/adaptors/http2/http2_adaptor.c:1539
#6  0x00007fa1cbb93d84 in qdr_http_deliver (context=<optimized out>, 
link=0x7fa1b81626c8, delivery=0x7fa1ac01d8c8, settled=<optimized out>) at 
/home/gordon/projects/dispatch/src/adaptors/http2/http2_adaptor.c:1705
#7  0x00007fa1cbbdfb15 in qdr_link_process_deliveries (core=0x7e50e0, 
link=0x7fa1b81626c8, credit=1) at 
/home/gordon/projects/dispatch/src/router_core/transfer.c:167
#8  0x00007fa1cbbcb151 in qdr_connection_process (conn=0x82cb48) at 
/home/gordon/projects/dispatch/src/router_core/connections.c:383
#9  0x00007fa1cbb941b9 in handle_connection_event (e=<optimized out>, 
qd_server=<optimized out>, context=0x812c88) at 
/home/gordon/projects/dispatch/src/adaptors/http2/http2_adaptor.c:2125
#10 0x00007fa1cbbeff71 in handle_event_with_context (context=<optimized out>, 
qd_server=<optimized out>, e=<optimized out>) at 
/home/gordon/projects/dispatch/src/server.c:804
#11 do_handle_raw_connection_event (qd_server=<optimized out>, e=<optimized 
out>) at /home/gordon/projects/dispatch/src/server.c:810
#12 handle (qd_server=qd_server@entry=0x7a78e0, e=e@entry=0x7fa1b8006800, 
pn_conn=pn_conn@entry=0x0, ctx=ctx@entry=0x0) at 
/home/gordon/projects/dispatch/src/server.c:1090
#13 0x00007fa1cbbf0fa8 in thread_run (arg=0x7a78e0) at 
/home/gordon/projects/dispatch/src/server.c:1122
#14 0x00007fa1cbacb4e2 in start_thread () from /lib64/libpthread.so.0
#15 0x00007fa1cb6006d3 in clone () from /lib64/libc.so.6
 {noformat}

> HTTP/2 - grpc call causes segfault
> ----------------------------------
>
>                 Key: DISPATCH-1776
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1776
>             Project: Qpid Dispatch
>          Issue Type: Sub-task
>          Components: Protocol Adaptors
>            Reporter: Gordon Sim
>            Assignee: Ganesh Murthy
>            Priority: Major
>             Fix For: 1.15.0
>
>
> Running a simple grpc echo (over http2) through the router causes a segfault.
> To reproduce run router with (you can change the ports if desired, just be 
> consistent with the server and client):
> {noformat}
> router {
>     mode: interior
> }
> listener {
>     host: 0.0.0.0
>     port: amqp
>     authenticatePeer: no
>     saslMechanisms: ANONYMOUS
> }
> httpListener {
>     host: 0.0.0.0
>     port: 9090
>     address: foo
>     protocolVersion: HTTP2
> }
> httpConnector {
>     host: 127.0.0.1
>     port: 8080
>     address: foo
>     protocolVersion: HTTP2
> }
> log {
>     module: HTTP_ADAPTOR
>     enable: trace+
> }
> {noformat}
> Then run grpc server with podman (or docker):
> {noformat}
> podman run -it -p8080:9000 quay.io/mhausenblas/yages:0.1.0
> {noformat}
> Then run grpc client, again with podman (or docker):
> {noformat}
> podman run -it --network=host quay.io/mhausenblas/gump:0.1 grpcurl 
> --plaintext 127.0.0.1:9090 yages.Echo.Ping
> {noformat}
> I see segfault with following backtrace:
> {noformat}
> Thread 4 "qdrouterd" received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7fffeedb5700 (LWP 3841832)]
> 0x00007ffff7f4a417 in qd_compose_end_map () at 
> /home/gordon/projects/dispatch/src/compose.c:179
> 179       DEQ_INSERT_HEAD(field->fieldStack, comp);
> Missing separate debuginfos, use: dnf debuginfo-install 
> cyrus-sasl-lib-2.1.27-2.fc31.x86_64 keyutils-libs-1.6-3.fc31.x86_64 
> krb5-libs-1.17-46.fc31.x86_64 libcom_err-1.45.5-1.fc31.x86_64 
> libev-4.27-1.fc31.x86_64 libffi-3.1-23.fc31.x86_64 
> libnghttp2-1.41.0-1.fc31.x86_64 libselinux-2.9-5.fc31.x86_64 
> libuv-1.34.2-1.fc31.x86_64 libwebsockets-3.2.1-1.fc31.x86_64 
> libxcrypt-4.4.15-1.fc31.x86_64 openssl-libs-1.1.1d-2.fc31.x86_64 
> pcre2-10.34-8.fc31.x86_64 python3-libs-3.7.6-2.fc31.x86_64 
> zlib-1.2.11-20.fc31.x86_64
> (gdb) bt
> #0  0x00007ffff7f4a417 in qd_compose_end_map () at 
> /home/gordon/projects/dispatch/src/compose.c:179
> #1  0x00007ffff7f4008a in on_frame_recv_callback (session=<optimized out>, 
> frame=0x64ea70, user_data=0x64a308) at 
> /home/gordon/projects/dispatch/src/adaptors/http2/http2_adaptor.c:702
> #2  0x00007ffff7a8c32e in nghttp2_session_mem_recv () from 
> /lib64/libnghttp2.so.14
> #3  0x00007ffff7f41bdd in handle_incoming_http (conn=0x64a308) at 
> /home/gordon/projects/dispatch/src/adaptors/http2/http2_adaptor.h:149
> #4  handle_connection_event (e=<optimized out>, qd_server=<optimized out>, 
> context=0x64a308) at 
> /home/gordon/projects/dispatch/src/adaptors/http2/http2_adaptor.c:1456
> #5  0x00007ffff7f933f1 in handle_event_with_context (context=<optimized out>, 
> qd_server=<optimized out>, e=<optimized out>) at 
> /home/gordon/projects/dispatch/src/server.c:781
> #6  do_handle_raw_connection_event (qd_server=<optimized out>, e=<optimized 
> out>) at /home/gordon/projects/dispatch/src/server.c:787
> #7  handle (qd_server=qd_server@entry=0x4371d0, e=e@entry=0x7fffe4000c20, 
> pn_conn=pn_conn@entry=0x0, ctx=ctx@entry=0x0) at 
> /home/gordon/projects/dispatch/src/server.c:1067
> #8  0x00007ffff7f942c8 in thread_run (arg=0x4371d0) at 
> /home/gordon/projects/dispatch/src/server.c:1099
> #9  0x00007ffff7e7f4e2 in start_thread () from /lib64/libpthread.so.0
> #10 0x00007ffff79b46d3 in clone () from /lib64/libc.so.6
> {noformat}
>  



--
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