harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Salikh Zakirov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-1789) [DRLVM] Race condition between Thread.interrupt and Object.wait, Thread.sleep or join
Date Wed, 15 Nov 2006 18:05:39 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1789?page=all ]

Salikh Zakirov updated HARMONY-1789:
------------------------------------

    Attachment: HARMONY1789.java

HARMONY1789.java provides a sort of a reproducer for this issue.
Formally, specification does not provide any guarantee that interruptions will be caught correctly,
however, the test happen to pass several times in a row on both Bea and Sun JVMs.
Expected output:
  100000 interrupts generated
  100000 interrupts received, 1 polled, 99999 exceptions
  PASSED
(sometimes it is "0 polled, 100000 exceptions", but the sum is still the same).

The output on current DRLVM (from trunk) may be:
  100000 interrupts generated
  99999 interrupts received, 1 polled, 99998 exceptions
  FAILED
Running the test several times in a row, I've got following pass rates:
DRLVM from SVN: failed 9 of 17
DRLVM + H-1789.patch: failed 1 of 17.
Bea: passed 17 times in a row

Thus, this test, while not fully correct, demonstrates how this issue (as described in Description
above) can affect DRLVM behaviour. 

> [DRLVM] Race condition between Thread.interrupt and Object.wait, Thread.sleep or join
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1789
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1789
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Nikolay Kuznetsov
>         Assigned To: Alexey Varlamov
>         Attachments: H-1789.patch, HARMONY1789.java, Test.java
>
>
> According to the specification wait/join or sleep methods should check if thread was
interrupted before entering wait. DRLVM hythread implmentation do checks interrupted status(see
hythread condition implmentation), however thread may be interrupted just after the status
was checked and before entering condition wait. Thus it's required to ensure that waiting
state will be reached having interrupted status unchanged.

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

        

Mime
View raw message