-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
10
-
b21
-
linux_ubuntu
Object#wait(long) is broken, when it is called from main thread with an enormous value , then thread is not hung instead return immediately.
Please run the below code in jshell
Object obj = new Object();
synchronized (obj){
try {
obj.wait(Long.MAX_VALUE);
System.out.println("TIMED WAIT IS BROKEN");
} catch (InterruptedException e) {
e.printStackTrace();
}
}
You will receive
TIMED WAIT IS BROKEN
(tested in linux ubuntu )
JCK tests fails in solaris as well.
Please run the below code in jshell
Object obj = new Object();
synchronized (obj){
try {
obj.wait(Long.MAX_VALUE);
System.out.println("TIMED WAIT IS BROKEN");
} catch (InterruptedException e) {
e.printStackTrace();
}
}
You will receive
TIMED WAIT IS BROKEN
(tested in linux ubuntu )
JCK tests fails in solaris as well.