This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Something broke?


>>>>> "Matt" == Matt Welsh <mdw@cs.berkeley.edu> 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).

Thanks.

Tom

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]