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 8DABA200B76 for ; Mon, 15 Aug 2016 17:52:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8C4A3160AA7; Mon, 15 Aug 2016 15:52:25 +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 DAC66160A8A for ; Mon, 15 Aug 2016 17:52:24 +0200 (CEST) Received: (qmail 70039 invoked by uid 500); 15 Aug 2016 15:52:21 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 69771 invoked by uid 99); 15 Aug 2016 15:52:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Aug 2016 15:52:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9CB902C02A9 for ; Mon, 15 Aug 2016 15:52:20 +0000 (UTC) Date: Mon, 15 Aug 2016 15:52:20 +0000 (UTC) From: "Ralf Hauser (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IO-497) DeferredFileOutputStream produces unhandled IOExceptions if the java.io.tmpdir is deleted MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 15 Aug 2016 15:52:25 -0000 [ https://issues.apache.org/jira/browse/IO-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15421172#comment-15421172 ] Ralf Hauser commented on IO-497: -------------------------------- see also IO-512 > DeferredFileOutputStream produces unhandled IOExceptions if the java.io.tmpdir is deleted > ----------------------------------------------------------------------------------------- > > Key: IO-497 > URL: https://issues.apache.org/jira/browse/IO-497 > Project: Commons IO > Issue Type: Bug > Components: Streams/Writers > Affects Versions: 2.4 > Environment: unix-like operating systems where temporary disk storage is routinely purged; CentOS specifically > Reporter: Nicholas Byrd > Attachments: dfos-bug-v2.tar.gz, dfos-bug.tar.gz, example_stack.txt > > > In the event that the Java temporary directory is deleted prior to the DeferredFileOutputStream trying to use it, the stream will throw one of two different IOExceptions (depending on how the Stream was constructed). > This may sound like an unrealistic use-case at first, but it is legitimate as one of my company's applications encountered it after the underlying operating system (CentOS) automatically purged the contents of its tmp directory. (The application uses Commons FileUpload, which invokes DeferredFileOutputStream and does not handle the error itself.) Our current work-around is to restart the server when this happens, but we feel that the underlying library should perhaps be intelligent enough to recover from such an error. > Additionally, it seems an awkward experience that two different errors are produced based on how the stream was constructed. One approach produces a FileNotFoundException while the other produces a plain IOException. > A small maven project containing a single JUnit test that highlights the error will be attached (see [dfos-bug.tar.gz|https://issues.apache.org/jira/secure/attachment/12783728/dfos-bug.tar.gz]). -- This message was sent by Atlassian JIRA (v6.3.4#6332)