ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-487

setdata on root (/) crashes the servers.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1.1, 3.2.0
    • Fix Version/s: 3.2.1, 3.3.0
    • Component/s: server
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      setdata on root "/" crashes the servers with the followimg exception. Unfortunately we never had a setdata test on root. The following is the exception. This happens with 3.1.1 as well. We might want to consider releasing 3.1.2 just for this jira.

      java.lang.IllegalArgumentException: Invalid path /
              at org.apache.zookeeper.common.PathTrie.findMaxPrefix(PathTrie.java:255)
              at org.apache.zookeeper.server.DataTree.setData(DataTree.java:543)
              at org.apache.zookeeper.server.DataTree.processTxn(DataTree.java:701)
              at org.apache.zookeeper.server.FinalRequestProcessor.processRequest(FinalRequestProcessor.java:94)
              at org.apache.zookeeper.server.SyncRequestProcessor.flush(SyncRequestProcessor.java:127)
              at org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:75)
      

        Activity

        Hide
        Mahadev konar added a comment -

        this patch fixes the issue and includes test for setting data on "/".

        Show
        Mahadev konar added a comment - this patch fixes the issue and includes test for setting data on "/".
        Hide
        Patrick Hunt added a comment -

        Wow, this sucks. Good catch.

        Re a 3.1.2, since this is deterministic, and the first anyone has noticed, I think we should be
        safe saying prior to 3.2.1 "don't set data on / znode" and leave it at that. It's pretty
        atypical anyway and should be easy to work around - set "/root" (whatever) instead.

        Show
        Patrick Hunt added a comment - Wow, this sucks. Good catch. Re a 3.1.2, since this is deterministic, and the first anyone has noticed, I think we should be safe saying prior to 3.2.1 "don't set data on / znode" and leave it at that. It's pretty atypical anyway and should be easy to work around - set "/root" (whatever) instead.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12414474/ZOOKEEPER-487.patch
        against trunk revision 799460.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 6 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 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: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/162/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/162/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/162/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12414474/ZOOKEEPER-487.patch against trunk revision 799460. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 6 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 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: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/162/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/162/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/162/console This message is automatically generated.
        Hide
        Patrick Hunt added a comment -

        Looks good Mahadev, +1. thanks.

        Committed revision 799702.
        Committed revision 799703.

        Show
        Patrick Hunt added a comment - Looks good Mahadev, +1. thanks. Committed revision 799702. Committed revision 799703.
        Hide
        Hudson added a comment -

        Integrated in ZooKeeper-trunk #401 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/401/)
        . setdata on root crashes the servers

        Show
        Hudson added a comment - Integrated in ZooKeeper-trunk #401 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/401/ ) . setdata on root crashes the servers

          People

          • Assignee:
            Mahadev konar
            Reporter:
            Mahadev konar
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development