Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 78721 invoked from network); 22 Aug 2008 07:29:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Aug 2008 07:29:47 -0000 Received: (qmail 68762 invoked by uid 500); 22 Aug 2008 07:29:44 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 68702 invoked by uid 500); 22 Aug 2008 07:29:44 -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 68691 invoked by uid 99); 22 Aug 2008 07:29:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Aug 2008 00:29:44 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Aug 2008 07:28:45 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 75D0E234C1C5 for ; Fri, 22 Aug 2008 00:28:44 -0700 (PDT) Message-ID: <1815047867.1219390124481.JavaMail.jira@brutus> Date: Fri, 22 Aug 2008 00:28:44 -0700 (PDT) From: "Henri Yandell (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (IO-161) FileCleaningTrackerTestCase hangs In-Reply-To: <1706360510.1207086207762.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/IO-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell updated IO-161: ----------------------------- Fix Version/s: 1.5 > FileCleaningTrackerTestCase hangs > --------------------------------- > > Key: IO-161 > URL: https://issues.apache.org/jira/browse/IO-161 > Project: Commons IO > Issue Type: Bug > Components: Utilities > Affects Versions: 1.4 > Environment: Linux sliver.usr.dsi.unimi.it 2.6.22.14-72.fc6 #1 SMP Wed Nov 21 15:12:59 EST 2007 i686 i686 i386 GNU/Linux > java version "1.5.0_10" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03) > Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing) > Reporter: Sebastiano Vigna > Fix For: 1.5 > > > The following code in FileCleaningTrackerTestCase never exits, hanging the whole compilation/testing process: > private void waitUntilTrackCount() { > while (theInstance.getTrackCount() != 0) { > int total = 0; > while (theInstance.getTrackCount() != 0) { > byte[] b = new byte[1024 * 1024]; > b[0] = (byte) System.currentTimeMillis(); > total = total + b[0]; > System.gc(); > } > } > } > It is clear that in theory this code might loop forever, as the allocation of the byte arrays might never unleash a garbage collection complete enough to deallocate all marker objects, so to bring the track count to zero. Believe me, it's not only theory :). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.