On Friday Mar 31, 2000, Natarajan SK wrote:
> Hi, We are facing a JVM hang problem on Linux. We load the JVM
> from JNI and do an AttachThread to the main jEnv. Therefrom it
> goes executing into some classes and somewhere in the middle
> hangs. From the messages printed we find out that it seems to be
> trying to instantiate a class and then it tries to go into the
> constructor of the class but never comes out. The constructor has
> but a few assignment statements. There is no synchronisation or
> any waiting (thr_wait, sem_wait) of any kind. It is a simple
> program.
> The same thing works beautifully on Windows and Solaris but
> happens only in Linux.
Kevin Hendricks solved a very similar problem for me. This is
assuming that you are using native threads. Try linking in -lpthread
explicitly on your link line (and make sure you don't have an
explicit -lc before it).
This is because you may be picking up the non-thread safe versions
of libc routines.
I found that if I did a fork() when I created the VM, it would
hang. Removing the fork() made things work. Once I fixed the link
line, it all worked fine.
-John
----------------------------------------------------------------
John Rousseau [EMAIL PROTECTED]
SilverStream Software
1 Burlington Woods Phone: +1 781 238 5564
Burlington, MA 01803 Fax: +1 781 238 5499
----------------------------------------------------------------
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]