harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory Shimansky (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-4958) [drlvm][thread] Terminated threads leak thread handles on windows
Date Wed, 21 Nov 2007 21:15:43 GMT

     [ 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) {
            Thr t = new Thr();
            try {
            } catch (InterruptedException ie) {

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.

View raw message