You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vasily Zakharov (JIRA)" <ji...@apache.org> on 2007/04/12 20:38:15 UTC

[jira] Created: (HARMONY-3641) [drlvm][netbeans] Thread.interrupt() throws InterruptException in wrong thread

[drlvm][netbeans] Thread.interrupt() throws InterruptException in wrong thread
------------------------------------------------------------------------------

                 Key: HARMONY-3641
                 URL: https://issues.apache.org/jira/browse/HARMONY-3641
             Project: Harmony
          Issue Type: Bug
          Components: App-Oriented Bug Reports, DRLVM
            Reporter: Vasily Zakharov


Consider the attached test. It implements a simple manual synchronization mechanism using Object.wait() and Thread.interrupt(), similar to the one used by org.apache.harmony.awt.wtk.Synchronizer (see HARMONY-3601).

On DRL VM this mechanism works incorrectly - it seems like Thread.interrupt() causes InterruptException in wrong thread or in more than one thread at once. Here's the output:

RI:

SUCCESS

Harmony/IBM VM:

SUCCESS

Harmony/DRL VM:

ERROR at Thread[Thread-13,5,main]: Not owner can't unlock resource
ERROR at Thread[Thread-12,5,main]: Not owner can't unlock resource
ERROR at Thread[Thread-11,5,main]: Not owner can't unlock resource
ERROR at Thread[Thread-10,5,main]: Not owner can't unlock resource
Thread[Thread-9,5,main] interrupted while working!
Thread[Thread-8,5,main] interrupted while working!
ERROR at Thread[Thread-8,5,main]: Not owner can't unlock resource
Thread[Thread-7,5,main] interrupted while working!
ERROR at Thread[Thread-7,5,main]: Not owner can't unlock resource
Thread[Thread-6,5,main] interrupted while working!
ERROR at Thread[Thread-6,5,main]: Not owner can't unlock resource
ERROR at Thread[Thread-5,5,main]: Not owner can't unlock resource
FAIL

This issue was filed as a result of investigating the HARMONY-3601 issue with NetBeans.

Great thanks to Andrey Pavlenko for extracting this problem out of AWT.


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


[jira] Commented: (HARMONY-3641) [drlvm][netbeans] Thread.interrupt() throws InterruptException in wrong thread

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

weldon washburn commented on HARMONY-3641:
------------------------------------------

hmm.... its not clear to me what thread checker is telling us.

However, I looked at the source code.  It seems jthread_interrupt() ultimately calls hycond_notify_all().  In other words doing a java.lang.Thread.interrupt() looks like it actually broadcasts interrupts to all the waiting threads.  This would be the wrong thing to do. Maybe its a typo.  Howver, I can not find code in svn head that can interrupt a targeted waiting thread in isolation.  That is, pull a waiting thread out of the wait queue, change the status to show it has been interrupted, then finally unblock just this one single thread.  It seems there is missing functionality (?!)  Am I misreading the source?  Does anyone else see this?

> [drlvm][netbeans] Thread.interrupt() throws InterruptException in wrong thread
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-3641
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3641
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, DRLVM
>            Reporter: Vasily Zakharov
>         Assigned To: weldon washburn
>         Attachments: Test.java
>
>
> Consider the attached test. It implements a simple manual synchronization mechanism using Object.wait() and Thread.interrupt(), similar to the one used by org.apache.harmony.awt.wtk.Synchronizer (see HARMONY-3601).
> On DRL VM this mechanism works incorrectly - it seems like Thread.interrupt() causes InterruptException in wrong thread or in more than one thread at once. Here's the output:
> RI:
> SUCCESS
> Harmony/IBM VM:
> SUCCESS
> Harmony/DRL VM:
> ERROR at Thread[Thread-13,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-12,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-11,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-10,5,main]: Not owner can't unlock resource
> Thread[Thread-9,5,main] interrupted while working!
> Thread[Thread-8,5,main] interrupted while working!
> ERROR at Thread[Thread-8,5,main]: Not owner can't unlock resource
> Thread[Thread-7,5,main] interrupted while working!
> ERROR at Thread[Thread-7,5,main]: Not owner can't unlock resource
> Thread[Thread-6,5,main] interrupted while working!
> ERROR at Thread[Thread-6,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-5,5,main]: Not owner can't unlock resource
> FAIL
> This issue was filed as a result of investigating the HARMONY-3601 issue with NetBeans.
> Great thanks to Andrey Pavlenko for extracting this problem out of AWT.

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


[jira] Commented: (HARMONY-3641) [drlvm][thread][netbeans] Thread.interrupt() throws InterruptException in wrong thread

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

weldon washburn commented on HARMONY-3641:
------------------------------------------

Peter,
The patch seems to work on lin32 and win64 boxes.  Are you planning to clean up Test.java so that it can be committed to the drlvm smoke test directory?  The idea is to make this test conform to whatever the other tests in this directory do.  Example:  println("PASS") instead of println("SUCCESS");

> [drlvm][thread][netbeans] Thread.interrupt() throws InterruptException in wrong thread
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3641
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3641
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, DRLVM
>            Reporter: Vasily Zakharov
>            Assignee: weldon washburn
>         Attachments: Test.java, thread_wait_interrupt-28.05.2007-1.patch
>
>
> Consider the attached test. It implements a simple manual synchronization mechanism using Object.wait() and Thread.interrupt(), similar to the one used by org.apache.harmony.awt.wtk.Synchronizer (see HARMONY-3601).
> On DRL VM this mechanism works incorrectly - it seems like Thread.interrupt() causes InterruptException in wrong thread or in more than one thread at once. Here's the output:
> RI:
> SUCCESS
> Harmony/IBM VM:
> SUCCESS
> Harmony/DRL VM:
> ERROR at Thread[Thread-13,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-12,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-11,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-10,5,main]: Not owner can't unlock resource
> Thread[Thread-9,5,main] interrupted while working!
> Thread[Thread-8,5,main] interrupted while working!
> ERROR at Thread[Thread-8,5,main]: Not owner can't unlock resource
> Thread[Thread-7,5,main] interrupted while working!
> ERROR at Thread[Thread-7,5,main]: Not owner can't unlock resource
> Thread[Thread-6,5,main] interrupted while working!
> ERROR at Thread[Thread-6,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-5,5,main]: Not owner can't unlock resource
> FAIL
> This issue was filed as a result of investigating the HARMONY-3601 issue with NetBeans.
> Great thanks to Andrey Pavlenko for extracting this problem out of AWT.

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


[jira] Commented: (HARMONY-3641) [drlvm][netbeans] Thread.interrupt() throws InterruptException in wrong thread

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

Ilya Leviev commented on HARMONY-3641:
--------------------------------------

I have run test scenario from the JIRA with TC and have located points of code where the problems related to thread interrupt issues have occurred. There are following race conditions were detected.


Here is stack traces of first issue.

Write -> Write data-race	Memory write at "thread_native_interrupt.c":42 conflicts with a prior memory write at "thread_java_monitors.c":101


thread_java_monitors.c:101
"98"	""	" #endif //LOCK_RESERVATION"
"99"	""	"     tm_native_thread = hythread_self();"
"100"	""	"     tm_native_thread->state &= ~TM_THREAD_STATE_RUNNABLE;"
"101"	"*"	"     tm_native_thread->state |= TM_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER;"

thread_native_interrupt.c:42
"38"	""	" void VMCALL hythread_interrupt(hythread_t thread) {"
"39"	""	"     IDATA status;"
"40"	""	"     hythread_t thr = NULL;"
"41"	""	"     hymutex_lock(&thread->mutex);"
"42"	"*"	"     thread->state |= TM_THREAD_STATE_INTERRUPTED;"



Stack traces:
1st Access
	Function struct M2nFrame * m2n_get_last_frame(void) "m2n_ia32.cpp":49
	Function class VM_Statistics & VM_Statistics::get_vm_stats(void) "vm_stats.cpp":338
	Function hythread_self "hythread.h":451
	Function class VM_thread * get_vm_thread(struct HyThread *) "vm_threads.h":191
	Function struct M2nFrame * m2n_get_last_frame(void) "m2n_ia32.cpp":49
	Function class VM_Statistics & VM_Statistics::get_vm_stats(void) "vm_stats.cpp":338
	Function hythread_thin_monitor_try_enter "thread_native_thin_monitor.c":345
	Function hythread_self "hythread.h":451
	Function class VM_thread * get_vm_thread(struct HyThread *) "vm_threads.h":191
	Function jthread_monitor_enter "thread_java_monitors.c":101

2nd Access
	Function struct VTable * ManagedObject::vt(void) "object_layout.h":117
	Function class VM_Statistics & VM_Statistics::get_vm_stats(void) "vm_stats.cpp":338
	Function struct VTable * ManagedObject::vt(void) "object_layout.h":117
	Function class VM_Statistics & VM_Statistics::get_vm_stats(void) "vm_stats.cpp":338
	Function hythread_thin_monitor_try_enter "thread_native_thin_monitor.c":345
	Function hythread_self "hythread.h":451
	Function class VM_thread * get_vm_thread(struct HyThread *) "vm_threads.h":191
	Function Java_java_lang_VMThreadManager_interrupt "java_lang_vmthreadmanager.cpp":63
	Function jthread_interrupt "thread_java_interrupt.c":39
	Function hythread_interrupt "thread_native_interrupt.c":42


Here is stack traces of second issue.

Write -> Read data-race	Memory read at "thread_native_interrupt.c":121 conflicts with a prior memory write at "thread_java_monitors.c":101

thread_java_monitors.c":101
"98"	"     #endif //LOCK_RESERVATION"
"99"	"     tm_native_thread = hythread_self();"
"100"	"     tm_native_thread->state &= ~TM_THREAD_STATE_RUNNABLE;"
"101"	"     tm_native_thread->state |= TM_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER;"

"thread_native_interrupt.c":121
120	" UDATA VMCALL hythread_interrupted(hythread_t thread) {"
121	"     int interrupted = thread->state & TM_THREAD_STATE_INTERRUPTED;"
122	"     return interrupted?TM_ERROR_INTERRUPT:TM_ERROR_NONE;"
123	" }"

Stack traces

1st Access
	Function struct M2nFrame * m2n_get_last_frame(void) "m2n_ia32.cpp":49
	Function class VM_Statistics & VM_Statistics::get_vm_stats(void) "vm_stats.cpp":338
	Function hythread_self "hythread.h":451
	Function class VM_thread * get_vm_thread(struct HyThread *) "vm_threads.h":191
	Function struct M2nFrame * m2n_get_last_frame(void) "m2n_ia32.cpp":49
	Function class VM_Statistics & VM_Statistics::get_vm_stats(void) "vm_stats.cpp":338
	Function hythread_thin_monitor_try_enter "thread_native_thin_monitor.c":345
	Function hythread_self "hythread.h":451
	Function class VM_thread * get_vm_thread(struct HyThread *) "vm_threads.h":191
	Function jthread_monitor_enter "thread_java_monitors.c":101

2nd Access
	Function hythread_thin_monitor_try_enter "thread_native_thin_monitor.c":345
	Function struct VTable * ManagedObject::vt(void) "object_layout.h":117
	Function class VM_Statistics & VM_Statistics::get_vm_stats(void) "vm_stats.cpp":338
	Function struct VTable * ManagedObject::vt(void) "object_layout.h":117
	Function class VM_Statistics & VM_Statistics::get_vm_stats(void) "vm_stats.cpp":338
	Function hythread_self "hythread.h":451
	Function class VM_thread * get_vm_thread(struct HyThread *) "vm_threads.h":191
	Function Java_java_lang_VMThreadManager_isInterrupted__Ljava_lang_Thread_2 "java_lang_vmthreadmanager.cpp":85
	Function jthread_is_interrupted "thread_java_interrupt.c":55
	Function hythread_interrupted "thread_native_interrupt.c":121




> [drlvm][netbeans] Thread.interrupt() throws InterruptException in wrong thread
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-3641
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3641
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, DRLVM
>            Reporter: Vasily Zakharov
>         Attachments: Test.java
>
>
> Consider the attached test. It implements a simple manual synchronization mechanism using Object.wait() and Thread.interrupt(), similar to the one used by org.apache.harmony.awt.wtk.Synchronizer (see HARMONY-3601).
> On DRL VM this mechanism works incorrectly - it seems like Thread.interrupt() causes InterruptException in wrong thread or in more than one thread at once. Here's the output:
> RI:
> SUCCESS
> Harmony/IBM VM:
> SUCCESS
> Harmony/DRL VM:
> ERROR at Thread[Thread-13,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-12,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-11,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-10,5,main]: Not owner can't unlock resource
> Thread[Thread-9,5,main] interrupted while working!
> Thread[Thread-8,5,main] interrupted while working!
> ERROR at Thread[Thread-8,5,main]: Not owner can't unlock resource
> Thread[Thread-7,5,main] interrupted while working!
> ERROR at Thread[Thread-7,5,main]: Not owner can't unlock resource
> Thread[Thread-6,5,main] interrupted while working!
> ERROR at Thread[Thread-6,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-5,5,main]: Not owner can't unlock resource
> FAIL
> This issue was filed as a result of investigating the HARMONY-3601 issue with NetBeans.
> Great thanks to Andrey Pavlenko for extracting this problem out of AWT.

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


[jira] Updated: (HARMONY-3641) [drlvm][thread][netbeans] Thread.interrupt() throws InterruptException in wrong thread

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

Peter Novodvorsky updated HARMONY-3641:
---------------------------------------

    Attachment: InterruptWait.java

test that conforms smoke test standards. Can be commmited to smoke tests.

> [drlvm][thread][netbeans] Thread.interrupt() throws InterruptException in wrong thread
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3641
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3641
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, DRLVM
>            Reporter: Vasily Zakharov
>            Assignee: weldon washburn
>         Attachments: InterruptWait.java, Test.java, thread_wait_interrupt-28.05.2007-1.patch
>
>
> Consider the attached test. It implements a simple manual synchronization mechanism using Object.wait() and Thread.interrupt(), similar to the one used by org.apache.harmony.awt.wtk.Synchronizer (see HARMONY-3601).
> On DRL VM this mechanism works incorrectly - it seems like Thread.interrupt() causes InterruptException in wrong thread or in more than one thread at once. Here's the output:
> RI:
> SUCCESS
> Harmony/IBM VM:
> SUCCESS
> Harmony/DRL VM:
> ERROR at Thread[Thread-13,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-12,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-11,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-10,5,main]: Not owner can't unlock resource
> Thread[Thread-9,5,main] interrupted while working!
> Thread[Thread-8,5,main] interrupted while working!
> ERROR at Thread[Thread-8,5,main]: Not owner can't unlock resource
> Thread[Thread-7,5,main] interrupted while working!
> ERROR at Thread[Thread-7,5,main]: Not owner can't unlock resource
> Thread[Thread-6,5,main] interrupted while working!
> ERROR at Thread[Thread-6,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-5,5,main]: Not owner can't unlock resource
> FAIL
> This issue was filed as a result of investigating the HARMONY-3601 issue with NetBeans.
> Great thanks to Andrey Pavlenko for extracting this problem out of AWT.

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


[jira] Updated: (HARMONY-3641) [drlvm][thread][netbeans] Thread.interrupt() throws InterruptException in wrong thread

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

Gregory Shimansky updated HARMONY-3641:
---------------------------------------

    Summary: [drlvm][thread][netbeans] Thread.interrupt() throws InterruptException in wrong thread  (was: [drlvm][netbeans] Thread.interrupt() throws InterruptException in wrong thread)

> [drlvm][thread][netbeans] Thread.interrupt() throws InterruptException in wrong thread
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3641
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3641
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, DRLVM
>            Reporter: Vasily Zakharov
>         Assigned To: weldon washburn
>         Attachments: Test.java
>
>
> Consider the attached test. It implements a simple manual synchronization mechanism using Object.wait() and Thread.interrupt(), similar to the one used by org.apache.harmony.awt.wtk.Synchronizer (see HARMONY-3601).
> On DRL VM this mechanism works incorrectly - it seems like Thread.interrupt() causes InterruptException in wrong thread or in more than one thread at once. Here's the output:
> RI:
> SUCCESS
> Harmony/IBM VM:
> SUCCESS
> Harmony/DRL VM:
> ERROR at Thread[Thread-13,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-12,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-11,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-10,5,main]: Not owner can't unlock resource
> Thread[Thread-9,5,main] interrupted while working!
> Thread[Thread-8,5,main] interrupted while working!
> ERROR at Thread[Thread-8,5,main]: Not owner can't unlock resource
> Thread[Thread-7,5,main] interrupted while working!
> ERROR at Thread[Thread-7,5,main]: Not owner can't unlock resource
> Thread[Thread-6,5,main] interrupted while working!
> ERROR at Thread[Thread-6,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-5,5,main]: Not owner can't unlock resource
> FAIL
> This issue was filed as a result of investigating the HARMONY-3601 issue with NetBeans.
> Great thanks to Andrey Pavlenko for extracting this problem out of AWT.

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


[jira] Updated: (HARMONY-3641) [drlvm][thread][netbeans] Thread.interrupt() throws InterruptException in wrong thread

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

Peter Novodvorsky updated HARMONY-3641:
---------------------------------------

    Attachment: thread_wait_interrupt-28.05.2007-1.patch

When thread waiting on monitor is interrupted, all threads that wait on the same monitor are waken up. This patches the problem and this bug.

> [drlvm][thread][netbeans] Thread.interrupt() throws InterruptException in wrong thread
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3641
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3641
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, DRLVM
>            Reporter: Vasily Zakharov
>            Assignee: weldon washburn
>         Attachments: Test.java, thread_wait_interrupt-28.05.2007-1.patch
>
>
> Consider the attached test. It implements a simple manual synchronization mechanism using Object.wait() and Thread.interrupt(), similar to the one used by org.apache.harmony.awt.wtk.Synchronizer (see HARMONY-3601).
> On DRL VM this mechanism works incorrectly - it seems like Thread.interrupt() causes InterruptException in wrong thread or in more than one thread at once. Here's the output:
> RI:
> SUCCESS
> Harmony/IBM VM:
> SUCCESS
> Harmony/DRL VM:
> ERROR at Thread[Thread-13,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-12,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-11,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-10,5,main]: Not owner can't unlock resource
> Thread[Thread-9,5,main] interrupted while working!
> Thread[Thread-8,5,main] interrupted while working!
> ERROR at Thread[Thread-8,5,main]: Not owner can't unlock resource
> Thread[Thread-7,5,main] interrupted while working!
> ERROR at Thread[Thread-7,5,main]: Not owner can't unlock resource
> Thread[Thread-6,5,main] interrupted while working!
> ERROR at Thread[Thread-6,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-5,5,main]: Not owner can't unlock resource
> FAIL
> This issue was filed as a result of investigating the HARMONY-3601 issue with NetBeans.
> Great thanks to Andrey Pavlenko for extracting this problem out of AWT.

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


[jira] Assigned: (HARMONY-3641) [drlvm][netbeans] Thread.interrupt() throws InterruptException in wrong thread

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

weldon washburn reassigned HARMONY-3641:
----------------------------------------

    Assignee: weldon washburn

> [drlvm][netbeans] Thread.interrupt() throws InterruptException in wrong thread
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-3641
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3641
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, DRLVM
>            Reporter: Vasily Zakharov
>         Assigned To: weldon washburn
>         Attachments: Test.java
>
>
> Consider the attached test. It implements a simple manual synchronization mechanism using Object.wait() and Thread.interrupt(), similar to the one used by org.apache.harmony.awt.wtk.Synchronizer (see HARMONY-3601).
> On DRL VM this mechanism works incorrectly - it seems like Thread.interrupt() causes InterruptException in wrong thread or in more than one thread at once. Here's the output:
> RI:
> SUCCESS
> Harmony/IBM VM:
> SUCCESS
> Harmony/DRL VM:
> ERROR at Thread[Thread-13,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-12,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-11,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-10,5,main]: Not owner can't unlock resource
> Thread[Thread-9,5,main] interrupted while working!
> Thread[Thread-8,5,main] interrupted while working!
> ERROR at Thread[Thread-8,5,main]: Not owner can't unlock resource
> Thread[Thread-7,5,main] interrupted while working!
> ERROR at Thread[Thread-7,5,main]: Not owner can't unlock resource
> Thread[Thread-6,5,main] interrupted while working!
> ERROR at Thread[Thread-6,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-5,5,main]: Not owner can't unlock resource
> FAIL
> This issue was filed as a result of investigating the HARMONY-3601 issue with NetBeans.
> Great thanks to Andrey Pavlenko for extracting this problem out of AWT.

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


[jira] Updated: (HARMONY-3641) [drlvm][netbeans] Thread.interrupt() throws InterruptException in wrong thread

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

Vasily Zakharov updated HARMONY-3641:
-------------------------------------

    Attachment: Test.java

> [drlvm][netbeans] Thread.interrupt() throws InterruptException in wrong thread
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-3641
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3641
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, DRLVM
>            Reporter: Vasily Zakharov
>         Attachments: Test.java
>
>
> Consider the attached test. It implements a simple manual synchronization mechanism using Object.wait() and Thread.interrupt(), similar to the one used by org.apache.harmony.awt.wtk.Synchronizer (see HARMONY-3601).
> On DRL VM this mechanism works incorrectly - it seems like Thread.interrupt() causes InterruptException in wrong thread or in more than one thread at once. Here's the output:
> RI:
> SUCCESS
> Harmony/IBM VM:
> SUCCESS
> Harmony/DRL VM:
> ERROR at Thread[Thread-13,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-12,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-11,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-10,5,main]: Not owner can't unlock resource
> Thread[Thread-9,5,main] interrupted while working!
> Thread[Thread-8,5,main] interrupted while working!
> ERROR at Thread[Thread-8,5,main]: Not owner can't unlock resource
> Thread[Thread-7,5,main] interrupted while working!
> ERROR at Thread[Thread-7,5,main]: Not owner can't unlock resource
> Thread[Thread-6,5,main] interrupted while working!
> ERROR at Thread[Thread-6,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-5,5,main]: Not owner can't unlock resource
> FAIL
> This issue was filed as a result of investigating the HARMONY-3601 issue with NetBeans.
> Great thanks to Andrey Pavlenko for extracting this problem out of AWT.

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


[jira] Closed: (HARMONY-3641) [drlvm][thread][netbeans] Thread.interrupt() throws InterruptException in wrong thread

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

weldon washburn closed HARMONY-3641.
------------------------------------

    Resolution: Fixed

build test2 runs on most platforms

> [drlvm][thread][netbeans] Thread.interrupt() throws InterruptException in wrong thread
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3641
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3641
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, DRLVM
>            Reporter: Vasily Zakharov
>            Assignee: weldon washburn
>         Attachments: InterruptWait.java, Test.java, thread_wait_interrupt-28.05.2007-1.patch
>
>
> Consider the attached test. It implements a simple manual synchronization mechanism using Object.wait() and Thread.interrupt(), similar to the one used by org.apache.harmony.awt.wtk.Synchronizer (see HARMONY-3601).
> On DRL VM this mechanism works incorrectly - it seems like Thread.interrupt() causes InterruptException in wrong thread or in more than one thread at once. Here's the output:
> RI:
> SUCCESS
> Harmony/IBM VM:
> SUCCESS
> Harmony/DRL VM:
> ERROR at Thread[Thread-13,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-12,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-11,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-10,5,main]: Not owner can't unlock resource
> Thread[Thread-9,5,main] interrupted while working!
> Thread[Thread-8,5,main] interrupted while working!
> ERROR at Thread[Thread-8,5,main]: Not owner can't unlock resource
> Thread[Thread-7,5,main] interrupted while working!
> ERROR at Thread[Thread-7,5,main]: Not owner can't unlock resource
> Thread[Thread-6,5,main] interrupted while working!
> ERROR at Thread[Thread-6,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-5,5,main]: Not owner can't unlock resource
> FAIL
> This issue was filed as a result of investigating the HARMONY-3601 issue with NetBeans.
> Great thanks to Andrey Pavlenko for extracting this problem out of AWT.

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


[jira] Commented: (HARMONY-3641) [drlvm][thread][netbeans] Thread.interrupt() throws InterruptException in wrong thread

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

Vasily Zakharov commented on HARMONY-3641:
------------------------------------------

Peter, thank you very much, I tried the patch, it seems fine.


> [drlvm][thread][netbeans] Thread.interrupt() throws InterruptException in wrong thread
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3641
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3641
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, DRLVM
>            Reporter: Vasily Zakharov
>            Assignee: weldon washburn
>         Attachments: Test.java, thread_wait_interrupt-28.05.2007-1.patch
>
>
> Consider the attached test. It implements a simple manual synchronization mechanism using Object.wait() and Thread.interrupt(), similar to the one used by org.apache.harmony.awt.wtk.Synchronizer (see HARMONY-3601).
> On DRL VM this mechanism works incorrectly - it seems like Thread.interrupt() causes InterruptException in wrong thread or in more than one thread at once. Here's the output:
> RI:
> SUCCESS
> Harmony/IBM VM:
> SUCCESS
> Harmony/DRL VM:
> ERROR at Thread[Thread-13,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-12,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-11,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-10,5,main]: Not owner can't unlock resource
> Thread[Thread-9,5,main] interrupted while working!
> Thread[Thread-8,5,main] interrupted while working!
> ERROR at Thread[Thread-8,5,main]: Not owner can't unlock resource
> Thread[Thread-7,5,main] interrupted while working!
> ERROR at Thread[Thread-7,5,main]: Not owner can't unlock resource
> Thread[Thread-6,5,main] interrupted while working!
> ERROR at Thread[Thread-6,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-5,5,main]: Not owner can't unlock resource
> FAIL
> This issue was filed as a result of investigating the HARMONY-3601 issue with NetBeans.
> Great thanks to Andrey Pavlenko for extracting this problem out of AWT.

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


[jira] Commented: (HARMONY-3641) [drlvm][thread][netbeans] Thread.interrupt() throws InterruptException in wrong thread

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

Pavel Rebriy commented on HARMONY-3641:
---------------------------------------

Better to put the test to regression test suite.

> [drlvm][thread][netbeans] Thread.interrupt() throws InterruptException in wrong thread
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3641
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3641
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, DRLVM
>            Reporter: Vasily Zakharov
>            Assignee: weldon washburn
>         Attachments: Test.java, thread_wait_interrupt-28.05.2007-1.patch
>
>
> Consider the attached test. It implements a simple manual synchronization mechanism using Object.wait() and Thread.interrupt(), similar to the one used by org.apache.harmony.awt.wtk.Synchronizer (see HARMONY-3601).
> On DRL VM this mechanism works incorrectly - it seems like Thread.interrupt() causes InterruptException in wrong thread or in more than one thread at once. Here's the output:
> RI:
> SUCCESS
> Harmony/IBM VM:
> SUCCESS
> Harmony/DRL VM:
> ERROR at Thread[Thread-13,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-12,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-11,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-10,5,main]: Not owner can't unlock resource
> Thread[Thread-9,5,main] interrupted while working!
> Thread[Thread-8,5,main] interrupted while working!
> ERROR at Thread[Thread-8,5,main]: Not owner can't unlock resource
> Thread[Thread-7,5,main] interrupted while working!
> ERROR at Thread[Thread-7,5,main]: Not owner can't unlock resource
> Thread[Thread-6,5,main] interrupted while working!
> ERROR at Thread[Thread-6,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-5,5,main]: Not owner can't unlock resource
> FAIL
> This issue was filed as a result of investigating the HARMONY-3601 issue with NetBeans.
> Great thanks to Andrey Pavlenko for extracting this problem out of AWT.

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


[jira] Commented: (HARMONY-3641) [drlvm][netbeans] Thread.interrupt() throws InterruptException in wrong thread

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

Vasily Zakharov commented on HARMONY-3641:
------------------------------------------

Ilya, thank you very much for the investigation! I hope this would help.


> [drlvm][netbeans] Thread.interrupt() throws InterruptException in wrong thread
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-3641
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3641
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, DRLVM
>            Reporter: Vasily Zakharov
>         Attachments: Test.java
>
>
> Consider the attached test. It implements a simple manual synchronization mechanism using Object.wait() and Thread.interrupt(), similar to the one used by org.apache.harmony.awt.wtk.Synchronizer (see HARMONY-3601).
> On DRL VM this mechanism works incorrectly - it seems like Thread.interrupt() causes InterruptException in wrong thread or in more than one thread at once. Here's the output:
> RI:
> SUCCESS
> Harmony/IBM VM:
> SUCCESS
> Harmony/DRL VM:
> ERROR at Thread[Thread-13,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-12,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-11,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-10,5,main]: Not owner can't unlock resource
> Thread[Thread-9,5,main] interrupted while working!
> Thread[Thread-8,5,main] interrupted while working!
> ERROR at Thread[Thread-8,5,main]: Not owner can't unlock resource
> Thread[Thread-7,5,main] interrupted while working!
> ERROR at Thread[Thread-7,5,main]: Not owner can't unlock resource
> Thread[Thread-6,5,main] interrupted while working!
> ERROR at Thread[Thread-6,5,main]: Not owner can't unlock resource
> ERROR at Thread[Thread-5,5,main]: Not owner can't unlock resource
> FAIL
> This issue was filed as a result of investigating the HARMONY-3601 issue with NetBeans.
> Great thanks to Andrey Pavlenko for extracting this problem out of AWT.

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