Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D15DB200CC5 for ; Tue, 11 Jul 2017 21:14:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D098316700A; Tue, 11 Jul 2017 19:14:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 20E40167008 for ; Tue, 11 Jul 2017 21:14:42 +0200 (CEST) Received: (qmail 51253 invoked by uid 500); 11 Jul 2017 19:13:45 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 51228 invoked by uid 99); 11 Jul 2017 19:13:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jul 2017 19:13:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 0D708196127 for ; Tue, 11 Jul 2017 19:13:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id i_WwcZoQRbH0 for ; Tue, 11 Jul 2017 19:13:44 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id D1289626EC for ; Tue, 11 Jul 2017 15:37:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 63260E069F for ; Tue, 11 Jul 2017 15:37:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 139EF246AC for ; Tue, 11 Jul 2017 15:37:00 +0000 (UTC) Date: Tue, 11 Jul 2017 15:37:00 +0000 (UTC) From: "Rushabh S Shah (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-12121) Audit logging of unsuccessful should not be done while holding fslock. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 11 Jul 2017 19:14:44 -0000 Rushabh S Shah created HDFS-12121: ------------------------------------- Summary: Audit logging of unsuccessful should not be done while holding fslock. Key: HDFS-12121 URL: https://issues.apache.org/jira/browse/HDFS-12121 Project: Hadoop HDFS Issue Type: Bug Affects Versions: 2.7.0 Reporter: Rushabh S Shah Assignee: Rushabh S Shah Currently we are audit logging the unsuccessful calls while holding fslock. Following is just one example. {code:title=FSNamesystem.java|borderStyle=solid} HdfsFileStatus getFileInfo(final String src, boolean resolveLink) throws IOException { final String operationName = "getfileinfo"; checkOperation(OperationCategory.READ); HdfsFileStatus stat = null; readLock(); try { checkOperation(OperationCategory.READ); stat = FSDirStatAndListingOp.getFileInfo(dir, src, resolveLink); } catch (AccessControlException e) { logAuditEvent(false, operationName, src); //<---- audit logging while holding fs read lock. throw e; } finally { readUnlock(operationName); } logAuditEvent(true, operationName, src); return stat; } {code} We should avoid doing this. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org