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 2008/11/05 13:25:44 UTC

[jira] Created: (QPID-1432) Client can fail to notify all stateWaiters

Client can fail to notify all stateWaiters
------------------------------------------

                 Key: QPID-1432
                 URL: https://issues.apache.org/jira/browse/QPID-1432
             Project: Qpid
          Issue Type: Bug
          Components: Java Client
    Affects Versions: M2.1, M3
            Reporter: Martin Ritchie
            Assignee: Martin Ritchie
            Priority: Critical
             Fix For: M4


Summary:

Due to our desire to reduce synchronization on the client it is possible to fail to notify a client of an exception state.
As highlighted by the two thread processes below, the _frameListeners can be updated such that the notification fails to take place.


This is due to our use of CopyOnWrite lists. As the Exception handler is propagating the exception a new syncWait can occur, which will fail as the connection is closed. There is a question of why the socket write does not fail but that may be because the close has not yet occurred.

Suggested change:

All uses of the _frameListeners should be synchronized and the syncWrite should check to see if the connection is closed before allowing the adding the listener. Throwing any exception that has already been set.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (QPID-1432) Client can fail to notify all stateWaiters

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Ritchie reassigned QPID-1432:
------------------------------------

    Assignee:     (was: Martin Ritchie)

> Client can fail to notify all stateWaiters
> ------------------------------------------
>
>                 Key: QPID-1432
>                 URL: https://issues.apache.org/jira/browse/QPID-1432
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M2.1, M3
>            Reporter: Martin Ritchie
>            Priority: Critical
>             Fix For: M4
>
>
> Summary:
> Due to our desire to reduce synchronization on the client it is possible to fail to notify a client of an exception state.
> As highlighted by the two thread processes below, the _waiters in AMQStateManger can be updated such that the error notification fails to take place.
> This is due to our use of CopyOnWrite lists. As the Exception handler is propagating the exception a new exception may miss a newly registered state listener.
> Suggested change:
> All uses of the _waiters should be synchronized. The only place that this is not done is in the error() case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (QPID-1432) Client can fail to notify all stateWaiters

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Ritchie updated QPID-1432:
---------------------------------

             Priority: Major  (was: Critical)
    Affects Version/s: M4
        Fix Version/s:     (was: M4)

The use of the AMQStateManager. _waiters is only done during connection startup and clean shutdown. 

Whilst the client does have some issues with handling of asynchronous exceptions I don't believe that this issue will improve that situation as the _waiters will not change during the connection creation/clean shutdown processes.

> Client can fail to notify all stateWaiters
> ------------------------------------------
>
>                 Key: QPID-1432
>                 URL: https://issues.apache.org/jira/browse/QPID-1432
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M2.1, M3, M4
>            Reporter: Martin Ritchie
>
> Summary:
> Due to our desire to reduce synchronization on the client it is possible to fail to notify a client of an exception state.
> As highlighted by the two thread processes below, the _waiters in AMQStateManger can be updated such that the error notification fails to take place.
> This is due to our use of CopyOnWrite lists. As the Exception handler is propagating the exception a new exception may miss a newly registered state listener.
> Suggested change:
> All uses of the _waiters should be synchronized. The only place that this is not done is in the error() case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (QPID-1432) Client can fail to notify all stateWaiters

Posted by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Ritchie updated QPID-1432:
---------------------------------

    Description: 
Summary:

Due to our desire to reduce synchronization on the client it is possible to fail to notify a client of an exception state.
As highlighted by the two thread processes below, the _waiters in AMQStateManger can be updated such that the error notification fails to take place.


This is due to our use of CopyOnWrite lists. As the Exception handler is propagating the exception a new exception may miss a newly registered state listener.

Suggested change:

All uses of the _waiters should be synchronized. The only place that this is not done is in the error() case.

  was:
Summary:

Due to our desire to reduce synchronization on the client it is possible to fail to notify a client of an exception state.
As highlighted by the two thread processes below, the _frameListeners can be updated such that the notification fails to take place.


This is due to our use of CopyOnWrite lists. As the Exception handler is propagating the exception a new syncWait can occur, which will fail as the connection is closed. There is a question of why the socket write does not fail but that may be because the close has not yet occurred.

Suggested change:

All uses of the _frameListeners should be synchronized and the syncWrite should check to see if the connection is closed before allowing the adding the listener. Throwing any exception that has already been set.


> Client can fail to notify all stateWaiters
> ------------------------------------------
>
>                 Key: QPID-1432
>                 URL: https://issues.apache.org/jira/browse/QPID-1432
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M2.1, M3
>            Reporter: Martin Ritchie
>            Assignee: Martin Ritchie
>            Priority: Critical
>             Fix For: M4
>
>
> Summary:
> Due to our desire to reduce synchronization on the client it is possible to fail to notify a client of an exception state.
> As highlighted by the two thread processes below, the _waiters in AMQStateManger can be updated such that the error notification fails to take place.
> This is due to our use of CopyOnWrite lists. As the Exception handler is propagating the exception a new exception may miss a newly registered state listener.
> Suggested change:
> All uses of the _waiters should be synchronized. The only place that this is not done is in the error() case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.