Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 55326 invoked from network); 21 Nov 2007 21:16:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Nov 2007 21:16:06 -0000 Received: (qmail 3484 invoked by uid 500); 21 Nov 2007 21:15:53 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 3391 invoked by uid 500); 21 Nov 2007 21:15:53 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 3187 invoked by uid 99); 21 Nov 2007 21:15:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Nov 2007 13:15:52 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Nov 2007 21:15:49 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 11653714201 for ; Wed, 21 Nov 2007 13:15:43 -0800 (PST) Message-ID: <16566680.1195679743045.JavaMail.jira@brutus> Date: Wed, 21 Nov 2007 13:15:43 -0800 (PST) From: "Gregory Shimansky (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-4958) [drlvm][thread] Terminated threads leak thread handles on windows In-Reply-To: <29700760.1192622510754.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/HARMONY-4958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gregory Shimansky updated HARMONY-4958: --------------------------------------- Summary: [drlvm][thread] Terminated threads leak thread handles on windows (was: [drlvm][shutdown] AddRmPropertiesHooksTest failure) I analyzed this test. Commenting out various of its parts shows that handles are from leaked each of two subtests addRemoveExecutedHooks and addRemoveBeingRunningHooks. Both subtests create threads, run them, and later remove from the list of shutdown hooks. So no handles should be accumulating. But process explorer shows that handles number is increasing. I've inserted a small patch to vm/thread/src/win/os_thread.c to print out system error coming from _beginthreadex. It says not enough quota to process this command. It happens when process accumulates about 320k of handles. There is no need to run a complex reliability test to reproduce the problem. This simple test shows thread handles accumulating in the process: public class Thr extends Thread { public static void main(String []args) { while (true) { System.gc(); Thr t = new Thr(); try { t.start(); t.join(); } catch (InterruptedException ie) { ie.printStackTrace(); } } } } So I reassigned this bug to threading. > [drlvm][thread] Terminated threads leak thread handles on windows > ----------------------------------------------------------------- > > Key: HARMONY-4958 > URL: https://issues.apache.org/jira/browse/HARMONY-4958 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Environment: Windows x86 Revision: 582798 > Reporter: Andrey Yakushev > Attachments: exclude_AddRmPropertiesHooksTest.patch > > > api.kernel.hooks.AddRmPropertiesHooksTest fails periodically after 10-20 minutes running with different meggages like: > OK > OK > OK > Uncaught exception in main: > java.lang.OutOfMemoryError: Failed to create new thread > at java.lang.Thread.start(Thread.java:757) > at org.apache.harmony.test.java.lang.OutOfMemoryError: Failed to create new thread > at java.lang.Thread.start(Thread.java:757) > at org.apache.harmony.test. > I noted that DRLVM process increases handle usage (near +1000 in a second) until all are exhausted. Memory is also leaked. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.