You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Elena Semukhina (JIRA)" <ji...@apache.org> on 2006/10/05 12:48:19 UTC
[jira] Created: (HARMONY-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
-----------------------------------------------------------------------------------------
Key: HARMONY-1720
URL: http://issues.apache.org/jira/browse/HARMONY-1720
Project: Harmony
Issue Type: Bug
Components: DRLVM
Reporter: Elena Semukhina
Priority: Critical
The test fails with the following assertion:
test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
I think it is a compatibility issue.
The spec for Thread.stop() says:
If there is a security manager installed, its checkAccess method is called with this as its argument.
RI does not call this method for a thread which does not run, and this seems reasonable.
I suggest that drlvm would do the same.
NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1720?page=all ]
Geir Magnusson Jr resolved HARMONY-1720.
----------------------------------------
Resolution: Fixed
r467402.
ubuntu 6 - smoke, c-unit, ~kernel
> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-1720
> URL: http://issues.apache.org/jira/browse/HARMONY-1720
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Assigned To: Geir Magnusson Jr
> Priority: Critical
> Attachments: H-1720.patch, H-1720_combined.patch, Harmony-1720_Thread.patch, ThreadStop1.java, ThreadStopThrowable.java
>
>
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
> The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
> I think it is a compatibility issue.
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1720?page=comments#action_12442891 ]
Alexey Varlamov commented on HARMONY-1720:
------------------------------------------
The H-1720_combined.patch
> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-1720
> URL: http://issues.apache.org/jira/browse/HARMONY-1720
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Priority: Critical
> Attachments: H-1720.patch, H-1720_combined.patch, Harmony-1720_Thread.patch, ThreadStop1.java, ThreadStopThrowable.java
>
>
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
> The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
> I think it is a compatibility issue.
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1720?page=all ]
Alexey Varlamov updated HARMONY-1720:
-------------------------------------
Attachment: H-1720.patch
Please try this patch.
> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-1720
> URL: http://issues.apache.org/jira/browse/HARMONY-1720
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Priority: Critical
> Attachments: H-1720.patch, Harmony-1720_Thread.patch
>
>
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
> The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
> I think it is a compatibility issue.
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1720?page=comments#action_12440133 ]
Geir Magnusson Jr commented on HARMONY-1720:
--------------------------------------------
HARMONY-1519 was applied yesterday, and as far as I can tell, only affected windows.
Can you comment how this changes things?
> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-1720
> URL: http://issues.apache.org/jira/browse/HARMONY-1720
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Priority: Critical
> Attachments: Harmony-1720_Thread.patch
>
>
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
> The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
> I think it is a compatibility issue.
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1720?page=comments#action_12441929 ]
Alexey Varlamov commented on HARMONY-1720:
------------------------------------------
-1 to the suggested patch.
1) It introduces race condition into stop(), i.e. the thread may start right after checking "alive" status and thus will not ever stop.
2) It adds inconsistency between stop() and stop(Throwable).
Please consider some other solution. I tried to find similar issues in Sun's bugdatabase, but in vain. I guess "alive" status should not affect this behaviour, it might be other issue.
> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-1720
> URL: http://issues.apache.org/jira/browse/HARMONY-1720
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Priority: Critical
> Attachments: Harmony-1720_Thread.patch
>
>
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
> The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
> I think it is a compatibility issue.
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1720?page=all ]
Geir Magnusson Jr closed HARMONY-1720.
--------------------------------------
> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-1720
> URL: http://issues.apache.org/jira/browse/HARMONY-1720
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Assigned To: Geir Magnusson Jr
> Priority: Critical
> Attachments: H-1720.patch, H-1720_combined.patch, Harmony-1720_Thread.patch, ThreadStop1.java, ThreadStopThrowable.java
>
>
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
> The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
> I think it is a compatibility issue.
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1720?page=comments#action_12441937 ]
Alexey Varlamov commented on HARMONY-1720:
------------------------------------------
Hmm, reading javadoc for Thread.stop(Throwable):
"If there is a security manager installed, the checkAccess method of this thread is called, which may result in a SecurityException being raised (in the current thread).
If this thread is different from the current thread (that is, the current thread is trying to stop a thread other than itself) or obj is not an instance of ThreadDeath, the security manager's checkPermission method (with the RuntimePermission("stopThread") argument) is called in addition. Again, this may result in throwing a SecurityException (in the current thread).
If the argument obj is null, a NullPointerException is thrown (in the current thread). "
Current impl of DRLVM does not follow this description.
Note, checkPermission() for "stopThread" is called only for non-ThreadDeath throwables; and the documentation for stop() requires throwing exactly ThreadDeath instance. So there is inconsistency either in documentation or in impl of the overloaded stop() methods. I may guess stop() is equvalent of stop(new ThreadDeath()) and this is a hole in the javadoc.
PS. I suspect order of exceptions currently is incompatible in DRLVM: NPE should be thrown last, not first.
> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-1720
> URL: http://issues.apache.org/jira/browse/HARMONY-1720
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Priority: Critical
> Attachments: Harmony-1720_Thread.patch
>
>
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
> The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
> I think it is a compatibility issue.
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Posted by "Elena Semukhina (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1720?page=all ]
Elena Semukhina updated HARMONY-1720:
-------------------------------------
Attachment: Harmony-1720_Thread.patch
> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-1720
> URL: http://issues.apache.org/jira/browse/HARMONY-1720
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Priority: Critical
> Attachments: Harmony-1720_Thread.patch
>
>
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
> The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
> I think it is a compatibility issue.
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Posted by "Elena Semukhina (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1720?page=comments#action_12440135 ]
Elena Semukhina commented on HARMONY-1720:
------------------------------------------
This is an old issue and it has not been affected by HARMONY-1519.
> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-1720
> URL: http://issues.apache.org/jira/browse/HARMONY-1720
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Priority: Critical
> Attachments: Harmony-1720_Thread.patch
>
>
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
> The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
> I think it is a compatibility issue.
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1720?page=comments#action_12442866 ]
Alexey Varlamov commented on HARMONY-1720:
------------------------------------------
Oops, I missed some details in the test and my evaluation above is wrong. Indeed there is such queer and undocumented peculiarity around stop().
My +1 to H-1720_combined.patch
> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-1720
> URL: http://issues.apache.org/jira/browse/HARMONY-1720
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Priority: Critical
> Attachments: H-1720.patch, H-1720_combined.patch, Harmony-1720_Thread.patch, ThreadStop1.java, ThreadStopThrowable.java
>
>
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
> The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
> I think it is a compatibility issue.
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Posted by "Elena Semukhina (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1720?page=all ]
Elena Semukhina updated HARMONY-1720:
-------------------------------------
Attachment: ThreadStop1.java
Alexey,
the patch does not solve this issue - the test still fails.
I attached a standalone test to reproduce the issue.
> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-1720
> URL: http://issues.apache.org/jira/browse/HARMONY-1720
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Priority: Critical
> Attachments: H-1720.patch, Harmony-1720_Thread.patch, ThreadStop1.java
>
>
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
> The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
> I think it is a compatibility issue.
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1720?page=comments#action_12442889 ]
Geir Magnusson Jr commented on HARMONY-1720:
--------------------------------------------
which is the right patch now?
> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-1720
> URL: http://issues.apache.org/jira/browse/HARMONY-1720
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Priority: Critical
> Attachments: H-1720.patch, H-1720_combined.patch, Harmony-1720_Thread.patch, ThreadStop1.java, ThreadStopThrowable.java
>
>
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
> The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
> I think it is a compatibility issue.
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1720?page=comments#action_12442860 ]
Alexey Varlamov commented on HARMONY-1720:
------------------------------------------
Elena, thanks for the test!
I slightly modified it and observe different behavior: indeed there is assymetry for stop() and stop(Throwable), but it does not depend on thread status. That is, there is no any check for stop() and both checkAccess(this) and checkPermission(RuntimePermission "stopThread") for stop(Throwable).
Looking at the test_stop_subtest0, I see that exactly this behaviour is expected - I should have looked there earlier to save our time :)
> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-1720
> URL: http://issues.apache.org/jira/browse/HARMONY-1720
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Priority: Critical
> Attachments: H-1720.patch, H-1720_combined.patch, Harmony-1720_Thread.patch, ThreadStop1.java, ThreadStopThrowable.java
>
>
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
> The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
> I think it is a compatibility issue.
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Posted by "Elena Semukhina (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1720?page=all ]
Elena Semukhina updated HARMONY-1720:
-------------------------------------
Attachment: ThreadStopThrowable.java
H-1720_combined.patch
Alexey,
I attached the new patch which combines both suggestions. I added synchronized block to stop() as you noticed in 1) above. As for 2), the RI's behavior is asymmetric for stop() and stop(Throwable) for the threads that are not alive. The attached test ThreadStopThrowable.java demonstrates this.
Your comments?
> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-1720
> URL: http://issues.apache.org/jira/browse/HARMONY-1720
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Priority: Critical
> Attachments: H-1720.patch, H-1720_combined.patch, Harmony-1720_Thread.patch, ThreadStop1.java, ThreadStopThrowable.java
>
>
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
> The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
> I think it is a compatibility issue.
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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-1720) Classlib test
org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1720?page=all ]
Geir Magnusson Jr reassigned HARMONY-1720:
------------------------------------------
Assignee: Geir Magnusson Jr
> Classlib test org.apache.harmony.luni.tests.java.lang.ThreadTest.test_stop_subtest0 fails
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-1720
> URL: http://issues.apache.org/jira/browse/HARMONY-1720
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Assigned To: Geir Magnusson Jr
> Priority: Critical
> Attachments: H-1720.patch, H-1720_combined.patch, Harmony-1720_Thread.patch, ThreadStop1.java, ThreadStopThrowable.java
>
>
> The test fails with the following assertion:
> test_stop_subtest0(org.apache.harmony.luni.tests.java.lang.ThreadTest)junit.fework.AssertionFailedError: checkAccess called
> The test does not expect that security manager's checkAccess() method is called when stopping a new thread which is not running yet.
> I think it is a compatibility issue.
> The spec for Thread.stop() says:
> If there is a security manager installed, its checkAccess method is called with this as its argument.
> RI does not call this method for a thread which does not run, and this seems reasonable.
> I suggest that drlvm would do the same.
> NOTE: to reproduce the bug you should comment out ThreadTest.test_suspend() which hangs now. This issue is expected to be fixed with H-1519.
--
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