ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1333

NPE in FileTxnSnapLog when restarting a cluster

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.4.0
    • Fix Version/s: 3.4.2, 3.5.0
    • Component/s: server
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      I think a NPE was created in the fix for https://issues.apache.org/jira/browse/ZOOKEEPER-1269

      Looking in DataTree.processTxn(TxnHeader header, Record txn) it seems likely that if rc.err != Code.OK then rc.path will be null.

      I'm currently working on a minimal test case for the bug, I'll attach it to this issue when it's ready.

      java.lang.NullPointerException
      at org.apache.zookeeper.server.persistence.FileTxnSnapLog.processTransaction(FileTxnSnapLog.java:203)
      at org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:150)
      at org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:223)
      at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:418)
      at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:410)
      at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:151)
      at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:111)
      at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)

      1. test_case.diff
        3 kB
        Andrew McNair
      2. test_case.diff
        3 kB
        Andrew McNair
      3. ZOOKEEPER-1333.patch
        12 kB
        Patrick Hunt
      4. ZOOKEEPER-1333.patch
        12 kB
        Patrick Hunt
      5. ZOOKEEPER-1333.patch_a
        12 kB
        Mahadev konar
      6. ZOOKEEPER-1333_a.patch
        12 kB
        Patrick Hunt
      7. ZOOKEEPER-1333_trunk.patch
        12 kB
        Patrick Hunt

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Patrick Hunt
            Reporter:
            Andrew McNair
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development