You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Jeremy Stribling (Commented) (JIRA)" <ji...@apache.org> on 2012/04/11 02:01:35 UTC

[jira] [Commented] (ZOOKEEPER-1442) Uncaught exception handler should exit on a java.lang.Error

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

Jeremy Stribling commented on ZOOKEEPER-1442:
---------------------------------------------

I have a patch ready.  I can't figure out how to add a test that will verify that the system calls System.exit() correctly when an Error is thrown -- I don't think the test harness is set up for that.  Anyone have any pointers?
                
> Uncaught exception handler should exit on a java.lang.Error
> -----------------------------------------------------------
>
>                 Key: ZOOKEEPER-1442
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1442
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: java client, server
>    Affects Versions: 3.4.3, 3.3.5
>            Reporter: Jeremy Stribling
>            Assignee: Jeremy Stribling
>            Priority: Minor
>
> The uncaught exception handler registered in NIOServerCnxnFactory and ClientCnxn simply logs exceptions and lets the rest of ZooKeeper go on its merry way.  However, errors such as OutOfMemoryErrors should really crash the program, as they represent unrecoverable errors.  If the exception that gets to the uncaught exception handler is an instanceof a java.lang.Error, ZK should exit with an error code (in addition to logging the error).

--
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