ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1440

Spurious log error messages when QuorumCnxManager is shutting down

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4.3
    • Fix Version/s: 3.5.0
    • Component/s: quorum, server
    • Labels:
      None

      Description

      When shutting down the QuroumPeer, ZK server logs unnecessary errors. See QuorumCnxManager.Listener.run() - ss.accept() will throw an exception when it is closed. The catch (IOException e) will log errors. It should first check the shutdown field to see if the Listener is being shutdown. If it is, the exception is correct and no errors should be logged.

      1. patch.txt
        1 kB
        Jordan Zimmerman
      2. patch.txt
        2 kB
        Jordan Zimmerman

        Activity

        Hide
        Jordan Zimmerman added a comment -

        Potential patch. It doesn't see that I can catch an explicit exception so ignore all IOExceptions when shutting down.

        Show
        Jordan Zimmerman added a comment - Potential patch. It doesn't see that I can catch an explicit exception so ignore all IOExceptions when shutting down.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12520848/patch.txt
        against trunk revision 1307644.

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

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +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/1027//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1027//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1027//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/12520848/patch.txt against trunk revision 1307644. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +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/1027//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1027//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1027//console This message is automatically generated.
        Hide
        Michi Mutsuzaki added a comment -

        +1. I'll commit this in a few days unless somebody has an objection. Thank you for the patch, Jordan!

        --Michi

        Show
        Michi Mutsuzaki added a comment - +1. I'll commit this in a few days unless somebody has an objection. Thank you for the patch, Jordan! --Michi
        Hide
        Hudson added a comment -

        Integrated in ZooKeeper-trunk #1550 (See https://builds.apache.org/job/ZooKeeper-trunk/1550/)
        ZOOKEEPER-1440. Spurious log error messages when QuorumCnxManager is shutting down (Jordan Zimmerman via michim) (Revision 1335338)

        Result = SUCCESS
        michim : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1335338
        Files :

        • /zookeeper/trunk/CHANGES.txt
        • /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
        Show
        Hudson added a comment - Integrated in ZooKeeper-trunk #1550 (See https://builds.apache.org/job/ZooKeeper-trunk/1550/ ) ZOOKEEPER-1440 . Spurious log error messages when QuorumCnxManager is shutting down (Jordan Zimmerman via michim) (Revision 1335338) Result = SUCCESS michim : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1335338 Files : /zookeeper/trunk/CHANGES.txt /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
        Hide
        Patrick Hunt added a comment -

        I think we need to revert this commit. The patch as committed introduces a socket leak - there is a race condition where 1) the run method could be processing a socket operation that throws an ioexception, and 2) the shutdown flag being set. As a result we might not close the socket.

        Show
        Patrick Hunt added a comment - I think we need to revert this commit. The patch as committed introduces a socket leak - there is a race condition where 1) the run method could be processing a socket operation that throws an ioexception, and 2) the shutdown flag being set. As a result we might not close the socket.
        Hide
        Jordan Zimmerman added a comment -

        I see it - I'll work on a new patch

        Show
        Jordan Zimmerman added a comment - I see it - I'll work on a new patch
        Hide
        Jordan Zimmerman added a comment -

        Previous patch introduced socket leaks. This patch should be better.

        Show
        Jordan Zimmerman added a comment - Previous patch introduced socket leaks. This patch should be better.
        Hide
        Jordan Zimmerman added a comment -

        Focus this change solely on the spurious error messages.

        Show
        Jordan Zimmerman added a comment - Focus this change solely on the spurious error messages.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12527472/patch.txt
        against trunk revision 1337029.

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

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +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/1072//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1072//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1072//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/12527472/patch.txt against trunk revision 1337029. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +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/1072//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1072//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1072//console This message is automatically generated.
        Hide
        Michi Mutsuzaki added a comment -

        Ah sorry I should've caught that. Jordan's new patch looks good to me. Pat, I'll wait for your +1 before checking in this time

        --Michi

        Show
        Michi Mutsuzaki added a comment - Ah sorry I should've caught that. Jordan's new patch looks good to me. Pat, I'll wait for your +1 before checking in this time --Michi
        Hide
        Michi Mutsuzaki added a comment -

        Rerunning the precommit build. I'd like to get this checked in.

        Show
        Michi Mutsuzaki added a comment - Rerunning the precommit build. I'd like to get this checked in.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12527472/patch.txt
        against trunk revision 1576174.

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

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +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/1952//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1952//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1952//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/12527472/patch.txt against trunk revision 1576174. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +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/1952//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1952//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1952//console This message is automatically generated.
        Show
        Michi Mutsuzaki added a comment - http://svn.apache.org/viewvc?view=revision&revision=1576936
        Hide
        Hudson added a comment -

        FAILURE: Integrated in ZooKeeper-trunk #2246 (See https://builds.apache.org/job/ZooKeeper-trunk/2246/)
        ZOOKEEPER-1440. Spurious log error messages when QuorumCnxManager is shutting down (Jordan Zimmerman via michim) (michim: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1576936)

        • /zookeeper/trunk/CHANGES.txt
        • /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java
        Show
        Hudson added a comment - FAILURE: Integrated in ZooKeeper-trunk #2246 (See https://builds.apache.org/job/ZooKeeper-trunk/2246/ ) ZOOKEEPER-1440 . Spurious log error messages when QuorumCnxManager is shutting down (Jordan Zimmerman via michim) (michim: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1576936 ) /zookeeper/trunk/CHANGES.txt /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumCnxManager.java

          People

          • Assignee:
            Jordan Zimmerman
            Reporter:
            Jordan Zimmerman
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development