harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-3601) [classlib][awt][drlvm][netbeans] ToolkitImpl.createImage() throws RTE: Not owner can't unlock resource
Date Thu, 12 Apr 2007 19:12:15 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488478
] 

Vasily Zakharov commented on HARMONY-3601:
------------------------------------------

Thanks Andrey, the patch resolves the problem.

However, I receive somewhat 80 test failures and 500 errors on IBM VM with this patch applied.
It looks like the problem is the patch uses Concurrent package, that doesn't work with IBM
VM. I've started a discussion on this topic in the dev list: http://thread.gmane.org/gmane.comp.java.harmony.devel/25776

Also there's a suspicion that AWT code is in fact correct and the problem lies completely
in DRL VM, see HARMONY-3641.

Let's wait until the discussion comes to some conclusion and HARMONY-3641 is resolved, and
then decide how to deal with this issue.

Thank you!


> [classlib][awt][drlvm][netbeans] ToolkitImpl.createImage() throws RTE: Not owner can't
unlock resource
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3601
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3601
>             Project: Harmony
>          Issue Type: Bug
>          Components: App-Oriented Bug Reports, Classlib, DRLVM
>            Reporter: Vasily Zakharov
>         Attachments: HARMONY-3601-Synchronizer.patch, HARMONY-3601-SynchronizerTest.patch
>
>
> The following test calls java.awt.Toolkit.getDefaultToolkit().createImage() simultaneously
from multiple threads:
> public class Test {
>     static final int NUM_THREADS = 5;
>     static boolean success = true;
>     public static void main(String args[]) throws Exception {
>         Thread[] threads = new Thread[NUM_THREADS];
>         for (int i = 0; i < NUM_THREADS; i++) {
>             threads[i] = new Thread() {
>                 public void run() {
>                     try {
>                         java.awt.Toolkit.getDefaultToolkit().createImage(new java.net.URL("file://any/thing"));
>                     } catch (Exception e) {
>                         System.out.print("ERROR at " + Thread.currentThread() + ": ");
>                         e.printStackTrace();
>                         success = false;
>                     }
>                 }
>             };
>         }
>         for (int i = 0; i < NUM_THREADS; i++) {
>             threads[i].start();
>         }
>         for (int i = 0; i < NUM_THREADS; i++) {
>             while (true) {
>                 try {
>                     threads[i].join();
>                     break;
>                 } catch (InterruptedException e) {
>                     // Ignore.
>                 }
>             }
>         }
>         System.out.println(success ? "SUCCESS" : "FAIL");
>     }
> }
> Output on RI:
> SUCCESS
> Output on Harmony/IBM VM:
> SUCCESS:
> Output on Harmony/DRL VM (both Jit and Interpreter):
> ERROR at Thread[Thread-8,5,main]: java.lang.RuntimeException: Not owner can't unlock
resource
>         at org.apache.harmony.awt.wtk.Synchronizer.unlock(Synchronizer.java:120)
>         at java.awt.Toolkit.unlockAWT(Toolkit.java:399)
>         at java.awt.ToolkitImpl.createImage(ToolkitImpl.java:104)
>         at TestUnlock$1.run(TestUnlock.java:14)
> ERROR at Thread[Thread-7,5,main]: java.lang.RuntimeException: Not owner can't unlock
resource
>         at org.apache.harmony.awt.wtk.Synchronizer.unlock(Synchronizer.java:120)
>         at java.awt.Toolkit.unlockAWT(Toolkit.java:399)
>         at java.awt.ToolkitImpl.createImage(ToolkitImpl.java:104)
>         at TestUnlock$1.run(TestUnlock.java:14)
> ERROR at Thread[Thread-6,5,main]: java.lang.RuntimeException: Not owner can't unlock
resource
>         at org.apache.harmony.awt.wtk.Synchronizer.unlock(Synchronizer.java:120)
>         at java.awt.Toolkit.unlockAWT(Toolkit.java:399)
>         at java.awt.ToolkitImpl.createImage(ToolkitImpl.java:104)
>         at TestUnlock$1.run(TestUnlock.java:14)
> FAIL
> The problem only occurs on DRL VM, but I'm not sure whether this is a DRL VM or AWT issue,
and I have no idea how to fix it.
> The problem was discovered while trying to run Netbeans on Harmony.

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


Mime
View raw message