This is the mail archive of the
mailing list for the Java project.
Re: Something broke?
- To: Matt Welsh <email@example.com>
- Subject: Re: Something broke?
- From: Tom Tromey <firstname.lastname@example.org>
- Date: Thu, 2 Sep 1999 12:29:45 -0700
- Cc: email@example.com
- References: <199909021748.KAA24423@bhikku.CS.Berkeley.EDU>
>>>>> "Matt" == Matt Welsh <firstname.lastname@example.org> writes:
Matt> Compiling against the latest libgcj (updated this morning), I am
Matt> now getting a crash in the initial INIT_SEGV code in
Matt> JvRunMain(). The stack trace is below. Has anyone else tested
Matt> the latest version?
I haven't seen this.
Matt> #11 0x400fdfda in java::lang::Object::notifyAll (this=0x401423e0)
Matt> at /home/cs/mdw/ninja-disk/libgcj/libjava/java/lang/natObject.cc:185
Matt> #12 0x400fc0f8 in _Jv_PrepareCompiledClass (klass=0x401423e0)
Matt> at /home/cs/mdw/ninja-disk/libgcj/libjava/java/lang/natClassLoader.cc:256
Yesterday's never-ending pthread change circus made it so that the
POSIX thread implementation now checks for the situation where
notifyAll is called and the mutex is not held. In this situation an
IllegalMonitorStateException is thrown.
However, it appears that this code has a bug. In the above situation,
notifyAll() is throwing the exception. However,
_Jv_PrepareCompiledClass is always called with the class mutex held
(which I discovered by reading lots of code -- there has to be a
better way to structure this).
I can't reproduce this here. Can you find the problem? Just put a
breakpoint on notifyAll and examine the mutex (and read
_Jv_PthreadCheckMonitor, in posix-threads.h, to see what libgcj thinks
should be happening).