Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A299590E7 for ; Tue, 16 Dec 2014 10:42:21 +0000 (UTC) Received: (qmail 99792 invoked by uid 500); 16 Dec 2014 10:42:21 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 99750 invoked by uid 500); 16 Dec 2014 10:42:21 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 99737 invoked by uid 99); 16 Dec 2014 10:42:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2014 10:42:21 +0000 Date: Tue, 16 Dec 2014 10:42:21 +0000 (UTC) From: "Hudson (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-10852) NetgroupCache is not thread-safe MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-10852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14248105#comment-14248105 ] Hudson commented on HADOOP-10852: --------------------------------- FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #43 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/43/]) HADOOP-10852 Fix thread safety issues in NetgroupCache. (Benoy Antony) (benoy: rev a095622f36c5e9fff3ec02b14b800038a81f6286) * hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/NetgroupCache.java > NetgroupCache is not thread-safe > -------------------------------- > > Key: HADOOP-10852 > URL: https://issues.apache.org/jira/browse/HADOOP-10852 > Project: Hadoop Common > Issue Type: Bug > Components: security > Affects Versions: 2.5.0, 2.4.1 > Reporter: Benoy Antony > Assignee: Benoy Antony > Fix For: 2.7.0 > > Attachments: HADOOP-10852.patch, HADOOP-10852.patch, HADOOP-10852.patch, HADOOP-10852.patch > > > _NetgroupCache_ internally uses two ConcurrentHashMaps and a boolean variable to signal updates on one of the ConcurrentHashMap > None of the functions are synchronized and hence is possible to have unexpected results due to race condition between different threads. > As an example, consider the following sequence: > Thread1 : > {{add}} a group > {{netgroupToUsersMap}} is updated. > {{netgroupToUsersMapUpdated}} is set to true. > Thread 2: > calls {{getNetgroups}} for a user > Due to re-ordering, {{netgroupToUsersMapUpdated=true}} is visible, but updates in {{netgroupToUsersMap}} is not visible. > Does a wrong update with older {{netgroupToUsersMap}} values. -- This message was sent by Atlassian JIRA (v6.3.4#6332)