You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2018/06/11 13:02:00 UTC
[jira] [Commented] (ZOOKEEPER-2977) Concurrency for addAuth
corrupts quorum packets
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16507991#comment-16507991 ]
Hadoop QA commented on ZOOKEEPER-2977:
--------------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12911964/2977.patch
against trunk revision a2623a625a4778720f7d5482d0a66e9b37ae556f.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 3 new or modified tests.
-1 patch. The patch command could not apply the patch.
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/3693//console
This message is automatically generated.
> Concurrency for addAuth corrupts quorum packets
> -----------------------------------------------
>
> Key: ZOOKEEPER-2977
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2977
> Project: ZooKeeper
> Issue Type: Bug
> Components: quorum
> Affects Versions: 3.4.9
> Environment: Affects all version in 3.4.x
> Reporter: sumit agrawal
> Assignee: sumit agrawal
> Priority: Critical
> Labels: pull-request-available
> Fix For: 3.4.13
>
> Attachments: 2977.patch
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> When client performs multiple times addAuth with different credential at follower concurrently, the communication between follower gets corrupt. This causes shutdown of Follower due to the failure.
> Analysis:
> In org.apache.zookeeper.server.quorum.QuorumPacket.serialize method,
> * call a_.startVector(authinfo,"authinfo"); which write the length of authinfo to packet (suppose it writes length 1)
> * get length of authinfo to write all details in loop (here gets length as 2)
> <-- Here in concurrency scenario, buffer gets corrupt having extra bytes in channel for additional authinfo.
>
> So When Leader reads next quorum packet, it reads previous extra bytes (incorrect) and possibly identify greater size of message (as corrupt byte pattern) causes exception...
> Coordination > Unexpected exception causing shutdown while sock still open (LearnerHandler.java:633)
> java.io.IOException: Unreasonable length = 1885430131
>
>
> ServerCnxn.getAuthInfo returns Unmodifiable list, but while addAuthInfo, there is no check. So this causes concurrency issue.
>
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)