You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Andrew McNair (Created) (JIRA)" <ji...@apache.org> on 2011/12/20 02:25:31 UTC
[jira] [Created] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
NPE in FileTxnSnapLog when restarting a cluster
-----------------------------------------------
Key: ZOOKEEPER-1333
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
Project: ZooKeeper
Issue Type: Bug
Components: server
Affects Versions: 3.4.0
Reporter: Andrew McNair
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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Andrew McNair (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew McNair updated ZOOKEEPER-1333:
-------------------------------------
Attachment: test_case.diff
Attaching failing test case with license
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Andrew McNair (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew McNair updated ZOOKEEPER-1333:
-------------------------------------
Attachment: test_case.diff
Added file with failing test case
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Benjamin Reed (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173456#comment-13173456 ]
Benjamin Reed commented on ZOOKEEPER-1333:
------------------------------------------
there are times that you don't error out on NONODE: when you are applying the transaction log to a fuzzy snapshot. you might have delete /foo in the transaction log and the snapshot already has the node deleted. you want to ignore the error when you apply delete /foo
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Patrick Hunt (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173376#comment-13173376 ]
Patrick Hunt commented on ZOOKEEPER-1333:
-----------------------------------------
Andrew can you re-attach with "grant license" checked? Otw we can't include your test case as part of the commit.
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Patrick Hunt (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Hunt updated ZOOKEEPER-1333:
------------------------------------
Attachment: ZOOKEEPER-1333.patch
This fixes the NPE, however the test is still failing. I don't think we should be erroring out on a NONODE, that just seems wrong on it's face (but that was the goal of the change introduced by ZOOKEEPER-1269 which is really odd)
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Andrew McNair (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172851#comment-13172851 ]
Andrew McNair commented on ZOOKEEPER-1333:
------------------------------------------
Added a test case in LoadFromLogTest that fails:
/**
* Test we can restore a snapshot that has errors and data ahead of the zxid
* of the snapshot file.
*/
@Test
public void testRestoreWithTransactionErrors() throws Exception {
// setup a single server cluster
File tmpDir = ClientBase.createTmpDir();
ClientBase.setupTestEnv();
ZooKeeperServer zks = new ZooKeeperServer(tmpDir, tmpDir, 3000);
SyncRequestProcessor.setSnapCount(10000);
final int PORT = Integer.parseInt(HOSTPORT.split(":")[1]);
ServerCnxnFactory f = ServerCnxnFactory.createFactory(PORT, -1);
f.startup(zks);
Assert.assertTrue("waiting for server being up ", ClientBase
.waitForServerUp(HOSTPORT, CONNECTION_TIMEOUT));
ZooKeeper zk = new ZooKeeper(HOSTPORT, CONNECTION_TIMEOUT, this);
long start = System.currentTimeMillis();
while (!connected) {
long end = System.currentTimeMillis();
if (end - start > 5000) {
Assert.assertTrue("Could not connect with server in 5 seconds",
false);
}
try {
Thread.sleep(200);
} catch (Exception e) {
LOG.warn("Intrrupted");
}
}
// generate some transactions
try {
for (int i = 0; i < NUM_MESSAGES; i++) {
try {
zk.create("/invaliddir/test-", new byte[0],
Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT_SEQUENTIAL);
} catch(NoNodeException e) {
//Expected
}
}
} finally {
zk.close();
}
// force the zxid to be behind the content
zks.getZKDatabase().setlastProcessedZxid(
zks.getZKDatabase().getDataTreeLastProcessedZxid() - 10);
LOG.info("Set lastProcessedZxid to "
+ zks.getZKDatabase().getDataTreeLastProcessedZxid());
// Force snapshot and restore
zks.takeSnapshot();
zks.shutdown();
f.shutdown();
zks = new ZooKeeperServer(tmpDir, tmpDir, 3000);
SyncRequestProcessor.setSnapCount(10000);
f = ServerCnxnFactory.createFactory(PORT, -1);
f.startup(zks);
Assert.assertTrue("waiting for server being up ", ClientBase
.waitForServerUp(HOSTPORT, CONNECTION_TIMEOUT));
f.shutdown();
}
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Priority: Blocker
> Fix For: 3.4.2
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Patrick Hunt (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Hunt updated ZOOKEEPER-1333:
------------------------------------
Attachment: ZOOKEEPER-1333_a.patch
Minor improvement to the 3.4 version of the patch (_a) to make the logging more clear.
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch_a, ZOOKEEPER-1333_a.patch, ZOOKEEPER-1333_trunk.patch, test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Mahadev konar (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174256#comment-13174256 ]
Mahadev konar commented on ZOOKEEPER-1333:
------------------------------------------
@Camille,
Agreed. I think the patch as it stands is good to go. The only concern I have is the code is pretty convoluted in processtransaction. We should work on making it cleaner. Ill add some comments for now when committing.
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch, test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174381#comment-13174381 ]
Hadoop QA commented on ZOOKEEPER-1333:
--------------------------------------
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12508288/ZOOKEEPER-1333_trunk.patch
against trunk revision 1214571.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 4 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed core unit tests.
+1 contrib tests. The patch passed contrib unit tests.
Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/846//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/846//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/846//console
This message is automatically generated.
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.5.0, 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch_a, ZOOKEEPER-1333_a.patch, ZOOKEEPER-1333_trunk.patch, test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Patrick Hunt (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Hunt updated ZOOKEEPER-1333:
------------------------------------
Attachment: ZOOKEEPER-1333_trunk.patch
Merged into the trunk. Includes the logging improvement.
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch_a, ZOOKEEPER-1333_a.patch, ZOOKEEPER-1333_trunk.patch, test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Patrick Hunt (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Hunt updated ZOOKEEPER-1333:
------------------------------------
Attachment: ZOOKEEPER-1333.patch
this patch fixes the problem as outlined in the comments.
However I just noticed that the tests still pass when the "throw NoNodeException" is commented out. So this leads me to believe we are not testing this code path.
I'm continuing to work on this - specifically added tests for this code path.
Ben if you had an idea re the logging lmk what it should say.
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch, test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174344#comment-13174344 ]
Hadoop QA commented on ZOOKEEPER-1333:
--------------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12508288/ZOOKEEPER-1333_trunk.patch
against trunk revision 1214571.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 4 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
-1 core tests. The patch failed core unit tests.
+1 contrib tests. The patch passed contrib unit tests.
Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/845//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/845//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/845//console
This message is automatically generated.
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.5.0, 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch_a, ZOOKEEPER-1333_a.patch, ZOOKEEPER-1333_trunk.patch, test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Camille Fournier (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174248#comment-13174248 ]
Camille Fournier commented on ZOOKEEPER-1333:
---------------------------------------------
Ah ok. Yeah, so if we put the create check in, we won't get that nonode exception if the multi fails on that, would be the only potential issue with this fix that I can see.
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch, test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Camille Fournier (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174255#comment-13174255 ]
Camille Fournier commented on ZOOKEEPER-1333:
---------------------------------------------
But I'm pretty sure that nonode exception itself was kind of a crazy sanity check of the "we should never reach this" sort. To get there you would have to be creating a child node that already exists, but with a parent that doesn't exist. So it's no surprise that we don't have a test for that case.
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch, test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Camille Fournier (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174244#comment-13174244 ]
Camille Fournier commented on ZOOKEEPER-1333:
---------------------------------------------
The logic in FileTxnSnapLog changed quite a bit, and I'm not sure if the create check makes sense with the new logic or not. The create check logic was moved into DataTree, so what I made the check in FileTxnSnapLog for I'm not entirely sure.
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch, test_case.diff, test_case.diff
>
>
> 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)
--
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] [Assigned] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Patrick Hunt (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Hunt reassigned ZOOKEEPER-1333:
---------------------------------------
Assignee: Patrick Hunt
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Benjamin Reed (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173859#comment-13173859 ]
Benjamin Reed commented on ZOOKEEPER-1333:
------------------------------------------
+1 this looks good. i can't think of a better message for the log :)
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch, test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Mahadev konar (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mahadev konar updated ZOOKEEPER-1333:
-------------------------------------
Priority: Blocker (was: Major)
Fix Version/s: 3.4.2
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Priority: Blocker
> Fix For: 3.4.2
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Benjamin Reed (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173476#comment-13173476 ]
Benjamin Reed commented on ZOOKEEPER-1333:
------------------------------------------
i looked more closely and it looks like before 1269 the code that was throwing an exception was protected by a check to OpCode.create. we should probably put that back in and fix the resulting message a bit.
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Thomas Koch (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173956#comment-13173956 ]
Thomas Koch commented on ZOOKEEPER-1333:
----------------------------------------
This is the mail that triggered ZOOKEEPER-1269:
http://mail-archives.apache.org/mod_mbox/zookeeper-dev/201110.mbox/%3C201110281704.24935.thomas@koch.ro%3E
It describes three suspected failure scenarios. Only the text of the first one got was copied in 1269 and somehow addressed. I don't know, whether the other two are valid.
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch, test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174760#comment-13174760 ]
Hudson commented on ZOOKEEPER-1333:
-----------------------------------
Integrated in ZooKeeper-trunk #1404 (See [https://builds.apache.org/job/ZooKeeper-trunk/1404/])
ZOOKEEPER-1333. NPE in FileTxnSnapLog when restarting a cluster. (Patrick Hunt via mahadev)
mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1221868
Files :
* /zookeeper/trunk/CHANGES.txt
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/DataTree.java
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java
* /zookeeper/trunk/src/java/test/org/apache/zookeeper/test/LoadFromLogTest.java
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.5.0, 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch_a, ZOOKEEPER-1333_a.patch, ZOOKEEPER-1333_trunk.patch, test_case.diff, test_case.diff
>
>
> 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)
--
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] (ZOOKEEPER-1333) NPE in FileTxnSnapLog when
restarting a cluster
Posted by "Mahadev konar (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mahadev konar updated ZOOKEEPER-1333:
-------------------------------------
Attachment: ZOOKEEPER-1333.patch_a
Updated patch with some comments that I committed to 3.4 branch.
> NPE in FileTxnSnapLog when restarting a cluster
> -----------------------------------------------
>
> Key: ZOOKEEPER-1333
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1333
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Andrew McNair
> Assignee: Patrick Hunt
> Priority: Blocker
> Fix For: 3.4.2
>
> Attachments: ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch, ZOOKEEPER-1333.patch_a, test_case.diff, test_case.diff
>
>
> 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)
--
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