Menu ▾ ▴

#2 "GCJ 4.0 bug workarround" causes crash in high concurreny

open
nobody
None
5
2008-11-19
2008-11-19
Oded Noam
No

When compiled with sun javac and run with HotSpot 1.5.0, when filesystem is accessed simultaneously by large number of processes (~50) an occasional JVM crash will occur on SIGSEGV.

When JVM is run with "-Xcheck:jni", the following error message shows:

FATAL ERROR in native method: Using JNIEnv in non-Java thread

Commenting out lines 213-214 in javafs.c (see attached patch) fixes this problem.

Discussion

  • Oded Noam

    Oded Noam - 2008-11-19

    Fixing patch

     
  • David Trott

    David Trott - 2009-07-31

    Do you think that that is a JVM bug?

    Is it also worth logging a bug against the JVM?

     
  • Nobody/Anonymous

    The bug may be in the JVM, but I can't say I fully understand where the crash is. The proposed fix undoes a previous change that, in some JVMs, avoids doing AttachCurrentThreadAsDaemon. I believe the fact that the thread was not joined causes the crash.

     

Log in to post a comment.