zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2249) CRC check failed when preAllocSize smaller than node data
Date Tue, 19 Dec 2017 02:34:00 GMT

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

ASF GitHub Bot commented on ZOOKEEPER-2249:

GitHub user afine opened a pull request:


    [WIP] ZOOKEEPER-2249: CRC check failed when preAllocSize smaller than node data


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/afine/zookeeper ZOOKEEPER-2249

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #436
commit 99236e2ddb10de6d20e5afea7e79751404ae48c6
Author: Abraham Fine <afine@apache.org>
Date:   2017-12-19T02:33:11Z

    ZOOKEEPER-2249: CRC check failed when preAllocSize smaller than node data


> CRC check failed when preAllocSize smaller than node data
> ---------------------------------------------------------
>                 Key: ZOOKEEPER-2249
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2249
>             Project: ZooKeeper
>          Issue Type: Bug
>            Reporter: Benjamin Jaton
>            Assignee: Abraham Fine
>              Labels: server
> Unexpected exception, exiting abnormally 
> java.io.IOException: CRC check failed 
> org.apache.zookeeper.server.persistence.FileTxnLog$FileTxnIterator.next(FileTxnLog.java:612)

> org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:157)

> org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:223) 
> org.apache.zookeeper.server.ZooKeeperServer.loadData(ZooKeeperServer.java:272) 
> org.apache.zookeeper.server.ZooKeeperServer.startdata(ZooKeeperServer.java:399)
> To reproduce, set the preAllocSize to 8MB, the jute.maxbuffer to 20MB and try saving
a 15MB node several times.
> In my case the erroneous CRC appears after the second save. I use the LogFormatter class
to detect it.
> I suspect that the CRC error happens when the new transaction log is created, the code
probably expects to have enough room to save the transaction when creating a new file, but
it's too small.

This message was sent by Atlassian JIRA

View raw message