You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Nikolay Kuznetsov (JIRA)" <ji...@apache.org> on 2006/10/06 17:19:20 UTC

[jira] Created: (HARMONY-1761) [DRLVM]Memory leak in thread creation

[DRLVM]Memory leak in thread creation
-------------------------------------

                 Key: HARMONY-1761
                 URL: http://issues.apache.org/jira/browse/HARMONY-1761
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Nikolay Kuznetsov


During every single thread creation we create APR pool to allocate structure containing parameters for new thread run method. This pool is never being reused or destroyed and costs 8k for every thread being created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (HARMONY-1761) [DRLVM]Memory leak in thread creation

Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1761?page=all ]

Geir Magnusson Jr closed HARMONY-1761.
--------------------------------------

    Resolution: Fixed

closing - patch no longer relevant

> [DRLVM]Memory leak in thread creation
> -------------------------------------
>
>                 Key: HARMONY-1761
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1761
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Nikolay Kuznetsov
>         Assigned To: Geir Magnusson Jr
>         Attachments: HARMONY-1761.patch, Test.java
>
>
> During every single thread creation we create APR pool to allocate structure containing parameters for new thread run method. This pool is never being reused or destroyed and costs 8k for every thread being created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-1761) [DRLVM]Memory leak in thread creation

Posted by "Nikolay Kuznetsov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1761?page=comments#action_12442879 ] 
            
Nikolay Kuznetsov commented on HARMONY-1761:
--------------------------------------------

This is strange anomaly of Ubuntu linux, note that user should be login locally to reproduce OOM after 340, remote connect helps a lot, even several su back and forth(login a; su - a; su - b ) also fixes the problem, I don't understand what the reason is.

Nik. 

> [DRLVM]Memory leak in thread creation
> -------------------------------------
>
>                 Key: HARMONY-1761
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1761
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Nikolay Kuznetsov
>         Assigned To: Geir Magnusson Jr
>         Attachments: HARMONY-1761.patch, Test.java
>
>
> During every single thread creation we create APR pool to allocate structure containing parameters for new thread run method. This pool is never being reused or destroyed and costs 8k for every thread being created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-1761) [DRLVM]Memory leak in thread creation

Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1761?page=comments#action_12442356 ] 
            
Geir Magnusson Jr commented on HARMONY-1761:
--------------------------------------------

This is an important problem, but it doesn't apply.  I tried to apply by hand, but it really didn't make sense - the underlying code has changed too much.  For example, line 181 is in the middle of a comment in current codebase.

Please redo and post a new patch - this is important.

> [DRLVM]Memory leak in thread creation
> -------------------------------------
>
>                 Key: HARMONY-1761
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1761
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Nikolay Kuznetsov
>         Assigned To: Geir Magnusson Jr
>         Attachments: HARMONY-1761.patch, Test.java
>
>
> During every single thread creation we create APR pool to allocate structure containing parameters for new thread run method. This pool is never being reused or destroyed and costs 8k for every thread being created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-1761) [DRLVM]Memory leak in thread creation

Posted by "Nikolay Kuznetsov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1761?page=comments#action_12442497 ] 
            
Nikolay Kuznetsov commented on HARMONY-1761:
--------------------------------------------

Geir, 
codebase has changed so much sine Invokation API applied, the patch is not applicable any more. The memory pool it was fighting with is not being created any more. Currently we have a memory leak of about 32 bytes per thread. It's not so critical for now, but I will redo the patch to reuse this memory for new threads shortly.

Nik.

> [DRLVM]Memory leak in thread creation
> -------------------------------------
>
>                 Key: HARMONY-1761
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1761
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Nikolay Kuznetsov
>         Assigned To: Geir Magnusson Jr
>         Attachments: HARMONY-1761.patch, Test.java
>
>
> During every single thread creation we create APR pool to allocate structure containing parameters for new thread run method. This pool is never being reused or destroyed and costs 8k for every thread being created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-1761) [DRLVM]Memory leak in thread creation

Posted by "Nikolay Kuznetsov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1761?page=all ]

Nikolay Kuznetsov updated HARMONY-1761:
---------------------------------------

    Attachment: Test.java

Attached example demonstrates the problem; it creates threads which sleep for a millisecond and then exit. After approx 200000 thread creation VM crashes with 2GB memory consumed.

> [DRLVM]Memory leak in thread creation
> -------------------------------------
>
>                 Key: HARMONY-1761
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1761
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Nikolay Kuznetsov
>         Attachments: Test.java
>
>
> During every single thread creation we create APR pool to allocate structure containing parameters for new thread run method. This pool is never being reused or destroyed and costs 8k for every thread being created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-1761) [DRLVM]Memory leak in thread creation

Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1761?page=comments#action_12442747 ] 
            
Geir Magnusson Jr commented on HARMONY-1761:
--------------------------------------------

I throw OOM somewhere around 340 threads... why? :)  I can do 10's of thousands on RI...

> [DRLVM]Memory leak in thread creation
> -------------------------------------
>
>                 Key: HARMONY-1761
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1761
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Nikolay Kuznetsov
>         Assigned To: Geir Magnusson Jr
>         Attachments: HARMONY-1761.patch, Test.java
>
>
> During every single thread creation we create APR pool to allocate structure containing parameters for new thread run method. This pool is never being reused or destroyed and costs 8k for every thread being created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (HARMONY-1761) [DRLVM]Memory leak in thread creation

Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1761?page=all ]

Geir Magnusson Jr reassigned HARMONY-1761:
------------------------------------------

    Assignee: Geir Magnusson Jr

> [DRLVM]Memory leak in thread creation
> -------------------------------------
>
>                 Key: HARMONY-1761
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1761
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Nikolay Kuznetsov
>         Assigned To: Geir Magnusson Jr
>         Attachments: HARMONY-1761.patch, Test.java
>
>
> During every single thread creation we create APR pool to allocate structure containing parameters for new thread run method. This pool is never being reused or destroyed and costs 8k for every thread being created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-1761) [DRLVM]Memory leak in thread creation

Posted by "Nikolay Kuznetsov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1761?page=all ]

Nikolay Kuznetsov updated HARMONY-1761:
---------------------------------------

    Attachment: HARMONY-1761.patch

Attached patch fixes memory this memory leak in thread creation. It's possible to create more than million treads for now. Unfortunately attached example still shows some leakage, which requires additional investigation, while I believe that it's not connected with threading.

> [DRLVM]Memory leak in thread creation
> -------------------------------------
>
>                 Key: HARMONY-1761
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1761
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Nikolay Kuznetsov
>         Attachments: HARMONY-1761.patch, Test.java
>
>
> During every single thread creation we create APR pool to allocate structure containing parameters for new thread run method. This pool is never being reused or destroyed and costs 8k for every thread being created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira