qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robbie Gemmell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PROTON-1745) [proton-c] PN_CONNECTION_BOUND event is emitted too soon
Date Wed, 24 Jan 2018 16:52:00 GMT

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

Robbie Gemmell commented on PROTON-1745:
----------------------------------------

FWIW, I was able to run the DISPATCH 1.0.0 build and tests against the current proton-master
(1af693c56d9040cad599c922b8f525dc48ba4084) incorporating this change (and those from PROTON-1727
which sparked DISPATCH-912 etc).

> [proton-c] PN_CONNECTION_BOUND event is emitted too soon
> --------------------------------------------------------
>
>                 Key: PROTON-1745
>                 URL: https://issues.apache.org/jira/browse/PROTON-1745
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: proton-c-0.20.0
>         Environment: Fedora 27
>            Reporter: Chuck Rolke
>            Assignee: Cliff Jansen
>            Priority: Major
>              Labels: regression
>             Fix For: proton-c-0.20.0
>
>         Attachments: p1745_0.diff
>
>
> During a PN_CONNECTION_BOUND event proton socket information is not available. At  PN_CONNECTION_REMOTE_OPEN
the info is available.
> I instrumented an event loop in qpid-dispatch to log the event names as they are delivered
and to log the result of creating a qd_connection rhost_port name. The source:
> {noformat}
>     case PN_CONNECTION_BOUND:
>         on_connection_bound(qd_server, e);
>         // HACK ALERT
>         pn_connection_t *pn_conn = pn_event_connection(e);
>         qd_connection_t *qd_conn = pn_connection_get_context(pn_conn);
>         set_rhost_port(pn_conn, qd_conn);
>         qd_log(qd_server->log_source, QD_LOG_CRITICAL, 
>             "At end of connection bound the name is: %s", qd_connection_name(ctx));
>         // END HACK ALERT
>         break;
>     case PN_CONNECTION_REMOTE_OPEN:
>         {
>         // HACK ALERT
>         pn_connection_t *pn_conn = pn_event_connection(e);
>         qd_connection_t *qd_conn = pn_connection_get_context(pn_conn);
>         set_rhost_port(pn_conn, qd_conn);
>         qd_log(qd_server->log_source, QD_LOG_CRITICAL, 
>             "At entry to remote open the name is: %s", qd_connection_name(ctx));
>         /// END HACK ALERT
> {noformat}
>  
> The log file shows:
> {noformat}
> 2018-01-17 12:38:35.224859 -0500 SERVER (critical) ***** handle sees event: PN_CONNECTION_INIT
(/home/chug/git/qpid-dispatch/src/server.c:845)
> 2018-01-17 12:38:35.224868 -0500 SERVER (critical) ***** handle sees event: PN_CONNECTION_BOUND
(/home/chug/git/qpid-dispatch/src/server.c:845)
> 2018-01-17 12:38:35.224890 -0500 SERVER (critical) At end of connection bound the name
is: err: -6 (/home/chug/git/qpid-dispatch/src/server.c:887)
> 2018-01-17 12:38:35.224965 -0500 SERVER (critical) ***** handle sees event: PN_CONNECTION_REMOTE_OPEN
(/home/chug/git/qpid-dispatch/src/server.c:845)
> 2018-01-17 12:38:35.224971 -0500 SERVER (critical) At entry to remote open the name is:
127.0.0.1:46722 (/home/chug/git/qpid-dispatch/src/server.c:895){noformat}
> The "err -6" is a snoop on the return result of getnameinfo(): EAI_FAMILY 'ai_family'
not supported. I suspect it's because the returned socket is junk.
> The code works correctly in 0.19.0, commit fe3c3



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message