GCJ application runs not too bad with shared libs, but crasheswith static libs - seems to be in _Jv_MonitorEnter

Jeff Sturm jsturm@one-point.com
Fri Nov 22 12:25:00 GMT 2002


On Fri, 22 Nov 2002, Scott Gilbertson wrote:
> I commented out the sysconf call in is_mp (so is_mp always returns false),
> and the thing seems pretty solid now (i.e., I've hammered at it for about
> 10-15 minutes without a crash).  I also made a little C program that prints
> the results of the same sysconf call, to see if there's something screwy
> with my setup, but the little program runs just fine.

It's possible the sysconf call is buggy with threads.  I'd guess your
little C program isn't multithreaded.

Since sysconf reads /proc, it'll be sensitive to kernel version too.
Interestingly, GC_get_nprocs avoids it:

#ifdef GC_LINUX_THREADS
/* Return the number of processors, or i<= 0 if it can't be determined. */
int GC_get_nprocs()
{
    /* Should be "return sysconf(_SC_NPROCESSORS_ONLN);" but that   */
    /* appears to be buggy in many cases.               */
    /* We look for lines "cpu<n>" in /proc/stat.            */
...

Jeff



More information about the Java mailing list