harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Luht (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-1722) notify() in synchronized section makes wait(long) wait forever
Date Sun, 05 Nov 2006 20:49:18 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-1722?page=comments#action_12447321 ] 
            
Anton Luht commented on HARMONY-1722:
-------------------------------------

verified on 

svn = r471521, (Nov  5 2006), Windows/ia32/msvc 1310, debug build

> notify() in synchronized section makes wait(long) wait forever
> --------------------------------------------------------------
>
>                 Key: HARMONY-1722
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1722
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Windows XP IA32
>            Reporter: Anton Luht
>
> DRLVM svn = r453182, (Oct  5 2006), Windows/ia32/msvc 1310, debug build
> with jit and interpreter (-Xint)
> The following test:
> public class Test {
> 	public static void main(String args[]) throws Exception {
> 		new Thread() {
> 			public void run() {
> 				while (true) {
> 					System.err.println("entering cycle");
> 					synchronized (this) {
> 						try {
> 							System.err.println("before wait");
> 							wait(50);
> 							System.err.println("after wait");
> 							notify();
> 						} catch (InterruptedException e) {
> 							e.printStackTrace();
> 						}
> 					}
> 					System.err.println("after cycle");
> 				}
> 			}
> 		}.start();
> 	}
> }
> Prints in RI:
> entering cycle
> before wait
> after wait
> after cycle
> entering cycle
> before wait
> after wait
> after cycle
> endlessly
> in DRL:
> entering cycle
> before wait
> after wait
> after cycle
> entering cycle
> before wait
> <test hangs>
> If we remove notify() from loop, the loop will become infinite

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