You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2021/09/27 17:48:41 UTC

[GitHub] [zookeeper] sonatype-lift[bot] commented on a change in pull request #1767: ZOOKEEPER-4367 Zookeeper#Login thread leak in case of Sasl AuthFailed.

sonatype-lift[bot] commented on a change in pull request #1767:
URL: https://github.com/apache/zookeeper/pull/1767#discussion_r716914105



##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java
##########
@@ -1267,8 +1266,13 @@ public void run() {
                 eventThread.queueEvent(new WatchedEvent(Event.EventType.None,
                         Event.KeeperState.Disconnected, null));
             }
+
             eventThread.queueEvent(new WatchedEvent(Event.EventType.None,
                         Event.KeeperState.Closed, null));
+
+            if (zooKeeperSaslClient != null) {
+                zooKeeperSaslClient.shutdown();

Review comment:
       *THREAD_SAFETY_VIOLATION:*  Unprotected write. Non-private method `ClientCnxn$SendThread.run()` indirectly writes to field `this.zooKeeperSaslClient.login` outside of synchronization.
    Reporting because this access may occur on a background thread.
   (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org