Description
Router crashes when attempting to service a management request.
When a python client sets its connections properties to a map, then as soon as the router receives a management request for the connection info, the router will crash.
If the client sets its connections properties to a string, then there is no crash.
To reproduce:
- start the router using tests/config-1/A.conf
- modify the proton example server.py to set a properties map on line 37:
self.conn = event.container.connect(self.url, properties= {'client_identifier': 'policy_server'})
- start the modified proton example: ./server.py -a 0.0.0.0:20000/example
- all is well until you do a qdstat -b 0.0.0.0:20000 -c
backtrace:
Thread 2 "qdrouterd" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffec03b700 (LWP 26782)]
0x00007ffff6739766 in strlen () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install libffi-3.1-12.fc26.x86_64 libwebsockets-2.2.1-1.fc26.x86_64 openssl-libs-1.1.0f-7.fc26.x86_64 python2-libs-2.7.14-2.fc26.x86_64 zlib-1.2.11-2.fc26.x86_64
(gdb) bt
#0 0x00007ffff6739766 in strlen () from /lib64/libc.so.6
#1 0x00007ffff7b6f805 in qd_compose_insert_string (field=0x7fffe005cb60,
value=0x0) at /home/eallen/workspace/qpid-dispatch/src/compose.c:444
#2 0x00007ffff7b90225 in qdr_connection_insert_column_CT (
conn=0x7fffd400b620, col=12, body=0x7fffe005cb60, as_map=false)
at /home/eallen/workspace/qpid-dispatch/src/router_core/agent_connection.c:215
#3 0x00007ffff7b90300 in qdr_agent_write_connection_CT (query=0x7fffe0077da0,
conn=0x7fffd400b620)
at /home/eallen/workspace/qpid-dispatch/src/router_core/agent_connection.c:242
#4 0x00007ffff7b90449 in qdra_connection_get_first_CT (core=0x92c090,
query=0x7fffe0077da0, offset=0)
at /home/eallen/workspace/qpid-dispatch/src/router_core/agent_connection.c:284
#5 0x00007ffff7b8c850 in qdrh_query_get_first_CT (core=0x92c090,
action=0x7fffe000dfa0, discard=false)
at /home/eallen/workspace/qpid-dispatch/src/router_core/agent.c:455
#6 0x00007ffff7b9f86a in router_core_thread (arg=0x92c090)
at /home/eallen/workspace/qpid-dispatch/src/router_core/router_core_thread.c:83
#7 0x00007ffff74f836d in start_thread () from /lib64/libpthread.so.0
#8 0x00007ffff67b5e1f in clone () from /lib64/libc.so.6