You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "maoling (JIRA)" <ji...@apache.org> on 2017/08/25 00:58:00 UTC

[jira] [Commented] (ZOOKEEPER-2082) Mistype of electionAlgo can fill out your disk in minutes

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

maoling commented on ZOOKEEPER-2082:
------------------------------------

I think this issue has been fixed in ZOOKEEPER-1932[https://issues.apache.org/jira/browse/ZOOKEEPER-1932](commitId:a680655a3569) and the code about checking in the parseProperties() function in QuorumPeerConfig.java is here[https://github.com/apache/zookeeper/blob/master/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java#L259].so its status should be changed to RESOLVED 

> Mistype of electionAlgo can fill out your disk in minutes
> ---------------------------------------------------------
>
>                 Key: ZOOKEEPER-2082
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2082
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: leaderElection
>    Affects Versions: 3.4.6
>         Environment: Cluster (multi-server) setup
>            Reporter: Tianyin Xu
>            Priority: Minor
>
> The parameter, electionAlgo, is supposed to be 0--3. However, when I mistyped the value in my zoo.cfg (I'm stupid), ZK falls into a dead loop and starts filling up the entire disk which millions of the follow 2 lines...
> 2014-11-14 14:28:44,588 \[myid:3\] - INFO  \[QuorumPeer\[myid=3\]/0:0:0:0:0:0:0:0:2183:QuorumPeer@714\] - LOOKING
> 2014-11-14 14:28:44,588 \[myid:3\] - WARN  \[QuorumPeer\[myid=3\]/0:0:0:0:0:0:0:0:2183:QuorumPeer@764\] - Unexpected exception
> java.lang.NullPointerException
>     at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:762)
> The error rooted in createElectionAlgorithm() where an invalid setting leads to null for the Election object. Then, in the while look in run(), it causes null-pointer de-referencing which is captured but is not handled well.
> I think our should check the setting of electionAlg in the very beginning to make sure it's a valid setting, instead of using it at runtime and cause the unfortunate things.
> Let me know if you wanna a patch. I'd like to check it in the parseProperties() function in QuorumPeerConfig.java.
> Thanks!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)