You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Pavel Afremov (JIRA)" <ji...@apache.org> on 2006/12/15 12:31:21 UTC

[jira] Created: (HARMONY-2742) [drlvm] Memory leak in threading system.

[drlvm] Memory leak in threading system.
----------------------------------------

                 Key: HARMONY-2742
                 URL: http://issues.apache.org/jira/browse/HARMONY-2742
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Pavel Afremov


Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.


-- 
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-2742) [drlvm][thread] Memory leak in threading system.

Posted by "Peter Novodvorsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Novodvorsky updated HARMONY-2742:
---------------------------------------

    Attachment: monitor_deallocation_25.05.2007-2.patch

forgot to include ManyThreadsTest in last patch

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, monitor_deallocation_22.05.2007-3.patch, monitor_deallocation_23.05.2007-1.patch, monitor_deallocation_23.05.2007-2.patch, monitor_deallocation_25.05.2007-1.patch, monitor_deallocation_25.05.2007-2.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn updated HARMONY-2742:
-------------------------------------

    Attachment: second_design001_thread_manager.diff

> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch, second_design001_gen_gen.diff, second_design001_thread_manager.diff
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn updated HARMONY-2742:
-------------------------------------

    Attachment: second_design001_gen_gen.diff

> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch, second_design001_gen_gen.diff, second_design001_thread_manager.diff
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "Peter Novodvorsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Novodvorsky updated HARMONY-2742:
---------------------------------------

    Attachment: release_fat_monitors_gcv4.1.patch

Fat monitors are never deallocated and eat up to 110 mb in this test.

Attached file fixes this (works only with gcv4.1).


> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn updated HARMONY-2742:
-------------------------------------

    Attachment:     (was: second_design001_gen_gen.diff)

> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch, second_design001_gen_gen.diff, second_design001_thread_manager.diff
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "Peter Novodvorsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Novodvorsky updated HARMONY-2742:
---------------------------------------

    Attachment: monitor_deallocation_22.05.2007-3.patch

this patch fixes intermittently reproducable bug that happened while using Jitrino.OPT.


> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, monitor_deallocation_22.05.2007-3.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "Salikh Zakirov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466042 ] 

Salikh Zakirov commented on HARMONY-2742:
-----------------------------------------

As it turns out, recycling thread-local pools does not result in memory usage reduction, however, can result in instable behavior, as some synchronization objects are allocated out from these pools. For example, fat monitors may outlive the thread in context of which they were created.

A simple counter shows that inflating monitors contributes a significant share of the memory being leaked on ManyThreadsTest. 


> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: ManyThreadsTest.java
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

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

        

[jira] Updated: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn updated HARMONY-2742:
-------------------------------------

    Attachment: second_design003.patch

comments have been cleaned up.  Some variables now have more logical names

> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design___ManyThreadsTest.java
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn updated HARMONY-2742:
-------------------------------------

    Priority: Minor  (was: Major)

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>            Assignee: weldon washburn
>            Priority: Minor
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, monitor_deallocation_22.05.2007-3.patch, monitor_deallocation_23.05.2007-1.patch, monitor_deallocation_23.05.2007-2.patch, monitor_deallocation_25.05.2007-1.patch, monitor_deallocation_25.05.2007-2.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn closed HARMONY-2742.
------------------------------------

    Resolution: Fixed

committed to svn head.  It passes on lin32 and 64 win32 and 64 boxes

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>            Assignee: weldon washburn
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, monitor_deallocation_22.05.2007-3.patch, monitor_deallocation_23.05.2007-1.patch, monitor_deallocation_23.05.2007-2.patch, monitor_deallocation_25.05.2007-1.patch, monitor_deallocation_25.05.2007-2.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "Peter Novodvorsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Novodvorsky updated HARMONY-2742:
---------------------------------------

    Attachment: monitor_deallocation_21.05.2007-4.patch

updated version

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn updated HARMONY-2742:
-------------------------------------

    Attachment:     (was: second_design001_gen_gen.diff)

> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design___ManyThreadsTest.java
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "Peter Novodvorsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Novodvorsky updated HARMONY-2742:
---------------------------------------

    Attachment: monitor_deallocation_22.05.2007-2.patch

updated patch. tested on lin32, lin64 and win64

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "Salikh Zakirov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465202 ] 

Salikh Zakirov commented on HARMONY-2742:
-----------------------------------------

Just noticed: when the old thread block is reused for a new thread, its memory pool is not recreated,
so old threads' objects remain allocated forever.

> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: ManyThreadsTest.java
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

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

        

[jira] Closed: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn closed HARMONY-2742.
------------------------------------

    Resolution: Fixed

the remaining issues have been covered in other patches

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>            Assignee: weldon washburn
>            Priority: Minor
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, monitor_deallocation_22.05.2007-3.patch, monitor_deallocation_23.05.2007-1.patch, monitor_deallocation_23.05.2007-2.patch, monitor_deallocation_25.05.2007-1.patch, monitor_deallocation_25.05.2007-2.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn updated HARMONY-2742:
-------------------------------------

    Attachment: second_design___ManyThreadsTest.java

> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch, second_design001_gen_gen.diff, second_design001_thread_manager.diff, second_design___ManyThreadsTest.java
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494731 ] 

weldon washburn commented on HARMONY-2742:
------------------------------------------

I keep forgetting to mention that the current patch (second_design005.patch) uses second_design__ManyThreadsTest.java.  The original java test will fail until we get gc_force_gc() fixed.

> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design___ManyThreadsTest.java
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "Peter Novodvorsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Novodvorsky updated HARMONY-2742:
---------------------------------------

    Attachment: monitor_deallocation_23.05.2007-1.patch

updated patch. fixed problem with not zeroing occupied_slots member of lock_table structure.

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, monitor_deallocation_22.05.2007-3.patch, monitor_deallocation_23.05.2007-1.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "Peter Novodvorsky (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499066 ] 

Peter Novodvorsky commented on HARMONY-2742:
--------------------------------------------

patch passes all tests and ready for commit.

please commit.

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, monitor_deallocation_22.05.2007-3.patch, monitor_deallocation_23.05.2007-1.patch, monitor_deallocation_23.05.2007-2.patch, monitor_deallocation_25.05.2007-1.patch, monitor_deallocation_25.05.2007-2.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "Pavel Rebriy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506564 ] 

Pavel Rebriy commented on HARMONY-2742:
---------------------------------------

HARMONY-4036 is ready to commit. With updated H4036.patch 'build test' passed on 4 platforms.

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>            Assignee: weldon washburn
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, monitor_deallocation_22.05.2007-3.patch, monitor_deallocation_23.05.2007-1.patch, monitor_deallocation_23.05.2007-2.patch, monitor_deallocation_25.05.2007-1.patch, monitor_deallocation_25.05.2007-2.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "Peter Novodvorsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Novodvorsky updated HARMONY-2742:
---------------------------------------

    Attachment: monitor_deallocation_23.05.2007-2.patch

fixed warnings on win32 build

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, monitor_deallocation_22.05.2007-3.patch, monitor_deallocation_23.05.2007-1.patch, monitor_deallocation_23.05.2007-2.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn updated HARMONY-2742:
-------------------------------------

    Attachment: second_design002.diff

The original ManyThreadsTest.java now runs successfully but very slowly.  The reason is becase gc_force_gc() does not have a parameter to force a major collection.  A major collection is the only way I (currently) know how to make the GC give an accurate accounting of all the live fat table entries.   I suspect this test is running really slow because many minor collections are invoked without freeing any fat lock table entries.

The current design has a quota of 50% of the fat lock table.  The table is hardcoded at 8KB entries.  Its easy to make the table dynamically expandable.  Its just not a priority until a workload shows we need to do this.  In any case, a quota approach was taken because forcing a major collection during a fat lock inflation means that all callee's of fat lock inflation need to be in a suspend enabled state.  It turns out there is a code path from  gen_monitor_enter_fast_path_helper() that can not allow the suspend enabled state because there are unaccounted for raw interior heap pointers on the stack.  In specific, the pointer to an object's lockword.  The quota design gets around this problem by allowing the fat table occupancy to exceed the quota in anticipation that future fat lock allocations will cause a gc_force_gc().  The gc_force_gc() is called at (most) entry points that can cause a fat lock inflate.

This patch also uncovers something that looks like a bug.  It turns out that IDATA VMCALL jthread_monitor_enter(jobject monitor); is sometimes called with hythread_t.disable_count = 0 and sometimes with disable_count = 1;  It seems that from design rules, jthread_monitor_enter should always be called with disable count = 0.   Also, I think there are assert()'s in the code that jthread_monitor_enter() calls that assume this design rule. The "hack" to workaround this issue is to only call gc_force_gc() if disable_count == 0.

The next step is to clean up this code, merge with the latest svn HEAD and run regressions on all four (4) regression platforms  -- lin32, lin64, win32, win64.  It should then be ready for review and optimistically commit.

There are two choices for fixing the gc_force_gc() problem.  Either add a call parameter like:
gc_force_gc(MINOR), gc_force_gc(MAJOR);  or change the semantics of gc_force_gc() so that it always does a major collection.





> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design___ManyThreadsTest.java
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn updated HARMONY-2742:
-------------------------------------

    Attachment: second_design004.patch

This patch sets aside fixing the gc_force_gc() problems.  In specific, the GC/VM API probably needs to be extended to support gc_force_gc(MAJOR).  Currently there is zero way to force a major collection.  And, until a major collection occurs, its probably next to impossible to determine which fat locks are still alive.

Another problem with gc_force_gc() is that the cunit test framework does not support a jthread.lib calling gc_force_gc() api.  See dev@harmony mailing list for additional details.

> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design___ManyThreadsTest.java
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn updated HARMONY-2742:
-------------------------------------

    Attachment: second_design006.patch

This should be the final version of this patch.  It was merged with svn head about 3 hours ago.  Comments and variable names were cleaned up.  The remaining task is to confirm this patch works on various windows and linux platforms

> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "Peter Novodvorsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Novodvorsky updated HARMONY-2742:
---------------------------------------

    Attachment: monitor_deallocation_25.05.2007-1.patch

updated version, slots_occupied variable removed.

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, monitor_deallocation_22.05.2007-3.patch, monitor_deallocation_23.05.2007-1.patch, monitor_deallocation_23.05.2007-2.patch, monitor_deallocation_25.05.2007-1.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn updated HARMONY-2742:
-------------------------------------

    Attachment: second_design001_gc_gen.diff

> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design___ManyThreadsTest.java
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "Pavel Rebriy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499067 ] 

Pavel Rebriy commented on HARMONY-2742:
---------------------------------------

Regression tests on Windows32, Linux32, Linux64 is successfully passed.
On Windows64 platform org.apache.harmony.drlvm.tests.regression.H2873.RemTest is failed with "Result differ" status. I think this is JIT regression and don't concern to the monitor deallocation fix.

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, monitor_deallocation_22.05.2007-3.patch, monitor_deallocation_23.05.2007-1.patch, monitor_deallocation_23.05.2007-2.patch, monitor_deallocation_25.05.2007-1.patch, monitor_deallocation_25.05.2007-2.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "Pavel Rebriy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506409 ] 

Pavel Rebriy commented on HARMONY-2742:
---------------------------------------

HARMONY-4036 is ready to commit, see  readers_writers_locktable_untabify_indent_2.patch.

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>            Assignee: weldon washburn
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, monitor_deallocation_22.05.2007-3.patch, monitor_deallocation_23.05.2007-1.patch, monitor_deallocation_23.05.2007-2.patch, monitor_deallocation_25.05.2007-1.patch, monitor_deallocation_25.05.2007-2.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "Pavel Rebriy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506490 ] 

Pavel Rebriy commented on HARMONY-2742:
---------------------------------------

HARMONY-4024 is ready to commit, see H4024.patch and comments JIRA.

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>            Assignee: weldon washburn
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, monitor_deallocation_22.05.2007-3.patch, monitor_deallocation_23.05.2007-1.patch, monitor_deallocation_23.05.2007-2.patch, monitor_deallocation_25.05.2007-1.patch, monitor_deallocation_25.05.2007-2.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm] Memory leak in threading system.

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

Pavel Afremov updated HARMONY-2742:
-----------------------------------

    Attachment: ManyThreadsTest.java

Attached test shows memory leak, conceivably in threading system. 
Also DRLVM asserts in vm/thread/src/thread_native_thin_monitor.c (line 653),  assert(lock_id >=0 && lock_id < table_size);

> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: ManyThreadsTest.java
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
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-2742) [drlvm] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489003 ] 

weldon washburn commented on HARMONY-2742:
------------------------------------------

Back in January Salikh said, "A simple counter shows that inflating monitors contributes a significant share of the memory being leaked on ManyThreadsTest."

I measured the amount of memory each monitor inflate consumes.  From what I can tell, its only 4 bytes.  While we ultimately need to fix this leak, the 4 bytes lost on monitor fat lock inflate is insignificant in the face of the 10KB lost on every thread create.  We first need to fix the 10KB memory leak on each thread create.

> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky updated HARMONY-2742:
---------------------------------------

    Summary: [drlvm][thread] Memory leak in threading system.  (was: [drlvm] Memory leak in threading system.)

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn updated HARMONY-2742:
-------------------------------------

    Attachment: second_design005.patch

I accidentally left a diagnostic printf() in second_design004.patch.

> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design___ManyThreadsTest.java
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "Peter Novodvorsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Novodvorsky updated HARMONY-2742:
---------------------------------------

    Attachment: updated_2742_007.patch

updated patch, fixed some faults Pavel noticed:

1.       Remove IS_FAT_LOCK macros from GC.[Washburn, Weldon] Xiao Feng plans to fix this after the commit.

[Rebriy, Pavel] We can move it to VM side and we don't need any GC team support.

2.       Rename vm_notify_native_obj_attached function to something more common.[Washburn, Weldon] any suggestions?

[Rebriy, Pavel] vm_notify_life_obj() is an example

3.       For file ManyThreadsTest.java remove ^M at the end of lines.[Washburn, Weldon] good idea

4.       Line 370-375 - may be better use calloc function here?[Washburn, Weldon] good idea

5.       Line 381 - any race condition is here? Do we need this assert?[Washburn, Weldon] there might be a race condition.  The note is to remind us to think through the synchronization issues carefully.  The, "assert(live_table[array_cursor] == 0);" is useful.  A free fat lock should never be marked by the GC as live.

[Rebriy, Pavel] If race condition is over here, some locks should protect the code. It very hard to fix race condition on Eclipse application later...

6.       Line 398 - better to use DIE macros here.[Washburn, Weldon] good idea

7.       Line 437 - remove commented printf.[Washburn, Weldon]  I want to leave it in for a while.  It is a useful debug tool

[Rebriy, Pavel] Better use TRACE here.

8.       Line 441 - Remove hythread_fat_lock_quota function? It's do nothing.[Washburn, Weldon] It works in conjunction with gc_force_gc.  It will be used once gc_force_gc is implemented.

[Rebriy, Pavel] J I could change it to:

 

+UDATA hythread_fat_lock_quota() {

+

+    if ( number_of_occupied_array_slots > MAX_FAT_TABLE_ENTRIES/2

+         && !tm_self_tls-> disable_count)  {

+         return ~((UDATA)0);

+    } else {

+         return 0;

+    }

+}

 

9.       Line 467 - What's the hack? Use DIE macros here.[Washburn, Weldon] Good idea

10.   Line 491 - move initialization of lock_table to init_group_list function.[Washburn, Weldon]  good idea.  It should be done after the initial commit.



 


> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn updated HARMONY-2742:
-------------------------------------

    Attachment: second_design001_gen_gen.diff

The second_design001*.diff files comprise a prototype of a simpler approach to reclaiming fat lock resources associated with dead java objects.  This patch is not yet ready to commit.

The second_design* approach does not use weak references, which means the GC and TM do not need to coordinate the maintenace of weak ref pointer lists.  The second_design* approach requires only a single pass of the fat lock array.

Additional detailed info:  GCV5 was used.  I have looked at GCV4.1 but  so far have been unable to figure out how to modify this code to support the 2nd design.  To support generic collection of native resources that are associated with Java objects, there needs to be a GC/VM interface for forcing a major GC.  It seems gc_force_gc() needs to be somehow involved.  The force gc part of the design has not been completely figured out.  My thinking is that if it is too hard to call gc_force_gc(major_collection) from fat monitor inflate, it might make sense to set a flag that will cause a major collection at some future convenient GC event (like swapping nurseries).  The concept is to set this flag while there is still 50% free space in the fat lock table.  The idea is that a major collection will free native resources before the system hard crashes.

The second_design* patches pass an extended version of ManyThreadsTest.java.  The original java file was enhanced to allocate java objects while threads are creating/dying.  This forces the GC to clean the fat lock table (and is actually more representative of typical workloads.)


> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, release_fat_monitors_gcv4.1.patch, second_design001_gen_gen.diff
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-2742) [drlvm] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn reassigned HARMONY-2742:
----------------------------------------

    Assignee: weldon washburn

> [drlvm] Memory leak in threading system.
> ----------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "Peter Novodvorsky (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499072 ] 

Peter Novodvorsky commented on HARMONY-2742:
--------------------------------------------

patch passed tests on linux32 and linux64

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Assigned To: weldon washburn
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, monitor_deallocation_22.05.2007-3.patch, monitor_deallocation_23.05.2007-1.patch, monitor_deallocation_23.05.2007-2.patch, monitor_deallocation_25.05.2007-1.patch, monitor_deallocation_25.05.2007-2.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (HARMONY-2742) [drlvm][thread] Memory leak in threading system.

Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

weldon washburn reopened HARMONY-2742:
--------------------------------------

    Estimated Complexity: Advanced

The original intention was to commit second_designxxx.patch.  There was a mixup and some other code was committed.  We now need to remove the other code and commit the intended patch.

> [drlvm][thread] Memory leak in threading system.
> ------------------------------------------------
>
>                 Key: HARMONY-2742
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2742
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>            Assignee: weldon washburn
>         Attachments: ManyThreadsTest.java, monitor_deallocation_21.05.2007-4.patch, monitor_deallocation_22.05.2007-2.patch, monitor_deallocation_22.05.2007-3.patch, monitor_deallocation_23.05.2007-1.patch, monitor_deallocation_23.05.2007-2.patch, monitor_deallocation_25.05.2007-1.patch, monitor_deallocation_25.05.2007-2.patch, release_fat_monitors_gcv4.1.patch, second_design001_gc_gen.diff, second_design001_thread_manager.diff, second_design002.diff, second_design003.patch, second_design004.patch, second_design005.patch, second_design006.patch, second_design___ManyThreadsTest.java, updated_2742_007.patch
>
>
> Creating, starting and joining thread is source of memory leak. This leak is not fixed by patch from HARMONY-2437.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.