Alan Conway created PROTON-1849:
-----------------------------------
Summary: CLONE - [c] server behaves incorrectly on duplicate link
attach
Key: PROTON-1849
URL: https://issues.apache.org/jira/browse/PROTON-1849
Project: Qpid Proton
Issue Type: Bug
Components: proton-c
Affects Versions: proton-c-0.22.0
Reporter: Alan Conway
Assignee: Alan Conway
There is a disabled test to reproduce this problem, see
test_duplicate_link_client() in
[https://github.com/alanconway/qpid-proton/blob/master/c/tests/connection_driver.c#L498]
pni_process does all pending link opens before all pending link closes, it does
not respect the order of individual open/close calls in the code. This doesn't
cause a problem for distinct links but if a link of the same name is
opened/closed/reopened very quickly it can cause a problem:
For example if l1 and l2 are both pn_links with name "x" then this sequence:
{code:java}
open(l1); close(l1); open(l2){code}
generates this illegal protocol sequence:
{code:java}
attach("x"); attach("x"); detach(0) // 0 is the handle assigned to "x"{code}
instead of the intended legal sequence:
{code:java}
attach("x"); detach(0); attach("x") // detach(0) detaches the first "x" so
second "x" is allowed{code}
NOTE: This applies to all endpoints, not just links but since connections and
sessions don't have client-assignable names that can clash, the problem only
shows up for links and only if the detach/attach for the same name is processed
in the same transport batch. This is unlikely in practice and was discovered
only because of investigation of PROTON-1832.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]