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 78EF9200B66 for ; Thu, 18 Aug 2016 09:04:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 77506160AAE; Thu, 18 Aug 2016 07:04:23 +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 BFEA9160AAB for ; Thu, 18 Aug 2016 09:04:22 +0200 (CEST) Received: (qmail 52104 invoked by uid 500); 18 Aug 2016 07:04:21 -0000 Mailing-List: contact common-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-dev@hadoop.apache.org Received: (qmail 52007 invoked by uid 99); 18 Aug 2016 07:04:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2016 07:04:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C5F752C02A4 for ; Thu, 18 Aug 2016 07:04:20 +0000 (UTC) Date: Thu, 18 Aug 2016 07:04:20 +0000 (UTC) From: "Mingliang Liu (JIRA)" To: common-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HADOOP-13512) ReloadingX509TrustManager should keep reloading in case of exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 18 Aug 2016 07:04:23 -0000 Mingliang Liu created HADOOP-13512: -------------------------------------- Summary: ReloadingX509TrustManager should keep reloading in case of exception Key: HADOOP-13512 URL: https://issues.apache.org/jira/browse/HADOOP-13512 Project: Hadoop Common Issue Type: Bug Components: security Affects Versions: 2.8.0 Reporter: Mingliang Liu Assignee: Mingliang Liu {{org.apache.hadoop.security.ssl.TestReloadingX509TrustManager}} checks the key store file's last modified time to decide whether to reload. This is to avoid unnecessary reload if the key store file is not changed. To do this, it maintains an internal state {{lastLoaded}} whenever it tries to reload a file. It also updates the {{lastLoaded}} variable in case of exception so failing reload will not be retried until the key store file's last modified time changes again. Chances are that the reload happens when the key store file is being written. The reload fails (probably with EOFException) and won't load until key store files's last modified time changes. After a short period, the key store file is closed after update. However, the last modified time may not be updated as if it's in the same precision period (e.g. 1 second). In this case, the updated key store file is never reloaded. A simple fix is to update the {{lastLoaded}} only when the reload succeeds. {{ReloadingX509TrustManager}} will keep reloading in case of exception. Thoughts? -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: common-dev-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-dev-help@hadoop.apache.org