[kaffe] Unexpected java.lang.IllegalMonitorStateException

Ito Kazumitsu kaz@maczuka.gcd.org
Fri Apr 2 17:15:03 2004


>>>>> ":" == jserv  <jserv@linux2.cc.ntu.edu.tw> writes:

:> On Mon, Mar 29, 2004 at 03:22:27PM +0900, Ito Kazumitsu wrote:
>> bash$ java TestSync3 1
>> bash$ java TestSync3 2
>> java.lang.IllegalMonitorStateException
>> at TestSync3.run (TestSync3.java:32)
>> bash$ java TestSync3 3
>> java.lang.IllegalMonitorStateException
>> at TestSync3.run (TestSync3.java:37)

:> It's strange that I could pass all tests provided by Ito Kazumitsu,
:> include TestSync3.

Aren't you using unix-pthreads?  I am afraid this problem has something
to do with unix-jthreads.

:> But I still can't get prevayler run well.

With the following patch to prevayler2.01.000alpha,

--- src/org/prevayler/foundation/DurableOutputStream.java	Wed Mar  3 19:04:38 2004
+++ test/org/prevayler/foundation/DurableOutputStream.java	Sat Apr  3 10:00:30 2004
@@ -104,7 +104,7 @@
 
 		synchronized void setSynched() {
 			_isSynched = true;
-			synchronized (this) { notifyAll(); }
+			notifyAll();
 		}
 	}
 

the simplest demo of prevayler works fine.

This makes me think that there is something wrong around
kaffe/kaffevm/locks.c.