You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/05/03 23:13:00 UTC

[jira] [Commented] (DISPATCH-2091) TCP adaptor does not close listener connection when RX window is full

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

ASF subversion and git services commented on DISPATCH-2091:
-----------------------------------------------------------

Commit c27598ce184814b3dc427d3fd21abec124a4441b in qpid-dispatch's branch refs/heads/1.16.x from Charles E. Rolke
[ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=c27598c ]

DISPATCH-2091: Ignore RX window when raw connection is write_closed

When TCP adaptor receives an EOS in the incoming streaming link then
it calls pn_raw_write_close to the corresponding PN raw connection.
This sends a FIN to the raw connection peer.

If the adaptor then continues to honor the RX window closure then it
never reads data from the raw connection that now has a close in
progress. Further, when the incoming TCP window is full then the
raw connection never returns the client's FIN and the connection
is stuck open.

This patch causes the adaptor to override backpressure flow control
and to keep reading from a raw connection after a write_close has been
effected.

This closes #1177

(cherry picked from commit 7ef0a0f0262a830df35d3bd39b9346c5db56940b)


> TCP adaptor does not close listener connection when RX window is full
> ---------------------------------------------------------------------
>
>                 Key: DISPATCH-2091
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-2091
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Protocol Adaptors
>            Reporter: Charles E. Rolke
>            Priority: Blocker
>             Fix For: 1.16.0
>
>         Attachments: INTA-tcplog.conf, INTB-tcplog.conf
>
>
> A two-router network has TCP Listener on A and TCP Connector on B.
> The test program is a iperf3 server and a client run with
> {code:java}
>     iperf3 -c 127.0.0.1 -p 5202 -t 2
> {code}
> Iperf3 creates two connections. The low-volume connection closes OK. The high-volume connection receives a network FIN but never responds with FIN/ACK.
> TCP logging for the stuck connection shows that the RX windows is full. When proton signals that read data is available the adaptor ignores it. This probably interrupts the normal event sequence and a DISCONNECTED event never arrives.
> The event sequence is
> {code:java}
> 2021-04-28 17:13:48.502875 -0400 TCP_ADAPTOR (trace) [C3][L28] handle_incoming PNRC_READ for listener connection. read_closed:F, flow_enabled:T
> 2021-04-28 17:13:48.502896 -0400 TCP_ADAPTOR (debug) [C3] pn_raw_connection_take_read_buffers() took 16, freed 0
> 2021-04-28 17:13:48.502907 -0400 TCP_ADAPTOR (debug) [C3][L28] Granting 16 to pn_raw_connection_give_read_buffers()
> 2021-04-28 17:13:48.503126 -0400 TCP_ADAPTOR (trace) [C3][L28][D22] Continuing listener message with 8192 bytes
> 2021-04-28 17:13:48.503140 -0400 TCP_ADAPTOR (debug) [C3] PN_RAW_CONNECTION_READ Read 8192 bytes. Total read 45482021 bytes
> 2021-04-28 17:13:48.503188 -0400 TCP_ADAPTOR (debug) [C3] PN_RAW_CONNECTION_READ listener Event 
> 2021-04-28 17:13:48.503210 -0400 TCP_ADAPTOR (trace) [C3][L28] handle_incoming PNRC_READ for listener connection. read_closed:F, flow_enabled:T
> 2021-04-28 17:13:48.503229 -0400 TCP_ADAPTOR (trace) [C3] TCP RX window CLOSED: bytes in=45488165 unacked=1460232
> 2021-04-28 17:13:48.503244 -0400 TCP_ADAPTOR (debug) [C3] pn_raw_connection_take_read_buffers() took 12, freed 0
> 2021-04-28 17:13:48.503259 -0400 TCP_ADAPTOR (debug) [C3][L28] Granting 12 to pn_raw_connection_give_read_buffers()
> 2021-04-28 17:13:48.503316 -0400 TCP_ADAPTOR (debug) [C3] qdr_tcp_activate: call pn_raw_connection_wake()
> 2021-04-28 17:13:48.503393 -0400 TCP_ADAPTOR (trace) [C3][L28][D22] Continuing listener message with 6144 bytes
> 2021-04-28 17:13:48.503411 -0400 TCP_ADAPTOR (debug) [C3] PN_RAW_CONNECTION_READ Read 6144 bytes. Total read 45488165 bytes
> 2021-04-28 17:13:48.503423 -0400 TCP_ADAPTOR (debug) [C3][L28] qdr_tcp_push
> 2021-04-28 17:13:48.503433 -0400 TCP_ADAPTOR (debug) [C3][L27][D25] qdr_tcp_deliver Delivery event
> 2021-04-28 17:13:48.503445 -0400 TCP_ADAPTOR (info) [C3] EOS
> 2021-04-28 17:13:48.503458 -0400 TCP_ADAPTOR (debug) [C3] handle_outgoing calling pn_raw_connection_write_close(). rcv_complete:T, send_complete:T
> 2021-04-28 17:13:48.503521 -0400 TCP_ADAPTOR (debug) [C3][L28] qdr_tcp_offer: NOOP
> 2021-04-28 17:13:48.503544 -0400 TCP_ADAPTOR (debug) [C3][L28] qdr_tcp_get_credit: NOOP
> 2021-04-28 17:13:48.503565 -0400 TCP_ADAPTOR (debug) [C3] PN_RAW_CONNECTION_WAKE listener
> 2021-04-28 17:13:48.503670 -0400 TCP_ADAPTOR (debug) [C3] PN_RAW_CONNECTION_CLOSED_WRITE listener
> 2021-04-28 17:13:48.503712 -0400 TCP_ADAPTOR (debug) [C3] qdr_tcp_activate: call pn_raw_connection_wake()
> 2021-04-28 17:13:48.503752 -0400 TCP_ADAPTOR (debug) [C3] PN_RAW_CONNECTION_WAKE listener
> 2021-04-28 17:13:48.503830 -0400 TCP_ADAPTOR (debug) [C3][L28][D22] qdr_tcp_delivery_update: disp: 38, settled: false
> 2021-04-28 17:13:48.503852 -0400 TCP_ADAPTOR (debug) [C3][L28][D22] qdr_tcp_delivery_update: disp: 38, settled: false
> 2021-04-28 17:13:48.503868 -0400 TCP_ADAPTOR (debug) [C3][L28] qdr_tcp_get_credit: NOOP
> 2021-04-28 17:13:48.503932 -0400 TCP_ADAPTOR (debug) [C3] PN_RAW_CONNECTION_READ listener Event 
> 2021-04-28 17:13:48.503942 -0400 TCP_ADAPTOR (trace) [C3][L28] handle_incoming PNRC_READ for listener connection. read_closed:F, flow_enabled:T
> 2021-04-28 17:13:48.503950 -0400 TCP_ADAPTOR (debug) [C3] pn_raw_connection_take_read_buffers() took 0, freed 0
> 2021-04-28 17:13:48.503957 -0400 TCP_ADAPTOR (debug) [C3][L28] Granting 0 to pn_raw_connection_give_read_buffers()
> 2021-04-28 17:13:48.503965 -0400 TCP_ADAPTOR (debug) [C3] PN_RAW_CONNECTION_READ Read 0 bytes. Total read 45488165 bytes
> 2021-04-28 17:13:48.503973 -0400 TCP_ADAPTOR (debug) [C3] PN_RAW_CONNECTION_NEED_READ_BUFFERS listener
> 2021-04-28 17:13:48.503981 -0400 TCP_ADAPTOR (debug) [C3][L28] Granting 0 to pn_raw_connection_give_read_buffers()
> 2021-04-28 17:13:48.503988 -0400 TCP_ADAPTOR (trace) [C3][L28] handle_incoming PNRC_NEED_READ_BUFFERS for listener connection. read_closed:F, flow_enabled:T
> 2021-04-28 17:13:48.503996 -0400 TCP_ADAPTOR (debug) [C3] pn_raw_connection_take_read_buffers() took 0, freed 0
> 2021-04-28 17:13:48.504003 -0400 TCP_ADAPTOR (debug) [C3][L28] Granting 0 to pn_raw_connection_give_read_buffers(){code}



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

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