[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Rob Godfrey (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215831#comment-16215831
 ] 

Rob Godfrey commented on QPID-7981:
---

{quote}
What is that difference? I.e. what would the remote peer do differently for 
null v. empty? The spec states that to recover a link you send an empty 
terminus.
{quote}
Hmm - that is *very* bad wording  on the part of the spec there (again I'll 
JIRA it and look for similar imprecise usage). The word empty there should be 
read as the field being empty (null).  Since no concrete implementations of the 
terminus archetypes are defined here the "empty" terminus as we have been 
casually using the word in this JIRA discussion has no meaning (precisely 
speaking we should probably talk about a described type with symbolic 
descriptor "amqp:source" or ulong descriptor "0x:0x0028" having a 
described value of a zero element list). 

Leaving the terminus (source/target) field empty (i.e. null) is used for 
recovery ("I have forgotten the nature of the remote terminus and am looking to 
you to tell me").

If a non null terminus is supplied, then the remote peer has a choice - it can 
simply ignore the non-null value and supply the terminus that is currently 
associated with the link, or it can assume that its partner wishes to change 
the definition of the link and replace the terminus and act accordingly (I 
guess theoretically it could also just randomly assign a different terminus 
still, but we can probably ignore that case).  Depending on the nature of the 
remote container, link properties, the remote terminus, either of the two 
options (assert the existing terminus / replace with new terminus) may occur.  
The only *safe* way to recover is to be explicit in your desire to take the 
remote terminus as the remote container understands it.


> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Gordon Sim (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215778#comment-16215778
 ] 

Gordon Sim commented on QPID-7981:
--

{quote}It is the only meaning when speaking of the local terminus. {quote}

Which is the case this issue was raised for.

{quote}When used for the remote source/target it is the difference between "i 
don't remember/I don't care what the remote terminus looks like" (null) and "I 
specifically want the empty terminus" (empty).{quote}

What is that difference? I.e. what would the remote peer do differently for 
null v. empty? The spec states that to recover a link you send an empty 
terminus.

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at 
> org.apache.qpid.server.bytebuffer.QpidByteBuffer.lambda$null$0(QpidByteBuffer.java:1396)
>   at java.lang.Thread.run(Thread.java:748)
> {noformat}
> The second 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Rob Godfrey (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215760#comment-16215760
 ] 

Rob Godfrey commented on QPID-7981:
---

{quote}
I am aware the protocol is symmetric, however the spec states: "If there is no 
pre-existing terminus, and the peer does not wish to create a new one, this is 
indicated by setting the
local terminus (source or target as appropriate) to null." That wording only 
makes sense in the case that the link was initiated by the peer, i.e. where the 
local process is 'responding' to a 'request' from the peer.
{quote}
Correct, the specific case where it makes sense for a peer to send null as the 
*local* terminus is where it is acting in response to an attach it has received.
{quote}
As the spec says: "a peer MUST take responsibility for verifying that the 
remote terminus meets its requirements" and that makes perfect sense to me. The 
distinction between empty and null does not. If I ask for a remote target with 
address Q, whether the peer responds with either null or empty (or even with a 
target with address P as you suggest) doesn't seem important, neither matches 
my 'requirements'.
{quote}
It is correct that a peer MUST always verify - though I'll be honest and wonder 
how many actually do :-).  The fundamental difference that can be inferred from 
receiving null rather than empty or P from your partner is that null indicates 
that they got your attach and could not service it.  Receiving a non null 
terminus implies that either the request was sent spontaneously by your partner 
(unlikely if the relationship is client<->broker), or that the remote container 
considers this the resumption of an existing link where there is already a 
terminus associated.
{quote}
As the spec is defined, it never makes sense for the initiator of a link to set 
the local terminus to null (rather than empty), so the case of simultaneous 
initiation of a link by both peers needs to be detected by actually comparing 
fields of the remote terminus as the peer sees it with local expectations, not 
by relying on it being null. The only way it will be null is if it is indeed a 
response to a request. 
{quote}
Correct.  To guard against simultaneous link attachment (or unexpected link 
resumption) you *always* need to verify the remote terminus.  
{quote}
That is the only 'very specific meaning' of null, as opposed to empty.
{quote}
It is the only meaning *when speaking of the local terminus*.  
When used for the remote source/target it is the difference between "i don't 
remember/I don't care what the remote terminus looks like" (null) and "I 
specifically want the empty terminus" (empty).
{quote}
However, having re-read the spec on these points I can see that my 
'interpretation' was based on what I think is sensible rather than on what the 
spec actually states (though as a minor gripe on formatting, the diagrams use 
the character '-' to indicate both an 'empty' target (figure 2.36) and a 'null' 
target (figure 2.33) which doesn't help to convey the apparently important 
semantic distinction between them).
{quote}
I agree on the gripe with the formatting.  I'll raise an AMQP JIRA for this, 
and the need to include more examples of correct (and incorrect) patterns 
around link attachment.

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Gordon Sim (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215719#comment-16215719
 ] 

Gordon Sim commented on QPID-7981:
--

{quote}You are viewing this as a request-response protocol... The client is 
"requesting" and the broker is "responding". That is not how the protocol is 
defined. {quote}

I am aware the protocol is symmetric, however the spec states: "If there is no 
pre-existing terminus, and the peer does not wish to create a new one, this is 
indicated by setting the
local terminus (source or target as appropriate) to *null*." That wording only 
makes sense in the case that the link was initiated by the peer, i.e. where the 
local process is 'responding' to a 'request' from the peer.

As the spec says: "a peer MUST take responsibility for verifying that the 
remote terminus meets its requirements" and *that* makes perfect sense to me. 
The distinction between empty and null does not. If I ask for a remote target 
with address Q, whether the peer responds with either null or empty (or even 
with a target with address P as you suggest) doesn't seem important, neither 
matches my 'requirements'.

As the spec is defined, it never makes sense for the initiator of a link to set 
the local terminus to null (rather than empty), so the case of simultaneous 
initiation of a link by both peers needs to be detected by actually comparing 
fields of the remote terminus as the peer sees it with local expectations, not 
by relying on it being null. The only way it will be null is if it is indeed a 
response to a request. That is the only 'very specific meaning' of null, as 
opposed to empty.

However, having re-read the spec on these points I can see that my 
'interpretation' was based on what I think is sensible rather than on what the 
spec actually states (though as a minor gripe on formatting, the diagrams use 
the character '-' to indicate both an 'empty' target (figure 2.36) and a 'null' 
target (figure 2.33) which doesn't help to convey the apparently important 
semantic distinction between them).

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Gordon Sim (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215461#comment-16215461
 ] 

Gordon Sim commented on QPID-7981:
--

Fixed rhea in 
https://github.com/grs/rhea/commit/971a69e81d2b49e4d279e2d291bd4f7af8b564df

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at 
> org.apache.qpid.server.bytebuffer.QpidByteBuffer.lambda$null$0(QpidByteBuffer.java:1396)
>   at java.lang.Thread.run(Thread.java:748)
> {noformat}
> The second is if the {{Source}}  (again not mandatory) is omitted:
> {noformat}
> 2017-10-21 18:19:52,556 DEBUG [IO-/10.211.55.13:52035] 
> (o.a.q.s.p.v.f.FrameHandler) - RECV 89 bytes
> 2017-10-21 18:19:52,557 DEBUG [IO-/10.211.55.13:52035] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52035|0] : 
> 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Rob Godfrey (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215448#comment-16215448
 ] 

Rob Godfrey commented on QPID-7981:
---

{quote}
I think 'clients' notice when the source or target they have specified is not 
echoed back by the peer. That makes perfect sense to me.
{quote}

Sure - but that's precisely my point.  You are viewing this as a 
request-response protocol... The client is "requesting" and the broker is 
"responding".  That is not how the protocol is defined.  

The protocol is completely symmetric and either side might initiate 
(simultaneously) the link.  The attach performative is simply a way of stating 
the sender's view of how the link should be.  If both sides simultaneously send 
an attach for the same link name then a link is established.  It is unambiguous 
what the source and target actually are.  The attach sent by the "outgoing" 
peer speaks definitively for the source, the attach sent by the "incoming" peer 
speaks definitively for the target.  The link is always between the outgoing's 
source and the incoming's target.  Each side also gets to (optionally) say what 
they think the other side of the link should look like.  If an attach is 
received at a peer and it has not already sent an attach for the link, it can 
use the information sent by its partner in creating the local endpoint for the 
link.

>From a traditional client broker POV this seems backwards.  A client 
>publishing messages want to send messages to Q, and thus sends an attach for 
>an outgoing link with target Q.  According to the protocol there is nothing 
>stopping the broker from deciding that actually they are going to get a link 
>to target P instead.  Obviously doing so would be a gross violation of 
>expectations for a client-broker relationship.

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Gordon Sim (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215428#comment-16215428
 ] 

Gordon Sim commented on QPID-7981:
--

I'll add that I think the broker is wrong also. The apparent protocol violation 
from rhea is not that an attach must specify both source and target, but that 
it should either not accept or never send transfers over it. What it is sending 
is apparently valid it just has a 'very specific meaning'.

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at 
> org.apache.qpid.server.bytebuffer.QpidByteBuffer.lambda$null$0(QpidByteBuffer.java:1396)
>   at java.lang.Thread.run(Thread.java:748)
> {noformat}
> The second is if the {{Source}}  (again not mandatory) is omitted:
> {noformat}
> 2017-10-21 18:19:52,556 DEBUG [IO-/10.211.55.13:52035] 
> (o.a.q.s.p.v.f.FrameHandler) - RECV 89 bytes
> 2017-10-21 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Gordon Sim (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215420#comment-16215420
 ] 

Gordon Sim commented on QPID-7981:
--

{quote}the meaning is noticed (I think) by clients detecting that the remote 
side has been unable to set up the link{quote}

I think 'clients' notice when the source or target they have specified is not 
echoed back by the peer. That makes perfect sense to me.

{quote}I think the spec makes sense if you think of things in symmetric 
peer-to-peer terms.{quote}

Not to me, I'm afraid. In my view making a significant semantic distinction 
between a 'null' and an 'empty' value is likely to cause confusion. Robbie's 
point that you have to specify a descriptor I suppose mitigates this a little.

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at 
> 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Rob Godfrey (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215404#comment-16215404
 ] 

Rob Godfrey commented on QPID-7981:
---

There is obviously still a bug in the Broker here too... What it *should* be 
doing is noting the null source (if it is an incoming link from the broker's 
perspective) or target (for an outgoing link from the broker's perspective) and 
cleanly detaching/closing the link at the earliest opportunity.  It should not 
issue credit to the incoming link; and should close the connection if any 
messages are received.  For the outgoing link case one could also argue that it 
would be a protocol error justifying connection closure if credit were issued 
by the remote peer, though I'm not sure if that case is specifically brought up 
anywhere.  In any case the broker should respond to such an attach with an 
attach with null source and target and then detach the link.

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
>   at 
> 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Robbie Gemmell (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215381#comment-16215381
 ] 

Robbie Gemmell commented on QPID-7981:
--

{quote}
>From a given processes point of view, it is one or the other. Either it will 
>send messages over the link, or it will receive messages over it.
{quote}
Yes, but the source and a target details apply at both ends, regardless what 
end you are at there is a source and there is a target terminus for the link.  
The receiving end gets definitive definition of the target, and the sender gets 
definitive definition of the source, but the details apply at both ends. 

{quote}
I read those as applying to local decisions based on what was supplied by the 
peer. The previous sentence in each case seems to me to imply that the two 
'rules' apply to outgoing and incoming in turn.
{quote}
I don't think that is the case, I think it is clarifying that if the 
authoritative end of the link says there is no source/target, then there is no 
terminus and the next statement elaborates this means you cant transfer 
messages.

{quote}
That is optional though. Would a source or target whose fields were all null 
(or a source/target represented by an empty list) be allowed in your view? To 
me it doesn't seem sensible to insist on sending such a source/target as it has 
no extra information in it. As far as rhea goes, I could make a change that 
simply echoed the address in the 'other' terminus by default, but to me it 
seems redundant.
{quote}
The fields have to be optional to allow using null as a signal like they do, 
but I don't think that means you can ommit them otherwise. Including a 
source/target with the fields not set is the behaviour outlined in the other 
two links I included. Unlike some other areas (e.g the message, w.r.t to 
headers/properties sections), I don't think there is anything in the spec that 
says not including a source/target it is equivalent to incline a source/target 
without specific fields set. In particular, there are multiple types of target, 
so it would also have to say which type you used.

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Rob Godfrey (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215376#comment-16215376
 ] 

Rob Godfrey commented on QPID-7981:
---

{quote}
Interesting that this is the first occasion it has been noticed then. Seems 
most implementations do not recognise that very specific meaning.
{quote}

the meaning is noticed (I think) by clients detecting that the remote side has 
been unable to set up the link.  I'm not terribly surprised that servers (which 
generally don't care very much about the remote side of the link) haven't 
detected this until now (though they probably should have done).

I agree with your earlier points that the spec is not clearly worded here (as 
in many places it valued terseness over explanatory discourse); and I won't 
argue very hard on the complexity point either :-) I think the spec makes sense 
if you think of things in symmetric peer-to-peer terms.  In a more 
client-server context it seems a little silly to enforce it because you *know* 
that one side it the client and the other is the server, and the server is the 
thing that matters.

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
> 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Gordon Sim (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215367#comment-16215367
 ] 

Gordon Sim commented on QPID-7981:
--

{quote}not setting a source has a very specific meaning if you are the sender 
of messages{quote}

Interesting that this is the first occasion it has been noticed then. Seems 
most implementations do not recognise that very specific meaning.

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at 
> org.apache.qpid.server.bytebuffer.QpidByteBuffer.lambda$null$0(QpidByteBuffer.java:1396)
>   at java.lang.Thread.run(Thread.java:748)
> {noformat}
> The second is if the {{Source}}  (again not mandatory) is omitted:
> {noformat}
> 2017-10-21 18:19:52,556 DEBUG [IO-/10.211.55.13:52035] 
> (o.a.q.s.p.v.f.FrameHandler) - RECV 89 bytes
> 2017-10-21 18:19:52,557 DEBUG [IO-/10.211.55.13:52035] (o.a.q.s.p.frame) - 
> 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Lorenz Quack (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215368#comment-16215368
 ] 

Lorenz Quack commented on QPID-7981:


Gordon wrote:
{quote}
I believe that the source is set for the 'outgoing' link, i.e. the link on 
which the client will receive messages. However the target is not.
{quote}
The stacktraces that Keith put in the description suggest that this is not the 
case. I haven't run this myself but just looking at the stacktraces (which are 
from the broker's perspective) the {{StandardReceivingLinkEndpoint}} fails 
because {{source}} is {{null}} and {{SendingLinkEndpoint}} fail because 
{{target}} seems to be {{null}}. So either Rhea does not set them correctly or 
we do not save them correctly.

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at 
> 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Gordon Sim (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215360#comment-16215360
 ] 

Gordon Sim commented on QPID-7981:
--

bq. a peer (client) sending messages must provide a non-null source 

But that source can have all null fields? or be a zero length list?

bq. I think Rhea's behaviour here is wrong

Ok, I'll change it. (I think the spec is poorly worded and overly complicated).

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at 
> org.apache.qpid.server.bytebuffer.QpidByteBuffer.lambda$null$0(QpidByteBuffer.java:1396)
>   at java.lang.Thread.run(Thread.java:748)
> {noformat}
> The second is if the {{Source}}  (again not mandatory) is omitted:
> {noformat}
> 2017-10-21 18:19:52,556 DEBUG [IO-/10.211.55.13:52035] 
> (o.a.q.s.p.v.f.FrameHandler) - RECV 89 bytes
> 2017-10-21 18:19:52,557 DEBUG [IO-/10.211.55.13:52035] 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Rob Godfrey (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215358#comment-16215358
 ] 

Rob Godfrey commented on QPID-7981:
---

As above the definitions Robbie quotes:

{quote}
source  the source for messages optional *
If no source is specified on an outgoing link, then there is no source 
currently attached to the link. A link with no source will never produce 
outgoing messages.
target  the target for messages optional *
If no target is specified on an incoming link, then there is no target 
currently attached to the link. A link with no target will never permit 
incoming messages.
{quote}

Precisely define the meaning.  They are written from the perspective of the 
peer emitting the attach performative.  If sending an attach for a (to you) 
outgoing link, the source *must* be specified if you intend to send messages, 
since not specifying the source indicates that the local peer (the originator 
of messages) were unable/unwilling to construct a source.  All fields on a 
source are optional, so the source object can be "empty", but not setting a 
source has a very specific meaning if you are the sender of messages. 

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>   at 
> 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Gordon Sim (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215349#comment-16215349
 ] 

Gordon Sim commented on QPID-7981:
--

{quote}Depending on the perspective of which end you are at, a single link is 
both incoming and outgoing. {quote}

>From a given processes point of view, it is one or the other. Either it will 
>send messages over the link, or it will receive messages over it.

{quote}So if "A link with no source will never produce outgoing messages" and " 
A link with no target will never permit incoming messages. " then it would seem 
both are needed for transfer over the link.{quote}

I read those as applying to local decisions based on what was supplied by the 
peer. The previous sentence in each case seems to me to imply that the two 
'rules' apply to outgoing and incoming in turn.

{quote}The source sets the details of what dispositions etc are allowed, so if 
you haven't set one it would seem odd that you could send messages to someone 
else{quote}

That is optional though. Would a source or target whose fields were all null 
(or a source/target represented by an empty list) be allowed in your view? To 
me it doesn't seem sensible to insist on sending such a source/target as it has 
no extra information in it. As far as rhea goes, I could make a change that 
simply echoed the address in the 'other' terminus by default, but to me it 
seems redundant.

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Rob Godfrey (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215341#comment-16215341
 ] 

Rob Godfrey commented on QPID-7981:
---

I agree with [~gemmellr]; the intention of making the source/target optional 
was that a null value for the *local* endpoint indicates that the link cannot 
be set up, a null for the *remote* endpoint indicates that you don't have 
knowledge/preference and expect to hear from the remote peer as to the nature 
of that endpoint.

So a peer (client) sending messages *must* provide a non-null source, and *may* 
provide a non-null target.  If the target is null then it is expecting the 
remote partner (broker) to recover the information about the target.
A peer (client) receiving messages *must* provide a non-null target, and *may* 
provide a non-null source.

I think Rhea's behaviour here is wrong.  

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Robbie Gemmell (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215332#comment-16215332
 ] 

Robbie Gemmell commented on QPID-7981:
--

To be clear, I'm not saying the broker can't choose to handle this in some way, 
as I'm sure others do that already, just that its not really a broker bug as 
such and I don't think the client should do it.

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at 
> org.apache.qpid.server.bytebuffer.QpidByteBuffer.lambda$null$0(QpidByteBuffer.java:1396)
>   at java.lang.Thread.run(Thread.java:748)
> {noformat}
> The second is if the {{Source}}  (again not mandatory) is omitted:
> {noformat}
> 2017-10-21 18:19:52,556 DEBUG [IO-/10.211.55.13:52035] 
> (o.a.q.s.p.v.f.FrameHandler) - RECV 89 bytes
> 2017-10-21 18:19:52,557 DEBUG [IO-/10.211.55.13:52035] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52035|0] 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Robbie Gemmell (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215297#comment-16215297
 ] 

Robbie Gemmell commented on QPID-7981:
--

Depending on the perspective of which end you are at, a single link is both 
incoming and outgoing. So if "A link with no source will never produce outgoing 
messages" and " A link with no target will never permit incoming messages. " 
then it would seem both are needed for transfer over the link.

The source sets the details of what dispositions etc are allowed, so if you 
havent set one it would seem odd that you could send messages to someone else, 
and similarly if there is no target its unclear what the other party is sending 
to since the link apparently has no terminus attached.

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at 
> 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Gordon Sim (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215231#comment-16215231
 ] 

Gordon Sim commented on QPID-7981:
--

I believe that the source *is* set for the 'outgoing' link, i.e. the link on 
which the client will receive messages. However the target is not.

Likewise for the 'incoming' link i.e. the link on which the client will send 
messages to the broker, the target is set but not the source.

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at 
> org.apache.qpid.server.bytebuffer.QpidByteBuffer.lambda$null$0(QpidByteBuffer.java:1396)
>   at java.lang.Thread.run(Thread.java:748)
> {noformat}
> The second is if the {{Source}}  (again not mandatory) is omitted:
> {noformat}
> 2017-10-21 18:19:52,556 DEBUG [IO-/10.211.55.13:52035] 
> (o.a.q.s.p.v.f.FrameHandler) - RECV 89 bytes
> 2017-10-21 18:19:52,557 DEBUG 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Robbie Gemmell (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215209#comment-16215209
 ] 

Robbie Gemmell commented on QPID-7981:
--

Thoughts, [~gsim], [~rgodfrey] ?

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
>   at 
> org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
>   at 
> org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at 
> org.apache.qpid.server.bytebuffer.QpidByteBuffer.lambda$null$0(QpidByteBuffer.java:1396)
>   at java.lang.Thread.run(Thread.java:748)
> {noformat}
> The second is if the {{Source}}  (again not mandatory) is omitted:
> {noformat}
> 2017-10-21 18:19:52,556 DEBUG [IO-/10.211.55.13:52035] 
> (o.a.q.s.p.v.f.FrameHandler) - RECV 89 bytes
> 2017-10-21 18:19:52,557 DEBUG [IO-/10.211.55.13:52035] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52035|0] : 
> Attach{name=c2c65769-7d3b-5440-b8fb-f00badbddd0d,handle=1,role=sender,target=Target{address=examples},initialDeliveryCount=0}
> 2017-10-21 18:19:52,562 DEBUG 

[jira] [Commented] (QPID-7981) [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.

2017-10-23 Thread Robbie Gemmell (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16215195#comment-16215195
 ] 

Robbie Gemmell commented on QPID-7981:
--

I think I'd class that as a bug in rhea or its examples. My understanding of 
the spec is that while source and target are optional, thats to allow omitting 
them to signal that there isn't one or to enable recovery of an existing link, 
and that links expecting to transfer messages need the source and target set 
even if their fields aren't specifically set to anything (some fields do have 
defaults, or described behaviour when not set).

{quote}
source  the source for messages optional *
If no source is specified on an outgoing link, then there is no source 
currently attached to the link. A link with no source will never produce 
outgoing messages.

target  the target for messages optional *
If no target is specified on an incoming link, then there is no target 
currently attached to the link. A link with no target will never permit 
incoming messages. 
{quote}
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#type-attach

http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-source
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-target

> [Java Broker] [AMQP1.0] Protocol layer assumes source and target are not null.
> --
>
> Key: QPID-7981
> URL: https://issues.apache.org/jira/browse/QPID-7981
> Project: Qpid
>  Issue Type: Bug
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Testing the Broker against Rhea's {{example/helloworld.js}} shows that the 
> AMQP 1.0 protocol layer fails in at least two places.
> The first is if the {{Target}} (not mandatory) is omitted from the incoming 
> attach.
> {noformat}
> 2017-10-21 18:13:20,609 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.frame) - 
> RECV[/10.211.55.13:52033|0] : 
> Attach{name=7e65e0a0-961f-e941-b42b-262380143f76,handle=0,role=receiver,source=Source{address=examples}}
> 2017-10-21 18:13:20,622 DEBUG [IO-/10.211.55.13:52033] (o.a.q.s.p.v.LinkImpl) 
> - Error attaching link
> java.lang.NullPointerException: null
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.createConsumerTarget(SendingLinkEndpoint.java:209)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.attachReceived(SendingLinkEndpoint.java:636)
>   at 
> org.apache.qpid.server.protocol.v1_0.SendingLinkEndpoint.establishLink(SendingLinkEndpoint.java:352)
>   at 
> org.apache.qpid.server.protocol.v1_0.AbstractLinkEndpoint.receiveAttach(AbstractLinkEndpoint.java:131)
>   at 
> org.apache.qpid.server.protocol.v1_0.LinkImpl.attach(LinkImpl.java:106)
>   at 
> org.apache.qpid.server.protocol.v1_0.Session_1_0.receiveAttach(Session_1_0.java:210)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveAttach(AMQPConnection_1_0Impl.java:435)
>   at 
> org.apache.qpid.server.protocol.v1_0.type.transport.Attach.invoke(Attach.java:366)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:517)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$receive$0(AMQPConnection_1_0Impl.java:469)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:463)
>   at 
> org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:211)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1316)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1291)
>   at 
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:606)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnectionTLSDelegate.processData(NonBlockingConnectionTLSDelegate.java:136)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:496)
>   at 
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
>   at 
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
>   at 
> org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
>   at 
>