(gdb) c Continuing. Breakpoint 8, tls_complete_init (c=0xb58c4ef0, fd=13) at tls_server.c:98 98 BUG("Invalid connection state (bug in TCP code)\n"); (gdb) bt #0 tls_complete_init (c=0xb58c4ef0, fd=13) at tls_server.c:98 #1 tls_update_fd (c=0xb58c4ef0, fd=13) at tls_server.c:144 #2 0xb7745c12 in tls_h_blocking_write (c=0xb58c4ef0, fd=13, buf=0xb58da5dc "INVITE sip:bob@biloxi.test SIP/2.0\r\nRecord-Route: \r\nVia: SIP/2.0/TLS 195.111.158.41:5061;branch=z9hG4bK0cae.d3aaae52.0;i=c1\r\nVia: SIP/2.0/TLS"..., len=1302) at tls_server.c:712 #3 0x0812b94d in tcp_send (dst=0xb58c97c0, from=0x0, buf=0xb58da5dc "INVITE sip:bob@biloxi.test SIP/2.0\r\nRecord-Route: \r\nVia: SIP/2.0/TLS 195.111.158.41:5061;branch=z9hG4bK0cae.d3aaae52.0;i=c1\r\nVia: SIP/2.0/TLS"..., len=1302) at tcp_main.c:2072 #4 0xb7ee0656 in msg_send (rb=0xb58c9790, buf=0xb58da5dc, len=1302) at ../../forward.h:161 #5 send_pr_buffer (rb=0xb58c9790, buf=0xb58da5dc, len=1302) at t_funcs.c:103 #6 0xb7ee70b5 in t_send_branch (t=0xb58c96b4, branch=0, p_msg=0x82f4458, proxy=0x0, lock_replies=1) at t_fwd.c:951 #7 0xb7ee8476 in t_forward_nonack (t=0xb58c96b4, p_msg=0x82f4458, proxy=0x0, proto=0) at t_fwd.c:1139 #8 0xb7ee1115 in t_relay_to (p_msg=0x82f4458, proxy=0x0, proto=0, replicate=0) at t_funcs.c:355 #9 0xb7efe96b in _w_t_relay_to (p_msg=0x82f4458, _foo=0x0, _bar=0x0) at tm.c:1268 #10 w_t_relay (p_msg=0x82f4458, _foo=0x0, _bar=0x0) at tm.c:1419 #11 0x0805a085 in do_action (h=0xbfaf3898, a=0x82d66b4, msg=0x82f4458) at action.c:856 #12 0x0805d0b8 in run_actions (h=0xbfaf3898, a=0x82d66b4, msg=0x82f4458) at action.c:1260 #13 0x080dc4c5 in rval_get_int (h=0xbfaf3898, msg=0x82f4458, i=0xbfaf3088, rv=0xd, cache=0x0) at rvalue.c:859 #14 0x080df95d in rval_expr_eval_int (h=0xbfaf3898, msg=0x82f4458, res=0xbfaf3088, rve=0x82d6750) at rvalue.c:1745 #15 0x080df985 in rval_expr_eval_int (h=0xbfaf3898, msg=0x82f4458, res=0xbfaf32f4, rve=0x82d6b00) at rvalue.c:1750 #16 0x08059249 in do_action (h=0xbfaf3898, a=0x82d6ffc, msg=0x82f4458) at action.c:830 #17 0x0805d0b8 in run_actions (h=0xbfaf3898, a=0x82d6568, msg=0x82f4458) at action.c:1260 #18 0x0805a045 in do_action (h=0xbfaf3898, a=0x82cde68, msg=0x82f4458) at action.c:475 #19 0x0805d0b8 in run_actions (h=0xbfaf3898, a=0x82cdd1c, msg=0x82f4458) at action.c:1260 #20 0x080592a2 in do_action (h=0xbfaf3898, a=0x82cdf04, msg=0x82f4458) at action.c:845 #21 0x0805d0b8 in run_actions (h=0xbfaf3898, a=0x82c0d70, msg=0x82f4458) at action.c:1260 #22 0x0805d414 in run_top_route (a=0x82c0d70, msg=0x82f4458, c=0x0) at action.c:1308 #23 0x080c2fb6 in receive_msg ( buf=0xb58df300 "INVITE sip:bob@biloxi.test SIP/2.0\r\nVia: SIP/2.0/TLS 192.168.1.7:4242;branch=z9hG4bK-d8754z-4152f969795dbf68-1---d8754z-;rport\r\nMax-Forwards: 69\r\nContact: \r"..., len=1379, rcv_info=0xb58df14c) at receive.c:182 #24 0x081403db in tcp_read_req (con=0xb58df138, bytes_read=0xbfaf3af8, read_flags=0xbfaf3af0) at tcp_read.c:761 #25 0x08140fa7 in handle_io (fm=0x82e4aec, events=1, idx=-1) at tcp_read.c:979 #26 0x08143840 in io_wait_loop_epoll (unix_sock=55) at io_wait.h:1057 #27 tcp_receive_loop (unix_sock=55) at tcp_read.c:1086 #28 0x08119e53 in tcp_init_children () at tcp_main.c:4196 #29 0x080988ae in main_loop () at main.c:1435 #30 0x0809b1fb in main (argc=13, argv=0xbfaf3eb4) at main.c:2148 (gdb)