Charles E. Rolke created PROTON-2373:
----------------------------------------
Summary: [c] Raw connection fast-close yields variable event stream
Key: PROTON-2373
URL: https://issues.apache.org/jira/browse/PROTON-2373
Project: Qpid Proton
Issue Type: Bug
Components: proton-c
Affects Versions: proton-c-0.34.0
Reporter: Charles E. Rolke
h3. Description
A raw connection client sends a TCP FIN immediately after opening a connection
and sending five bytes of data. The raw connection does not send the same
sequence of events to qpid-dispatch router for every repeat of this test.
h3. Reproducer and Discussion
For background see DISPATCH-1878 For an illustration of this issue see file
DISPATCH-1878 attachment_fail-pn-raw-closed-before-ingress-stream-set-up.svg
h3. Normal case
The Dispatch TCP adaptor is expecting to see 1) PN_RAW_CONNECTION_CONNECTED
followed by 2) PN_RAW_CONNECTION_WAKE. The WAKE will cause a few code trips
through handle_incoming_impl function where it waits for the ingress delivery
and stream message to get set up. During listener connection setup
handle_incoming expects pn_raw_connection_is_read_closed() to return false.
h3. Failed case
In the failed case the first events are 1) PN_RAW_CONNECTION_CONNECTED and 2)
PN_RAW_CONNECTION_NEED_WRITE_BUFFERS. The first call to handle_incoming sees
pn_raw_connection_is_read_closed() return true. This causes the receive
listener connection to run state handling before the ingress delivery and
stream messaage is set up.
h3. Design Issues
What is the expected, and guaranteed, sequence of events for a raw connection
that is gets closed immediately?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]