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/10 20:59:21 UTC

[jira] Created: (HARMONY-1816) [DRLVM] drlvm counts non daemon threads incorrectly

[DRLVM] drlvm counts non daemon threads incorrectly
---------------------------------------------------

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


There are several problems with non demon(those which vm should wait before destroing itself) threads counting in drlvm:
1. Non daemon threads count being increased by the thread being run
This leads to the problem that main thread may finish w/o waiting for the child non-daemon thread;
2. Main thread waiting while number of non daemon threads will be equal to zero, while the main thread itself also non daemon thread
(waiting method checks at enter that thread count should be <= 1, but waits on condition while count ==0)
Basically this causes vm to hang at shutdown if child thread works longer than main method.

-- 
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-1816) [DRLVM] drlvm counts non daemon threads incorrectly

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

Nikolay Kuznetsov updated HARMONY-1816:
---------------------------------------

    Attachment: Test1.java

Attached test demonstrates the problem. It may finish w/o waiting for the thread being run(uncomment commented sleep in this case) or just hang if main method finishes after thread has been already started but hasn't finished yet.

> [DRLVM] drlvm counts non daemon threads incorrectly
> ---------------------------------------------------
>
>                 Key: HARMONY-1816
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1816
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Nikolay Kuznetsov
>         Attachments: Test1.java
>
>
> There are several problems with non demon(those which vm should wait before destroing itself) threads counting in drlvm:
> 1. Non daemon threads count being increased by the thread being run
> This leads to the problem that main thread may finish w/o waiting for the child non-daemon thread;
> 2. Main thread waiting while number of non daemon threads will be equal to zero, while the main thread itself also non daemon thread
> (waiting method checks at enter that thread count should be <= 1, but waits on condition while count ==0)
> Basically this causes vm to hang at shutdown if child thread works longer than main method.

-- 
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-1816) [DRLVM] drlvm counts non daemon threads incorrectly

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

Never mind.  It does.

> [DRLVM] drlvm counts non daemon threads incorrectly
> ---------------------------------------------------
>
>                 Key: HARMONY-1816
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1816
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Nikolay Kuznetsov
>         Attachments: HARMONY-1816.patch, Test1.java
>
>
> There are several problems with non demon(those which vm should wait before destroing itself) threads counting in drlvm:
> 1. Non daemon threads count being increased by the thread being run
> This leads to the problem that main thread may finish w/o waiting for the child non-daemon thread;
> 2. Main thread waiting while number of non daemon threads will be equal to zero, while the main thread itself also non daemon thread
> (waiting method checks at enter that thread count should be <= 1, but waits on condition while count ==0)
> Basically this causes vm to hang at shutdown if child thread works longer than main method.

-- 
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-1816) [DRLVM] drlvm counts non daemon threads incorrectly

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

Geir Magnusson Jr updated HARMONY-1816:
---------------------------------------

    Component/s: DRLVM

> [DRLVM] drlvm counts non daemon threads incorrectly
> ---------------------------------------------------
>
>                 Key: HARMONY-1816
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1816
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Nikolay Kuznetsov
>         Attachments: HARMONY-1816.patch, Test1.java
>
>
> There are several problems with non demon(those which vm should wait before destroing itself) threads counting in drlvm:
> 1. Non daemon threads count being increased by the thread being run
> This leads to the problem that main thread may finish w/o waiting for the child non-daemon thread;
> 2. Main thread waiting while number of non daemon threads will be equal to zero, while the main thread itself also non daemon thread
> (waiting method checks at enter that thread count should be <= 1, but waits on condition while count ==0)
> Basically this causes vm to hang at shutdown if child thread works longer than main method.

-- 
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-1816) [DRLVM] drlvm counts non daemon threads incorrectly

Posted by "Elena Semukhina (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1816?page=comments#action_12441926 ] 
            
Elena Semukhina commented on HARMONY-1816:
------------------------------------------

I tried the patch together with HARMONY-1592 and HARMONY-1823.
They eiminate recent classlib tests pass rate degradation.
drlvm smoke, cunit, kernel pass.

> [DRLVM] drlvm counts non daemon threads incorrectly
> ---------------------------------------------------
>
>                 Key: HARMONY-1816
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1816
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Nikolay Kuznetsov
>         Attachments: HARMONY-1816.patch, Test1.java
>
>
> There are several problems with non demon(those which vm should wait before destroing itself) threads counting in drlvm:
> 1. Non daemon threads count being increased by the thread being run
> This leads to the problem that main thread may finish w/o waiting for the child non-daemon thread;
> 2. Main thread waiting while number of non daemon threads will be equal to zero, while the main thread itself also non daemon thread
> (waiting method checks at enter that thread count should be <= 1, but waits on condition while count ==0)
> Basically this causes vm to hang at shutdown if child thread works longer than main method.

-- 
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] Resolved: (HARMONY-1816) [DRLVM] drlvm counts non daemon threads incorrectly

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

Geir Magnusson Jr resolved HARMONY-1816.
----------------------------------------

    Resolution: Fixed

r463973

Ubuntu 6 - testcase, smoke, c-unit, ~kernel

> [DRLVM] drlvm counts non daemon threads incorrectly
> ---------------------------------------------------
>
>                 Key: HARMONY-1816
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1816
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Nikolay Kuznetsov
>         Assigned To: Geir Magnusson Jr
>         Attachments: HARMONY-1816.patch, Test1.java
>
>
> There are several problems with non demon(those which vm should wait before destroing itself) threads counting in drlvm:
> 1. Non daemon threads count being increased by the thread being run
> This leads to the problem that main thread may finish w/o waiting for the child non-daemon thread;
> 2. Main thread waiting while number of non daemon threads will be equal to zero, while the main thread itself also non daemon thread
> (waiting method checks at enter that thread count should be <= 1, but waits on condition while count ==0)
> Basically this causes vm to hang at shutdown if child thread works longer than main method.

-- 
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-1816) [DRLVM] drlvm counts non daemon threads incorrectly

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

Nikolay Kuznetsov updated HARMONY-1816:
---------------------------------------

    Attachment: HARMONY-1816.patch

Attach patch fixes the problem with non daemon threads counting.

> [DRLVM] drlvm counts non daemon threads incorrectly
> ---------------------------------------------------
>
>                 Key: HARMONY-1816
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1816
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Nikolay Kuznetsov
>         Attachments: HARMONY-1816.patch, Test1.java
>
>
> There are several problems with non demon(those which vm should wait before destroing itself) threads counting in drlvm:
> 1. Non daemon threads count being increased by the thread being run
> This leads to the problem that main thread may finish w/o waiting for the child non-daemon thread;
> 2. Main thread waiting while number of non daemon threads will be equal to zero, while the main thread itself also non daemon thread
> (waiting method checks at enter that thread count should be <= 1, but waits on condition while count ==0)
> Basically this causes vm to hang at shutdown if child thread works longer than main method.

-- 
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-1816) [DRLVM] drlvm counts non daemon threads incorrectly

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

I can't get this test case to fail.  Ubuntu 6, r463956 

> [DRLVM] drlvm counts non daemon threads incorrectly
> ---------------------------------------------------
>
>                 Key: HARMONY-1816
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1816
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Nikolay Kuznetsov
>         Attachments: HARMONY-1816.patch, Test1.java
>
>
> There are several problems with non demon(those which vm should wait before destroing itself) threads counting in drlvm:
> 1. Non daemon threads count being increased by the thread being run
> This leads to the problem that main thread may finish w/o waiting for the child non-daemon thread;
> 2. Main thread waiting while number of non daemon threads will be equal to zero, while the main thread itself also non daemon thread
> (waiting method checks at enter that thread count should be <= 1, but waits on condition while count ==0)
> Basically this causes vm to hang at shutdown if child thread works longer than main method.

-- 
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-1816) [DRLVM] drlvm counts non daemon threads incorrectly

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

Geir Magnusson Jr closed HARMONY-1816.
--------------------------------------


> [DRLVM] drlvm counts non daemon threads incorrectly
> ---------------------------------------------------
>
>                 Key: HARMONY-1816
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1816
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Nikolay Kuznetsov
>         Assigned To: Geir Magnusson Jr
>         Attachments: HARMONY-1816.patch, Test1.java
>
>
> There are several problems with non demon(those which vm should wait before destroing itself) threads counting in drlvm:
> 1. Non daemon threads count being increased by the thread being run
> This leads to the problem that main thread may finish w/o waiting for the child non-daemon thread;
> 2. Main thread waiting while number of non daemon threads will be equal to zero, while the main thread itself also non daemon thread
> (waiting method checks at enter that thread count should be <= 1, but waits on condition while count ==0)
> Basically this causes vm to hang at shutdown if child thread works longer than main method.

-- 
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-1816) [DRLVM] drlvm counts non daemon threads incorrectly

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

Geir Magnusson Jr reassigned HARMONY-1816:
------------------------------------------

    Assignee: Geir Magnusson Jr

> [DRLVM] drlvm counts non daemon threads incorrectly
> ---------------------------------------------------
>
>                 Key: HARMONY-1816
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1816
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Nikolay Kuznetsov
>         Assigned To: Geir Magnusson Jr
>         Attachments: HARMONY-1816.patch, Test1.java
>
>
> There are several problems with non demon(those which vm should wait before destroing itself) threads counting in drlvm:
> 1. Non daemon threads count being increased by the thread being run
> This leads to the problem that main thread may finish w/o waiting for the child non-daemon thread;
> 2. Main thread waiting while number of non daemon threads will be equal to zero, while the main thread itself also non daemon thread
> (waiting method checks at enter that thread count should be <= 1, but waits on condition while count ==0)
> Basically this causes vm to hang at shutdown if child thread works longer than main method.

-- 
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