You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Viktor Kuzmin (JIRA)" <ji...@apache.org> on 2012/06/25 14:21:43 UTC

[jira] [Created] (CASSANDRA-4370) hsha server may stop responding and will not close selectors

Viktor Kuzmin created CASSANDRA-4370:
----------------------------------------

             Summary: hsha server may stop responding and will not close selectors
                 Key: CASSANDRA-4370
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4370
             Project: Cassandra
          Issue Type: Bug
    Affects Versions: 1.1.1
            Reporter: Viktor Kuzmin
         Attachments: hsha.patch

Cassandra launches several threads to listen on selectors. There can be CancelledKeyException and cassandra will log "Unexpected exception". In that case there two problems:
1) listener thread will be closed and cassandra will stop after all listener threads will stop.
2) selector will be not closed

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-4370) hsha server may stop responding and will not close selectors

Posted by "Vijay (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400653#comment-13400653 ] 

Vijay commented on CASSANDRA-4370:
----------------------------------

1) I am wondering when will we get the CancelledKeyException? 
We might get it when the client decides to exit out, isn't it safe to ignore it (may ignore the log as well) and let the following code deal with it?

{code}
                    if (!key.isValid())
                    {
                        // if invalid cleanup.
                        cleanupSelectionkey(key);
                        continue;
                    }
{code}

2) Why should we close the selector when one of the key is invalid?
                
> hsha server may stop responding and will not close selectors
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-4370
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4370
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>            Reporter: Viktor Kuzmin
>            Assignee: Viktor Kuzmin
>             Fix For: 1.1.2
>
>         Attachments: hsha.patch
>
>
> Cassandra launches several threads to listen on selectors. There can be CancelledKeyException and cassandra will log "Unexpected exception". In that case there two problems:
> 1) listener thread will be closed and cassandra will stop after all listener threads will stop.
> 2) selector will be not closed

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-4370) hsha server may stop responding and will not close selectors

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brandon Williams updated CASSANDRA-4370:
----------------------------------------

         Reviewer: vijay2win@yahoo.com
    Fix Version/s: 1.1.2
         Assignee: Viktor Kuzmin
    
> hsha server may stop responding and will not close selectors
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-4370
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4370
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>            Reporter: Viktor Kuzmin
>            Assignee: Viktor Kuzmin
>             Fix For: 1.1.2
>
>         Attachments: hsha.patch
>
>
> Cassandra launches several threads to listen on selectors. There can be CancelledKeyException and cassandra will log "Unexpected exception". In that case there two problems:
> 1) listener thread will be closed and cassandra will stop after all listener threads will stop.
> 2) selector will be not closed

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-4370) hsha server may stop responding and will not close selectors

Posted by "Viktor Kuzmin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Viktor Kuzmin updated CASSANDRA-4370:
-------------------------------------

    Attachment: hsha.patch

Patch
                
> hsha server may stop responding and will not close selectors
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-4370
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4370
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>            Reporter: Viktor Kuzmin
>         Attachments: hsha.patch
>
>
> Cassandra launches several threads to listen on selectors. There can be CancelledKeyException and cassandra will log "Unexpected exception". In that case there two problems:
> 1) listener thread will be closed and cassandra will stop after all listener threads will stop.
> 2) selector will be not closed

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CASSANDRA-4370) hsha server may stop responding and will not close selectors

Posted by "Vijay (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vijay resolved CASSANDRA-4370.
------------------------------

    Resolution: Fixed

+1, Committed to 1.1 and trunk, (Misread the patch earlier)
                
> hsha server may stop responding and will not close selectors
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-4370
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4370
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>            Reporter: Viktor Kuzmin
>            Assignee: Viktor Kuzmin
>             Fix For: 1.1.2
>
>         Attachments: hsha.patch
>
>
> Cassandra launches several threads to listen on selectors. There can be CancelledKeyException and cassandra will log "Unexpected exception". In that case there two problems:
> 1) listener thread will be closed and cassandra will stop after all listener threads will stop.
> 2) selector will be not closed

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-4370) hsha server may stop responding and will not close selectors

Posted by "Viktor Kuzmin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400966#comment-13400966 ] 

Viktor Kuzmin commented on CASSANDRA-4370:
------------------------------------------

1) This code is not enough. Even if key is valid in that expression, it may be invalid in next statement - I was able to reproduce it on my boxes with cassandra 1.1.1.
2) We should not close selector at all until server shutdown.
                
> hsha server may stop responding and will not close selectors
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-4370
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4370
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>            Reporter: Viktor Kuzmin
>            Assignee: Viktor Kuzmin
>             Fix For: 1.1.2
>
>         Attachments: hsha.patch
>
>
> Cassandra launches several threads to listen on selectors. There can be CancelledKeyException and cassandra will log "Unexpected exception". In that case there two problems:
> 1) listener thread will be closed and cassandra will stop after all listener threads will stop.
> 2) selector will be not closed

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira