You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org> on 2006/09/21 11:41:22 UTC

[jira] Created: (QPID-7) Occasionally messages are ack'd more than once

Occasionally messages are ack'd more than once
----------------------------------------------

                 Key: QPID-7
                 URL: http://issues.apache.org/jira/browse/QPID-7
             Project: Qpid
          Issue Type: Bug
            Reporter: Martin Ritchie


When running a single queue and sending and receiving to that queue in the same session (Not in a transaction) occasionally the broker appears to get multiple acks for a given tag. Interestingly when running inside a transaction this doesn't happen.

2006-09-21 10:35:24,763 ERROR [pool-10-thread-4] state.AMQStateManager (AMQStateManager.java:150) - State manager received error notification: org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for channel:1
org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for channel:1
	at org.apache.qpid.server.AMQChannel.handleAcknowledgement(AMQChannel.java:550)
	at org.apache.qpid.server.AMQChannel.acknowledgeMessage(AMQChannel.java:492)
	at org.apache.qpid.server.handler.BasicAckMethodHandler.methodReceived(BasicAckMethodHandler.java:50)
	at org.apache.qpid.server.state.AMQStateManager.methodReceived(AMQStateManager.java:165)
	at org.apache.qpid.server.protocol.AMQMinaProtocolSession.methodFrameReceived(AMQMinaProtocolSession.java:358)
	at org.apache.qpid.server.protocol.AMQMinaProtocolSession.dataBlockReceived(AMQMinaProtocolSession.java:326)
	at org.apache.qpid.server.protocol.AMQPFastProtocolHandler.messageReceived(AMQPFastProtocolHandler.java:181)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Resolved: (QPID-7) Occasionally messages are ack'd more than once

Posted by Martin Ritchie <ri...@apache.org>.
There is a comment on the JIRA with a description of what the
resolution was. Do you want more details?

Martin Ritchie [27/Sep/06 04:40 AM]
Revision 450401.

While the data was being put in tot the unack'd map correctly the sync
block did not include the writeFrame call hence the messages could be
sent to client out of order.

This revision should finally resolve this issue.


On 29/09/06, John O'Hara <jo...@gmail.com> wrote:
> Can you add a wee note saying roughly how it was fixed?
>
> On 29/09/06, Martin Ritchie (JIRA) <qp...@incubator.apache.org> wrote:
> >
> >      [ http://issues.apache.org/jira/browse/QPID-7?page=all ]
> >
> > Martin Ritchie resolved QPID-7.
> > -------------------------------
> >
> >     Resolution: Fixed
> >
> > See other comments
> >
> > > Occasionally messages are ack'd more than once
> > > ----------------------------------------------
> > >
> > >                 Key: QPID-7
> > >                 URL: http://issues.apache.org/jira/browse/QPID-7
> > >             Project: Qpid
> > >          Issue Type: Bug
> > >          Components: Java Broker
> > >            Reporter: Martin Ritchie
> > >         Assigned To: Martin Ritchie
> > >
> > > When running a single queue and sending and receiving to that queue in
> > the same session (Not in a transaction) occasionally the broker appears to
> > get multiple acks for a given tag. Interestingly when running inside a
> > transaction this doesn't happen.
> > > 2006-09-21 10:35:24,763 ERROR [pool-10-thread-4] state.AMQStateManager (
> > AMQStateManager.java:150) - State manager received error notification:
> > org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for
> > channel:1
> > > org.apache.qpid.AMQException: Single ack on delivery tag 434 not known
> > for channel:1
> > >       at org.apache.qpid.server.AMQChannel.handleAcknowledgement(
> > AMQChannel.java:550)
> > >       at org.apache.qpid.server.AMQChannel.acknowledgeMessage(
> > AMQChannel.java:492)
> > >       at
> > org.apache.qpid.server.handler.BasicAckMethodHandler.methodReceived(
> > BasicAckMethodHandler.java:50)
> > >       at org.apache.qpid.server.state.AMQStateManager.methodReceived(
> > AMQStateManager.java:165)
> > >       at
> > org.apache.qpid.server.protocol.AMQMinaProtocolSession.methodFrameReceived
> > (AMQMinaProtocolSession.java:358)
> > >       at
> > org.apache.qpid.server.protocol.AMQMinaProtocolSession.dataBlockReceived(
> > AMQMinaProtocolSession.java:326)
> > >       at
> > org.apache.qpid.server.protocol.AMQPFastProtocolHandler.messageReceived(
> > AMQPFastProtocolHandler.java:181)
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > If you think it was sent incorrectly contact one of the administrators:
> > http://issues.apache.org/jira/secure/Administrators.jspa
> > -
> > For more information on JIRA, see: http://www.atlassian.com/software/jira
> >
> >
> >
>
>


-- 
Martin Ritchie

Re: [jira] Resolved: (QPID-7) Occasionally messages are ack'd more than once

Posted by John O'Hara <jo...@gmail.com>.
Can you add a wee note saying roughly how it was fixed?

On 29/09/06, Martin Ritchie (JIRA) <qp...@incubator.apache.org> wrote:
>
>      [ http://issues.apache.org/jira/browse/QPID-7?page=all ]
>
> Martin Ritchie resolved QPID-7.
> -------------------------------
>
>     Resolution: Fixed
>
> See other comments
>
> > Occasionally messages are ack'd more than once
> > ----------------------------------------------
> >
> >                 Key: QPID-7
> >                 URL: http://issues.apache.org/jira/browse/QPID-7
> >             Project: Qpid
> >          Issue Type: Bug
> >          Components: Java Broker
> >            Reporter: Martin Ritchie
> >         Assigned To: Martin Ritchie
> >
> > When running a single queue and sending and receiving to that queue in
> the same session (Not in a transaction) occasionally the broker appears to
> get multiple acks for a given tag. Interestingly when running inside a
> transaction this doesn't happen.
> > 2006-09-21 10:35:24,763 ERROR [pool-10-thread-4] state.AMQStateManager (
> AMQStateManager.java:150) - State manager received error notification:
> org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for
> channel:1
> > org.apache.qpid.AMQException: Single ack on delivery tag 434 not known
> for channel:1
> >       at org.apache.qpid.server.AMQChannel.handleAcknowledgement(
> AMQChannel.java:550)
> >       at org.apache.qpid.server.AMQChannel.acknowledgeMessage(
> AMQChannel.java:492)
> >       at
> org.apache.qpid.server.handler.BasicAckMethodHandler.methodReceived(
> BasicAckMethodHandler.java:50)
> >       at org.apache.qpid.server.state.AMQStateManager.methodReceived(
> AMQStateManager.java:165)
> >       at
> org.apache.qpid.server.protocol.AMQMinaProtocolSession.methodFrameReceived
> (AMQMinaProtocolSession.java:358)
> >       at
> org.apache.qpid.server.protocol.AMQMinaProtocolSession.dataBlockReceived(
> AMQMinaProtocolSession.java:326)
> >       at
> org.apache.qpid.server.protocol.AMQPFastProtocolHandler.messageReceived(
> AMQPFastProtocolHandler.java:181)
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

[jira] Updated: (QPID-7) Occasionally messages are ack'd more than once

Posted by "Marnie McCormack (JIRA)" <qp...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/QPID-7?page=all ]

Marnie McCormack updated QPID-7:
--------------------------------

    Fix Version/s: M1

> Occasionally messages are ack'd more than once
> ----------------------------------------------
>
>                 Key: QPID-7
>                 URL: http://issues.apache.org/jira/browse/QPID-7
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>            Reporter: Martin Ritchie
>         Assigned To: Martin Ritchie
>             Fix For: M1
>
>
> When running a single queue and sending and receiving to that queue in the same session (Not in a transaction) occasionally the broker appears to get multiple acks for a given tag. Interestingly when running inside a transaction this doesn't happen.
> 2006-09-21 10:35:24,763 ERROR [pool-10-thread-4] state.AMQStateManager (AMQStateManager.java:150) - State manager received error notification: org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for channel:1
> org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for channel:1
> 	at org.apache.qpid.server.AMQChannel.handleAcknowledgement(AMQChannel.java:550)
> 	at org.apache.qpid.server.AMQChannel.acknowledgeMessage(AMQChannel.java:492)
> 	at org.apache.qpid.server.handler.BasicAckMethodHandler.methodReceived(BasicAckMethodHandler.java:50)
> 	at org.apache.qpid.server.state.AMQStateManager.methodReceived(AMQStateManager.java:165)
> 	at org.apache.qpid.server.protocol.AMQMinaProtocolSession.methodFrameReceived(AMQMinaProtocolSession.java:358)
> 	at org.apache.qpid.server.protocol.AMQMinaProtocolSession.dataBlockReceived(AMQMinaProtocolSession.java:326)
> 	at org.apache.qpid.server.protocol.AMQPFastProtocolHandler.messageReceived(AMQPFastProtocolHandler.java:181)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (QPID-7) Occasionally messages are ack'd more than once

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/QPID-7?page=all ]

Martin Ritchie resolved QPID-7.
-------------------------------

    Resolution: Fixed

See other comments

> Occasionally messages are ack'd more than once
> ----------------------------------------------
>
>                 Key: QPID-7
>                 URL: http://issues.apache.org/jira/browse/QPID-7
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>            Reporter: Martin Ritchie
>         Assigned To: Martin Ritchie
>
> When running a single queue and sending and receiving to that queue in the same session (Not in a transaction) occasionally the broker appears to get multiple acks for a given tag. Interestingly when running inside a transaction this doesn't happen.
> 2006-09-21 10:35:24,763 ERROR [pool-10-thread-4] state.AMQStateManager (AMQStateManager.java:150) - State manager received error notification: org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for channel:1
> org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for channel:1
> 	at org.apache.qpid.server.AMQChannel.handleAcknowledgement(AMQChannel.java:550)
> 	at org.apache.qpid.server.AMQChannel.acknowledgeMessage(AMQChannel.java:492)
> 	at org.apache.qpid.server.handler.BasicAckMethodHandler.methodReceived(BasicAckMethodHandler.java:50)
> 	at org.apache.qpid.server.state.AMQStateManager.methodReceived(AMQStateManager.java:165)
> 	at org.apache.qpid.server.protocol.AMQMinaProtocolSession.methodFrameReceived(AMQMinaProtocolSession.java:358)
> 	at org.apache.qpid.server.protocol.AMQMinaProtocolSession.dataBlockReceived(AMQMinaProtocolSession.java:326)
> 	at org.apache.qpid.server.protocol.AMQPFastProtocolHandler.messageReceived(AMQPFastProtocolHandler.java:181)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (QPID-7) Occasionally messages are ack'd more than once

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/QPID-7?page=comments#action_12438101 ] 
            
Martin Ritchie commented on QPID-7:
-----------------------------------

Revision 450401.

While the data was being put in tot the unack'd map correctly the sync block did not include the writeFrame call hence the messages could be sent to client out of order.

This revision should finally resolve this issue.


> Occasionally messages are ack'd more than once
> ----------------------------------------------
>
>                 Key: QPID-7
>                 URL: http://issues.apache.org/jira/browse/QPID-7
>             Project: Qpid
>          Issue Type: Bug
>            Reporter: Martin Ritchie
>
> When running a single queue and sending and receiving to that queue in the same session (Not in a transaction) occasionally the broker appears to get multiple acks for a given tag. Interestingly when running inside a transaction this doesn't happen.
> 2006-09-21 10:35:24,763 ERROR [pool-10-thread-4] state.AMQStateManager (AMQStateManager.java:150) - State manager received error notification: org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for channel:1
> org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for channel:1
> 	at org.apache.qpid.server.AMQChannel.handleAcknowledgement(AMQChannel.java:550)
> 	at org.apache.qpid.server.AMQChannel.acknowledgeMessage(AMQChannel.java:492)
> 	at org.apache.qpid.server.handler.BasicAckMethodHandler.methodReceived(BasicAckMethodHandler.java:50)
> 	at org.apache.qpid.server.state.AMQStateManager.methodReceived(AMQStateManager.java:165)
> 	at org.apache.qpid.server.protocol.AMQMinaProtocolSession.methodFrameReceived(AMQMinaProtocolSession.java:358)
> 	at org.apache.qpid.server.protocol.AMQMinaProtocolSession.dataBlockReceived(AMQMinaProtocolSession.java:326)
> 	at org.apache.qpid.server.protocol.AMQPFastProtocolHandler.messageReceived(AMQPFastProtocolHandler.java:181)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (QPID-7) Occasionally messages are ack'd more than once

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/QPID-7?page=comments#action_12438077 ] 
            
Martin Ritchie commented on QPID-7:
-----------------------------------

javax.jms.JMSException: Failed to commit: Error: Failed to commit: Multiple ack on delivery tag 460 not known for channel [error code 0] [error code 0]
javax.jms.JMSException: Failed to commit: Error: Failed to commit: Multiple ack on delivery tag 460 not known for channel [error code 0] [error code 0]
        at org.apache.qpid.client.AMQSession.commit(AMQSession.java:414)
        at com.ibm.uk.hursley.perfharness.jms.r11.PutGet.oneIteration(PutGet.java:199)
        at com.ibm.uk.hursley.perfharness.WorkerThread.pace(WorkerThread.java:163)
        at com.ibm.uk.hursley.perfharness.jms.r11.PutGet.run(PutGet.java:124)
org.apache.qpid.AMQChannelClosedException: Error: Failed to commit: Multiple ack on delivery tag 460 not known for channel [error code 0] [error code 0]
        at org.apache.qpid.client.handler.ChannelCloseMethodHandler.methodReceived(ChannelCloseMethodHandler.java:73)
        at org.apache.qpid.client.state.AMQStateManager.methodReceived(AMQStateManager.java:148)
        at org.apache.qpid.client.protocol.AMQProtocolHandler$1.methodReceived(AMQProtocolHandler.java:98)
        at org.apache.qpid.client.protocol.AMQProtocolHandler.messageReceived(AMQProtocolHandler.java:310)

This test ran all night with no problem. Since I tidied up the code for svn and commited it the transacted case now fails.

> Occasionally messages are ack'd more than once
> ----------------------------------------------
>
>                 Key: QPID-7
>                 URL: http://issues.apache.org/jira/browse/QPID-7
>             Project: Qpid
>          Issue Type: Bug
>            Reporter: Martin Ritchie
>
> When running a single queue and sending and receiving to that queue in the same session (Not in a transaction) occasionally the broker appears to get multiple acks for a given tag. Interestingly when running inside a transaction this doesn't happen.
> 2006-09-21 10:35:24,763 ERROR [pool-10-thread-4] state.AMQStateManager (AMQStateManager.java:150) - State manager received error notification: org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for channel:1
> org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for channel:1
> 	at org.apache.qpid.server.AMQChannel.handleAcknowledgement(AMQChannel.java:550)
> 	at org.apache.qpid.server.AMQChannel.acknowledgeMessage(AMQChannel.java:492)
> 	at org.apache.qpid.server.handler.BasicAckMethodHandler.methodReceived(BasicAckMethodHandler.java:50)
> 	at org.apache.qpid.server.state.AMQStateManager.methodReceived(AMQStateManager.java:165)
> 	at org.apache.qpid.server.protocol.AMQMinaProtocolSession.methodFrameReceived(AMQMinaProtocolSession.java:358)
> 	at org.apache.qpid.server.protocol.AMQMinaProtocolSession.dataBlockReceived(AMQMinaProtocolSession.java:326)
> 	at org.apache.qpid.server.protocol.AMQPFastProtocolHandler.messageReceived(AMQPFastProtocolHandler.java:181)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (QPID-7) Occasionally messages are ack'd more than once

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/QPID-7?page=comments#action_12438075 ] 
            
Martin Ritchie commented on QPID-7:
-----------------------------------

The problem is located in AMQChannel and SubscriptionImpl

SubscriptionImpl was written with the understanding of a single publisher thread. With multiple publisher threading issues occur.

Duplicate delivery tags (Evidenced Here in the single ack error).
Out of order entry in to the unacknowledgedmap (evidienced by multiple ack error) during a transacted session.

Repository revision 450384 fixes this.

> Occasionally messages are ack'd more than once
> ----------------------------------------------
>
>                 Key: QPID-7
>                 URL: http://issues.apache.org/jira/browse/QPID-7
>             Project: Qpid
>          Issue Type: Bug
>            Reporter: Martin Ritchie
>
> When running a single queue and sending and receiving to that queue in the same session (Not in a transaction) occasionally the broker appears to get multiple acks for a given tag. Interestingly when running inside a transaction this doesn't happen.
> 2006-09-21 10:35:24,763 ERROR [pool-10-thread-4] state.AMQStateManager (AMQStateManager.java:150) - State manager received error notification: org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for channel:1
> org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for channel:1
> 	at org.apache.qpid.server.AMQChannel.handleAcknowledgement(AMQChannel.java:550)
> 	at org.apache.qpid.server.AMQChannel.acknowledgeMessage(AMQChannel.java:492)
> 	at org.apache.qpid.server.handler.BasicAckMethodHandler.methodReceived(BasicAckMethodHandler.java:50)
> 	at org.apache.qpid.server.state.AMQStateManager.methodReceived(AMQStateManager.java:165)
> 	at org.apache.qpid.server.protocol.AMQMinaProtocolSession.methodFrameReceived(AMQMinaProtocolSession.java:358)
> 	at org.apache.qpid.server.protocol.AMQMinaProtocolSession.dataBlockReceived(AMQMinaProtocolSession.java:326)
> 	at org.apache.qpid.server.protocol.AMQPFastProtocolHandler.messageReceived(AMQPFastProtocolHandler.java:181)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (QPID-7) Occasionally messages are ack'd more than once

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/QPID-7?page=all ]

Martin Ritchie updated QPID-7:
------------------------------

    Component/s: Java Broker
       Assignee: Martin Ritchie

> Occasionally messages are ack'd more than once
> ----------------------------------------------
>
>                 Key: QPID-7
>                 URL: http://issues.apache.org/jira/browse/QPID-7
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>            Reporter: Martin Ritchie
>         Assigned To: Martin Ritchie
>
> When running a single queue and sending and receiving to that queue in the same session (Not in a transaction) occasionally the broker appears to get multiple acks for a given tag. Interestingly when running inside a transaction this doesn't happen.
> 2006-09-21 10:35:24,763 ERROR [pool-10-thread-4] state.AMQStateManager (AMQStateManager.java:150) - State manager received error notification: org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for channel:1
> org.apache.qpid.AMQException: Single ack on delivery tag 434 not known for channel:1
> 	at org.apache.qpid.server.AMQChannel.handleAcknowledgement(AMQChannel.java:550)
> 	at org.apache.qpid.server.AMQChannel.acknowledgeMessage(AMQChannel.java:492)
> 	at org.apache.qpid.server.handler.BasicAckMethodHandler.methodReceived(BasicAckMethodHandler.java:50)
> 	at org.apache.qpid.server.state.AMQStateManager.methodReceived(AMQStateManager.java:165)
> 	at org.apache.qpid.server.protocol.AMQMinaProtocolSession.methodFrameReceived(AMQMinaProtocolSession.java:358)
> 	at org.apache.qpid.server.protocol.AMQMinaProtocolSession.dataBlockReceived(AMQMinaProtocolSession.java:326)
> 	at org.apache.qpid.server.protocol.AMQPFastProtocolHandler.messageReceived(AMQPFastProtocolHandler.java:181)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira