[kaffe] kaffe 1.1.7 segfault on alternate platforms cause

Beracah Yankama beracah at MIT.EDU
Tue Jan 23 13:38:13 PST 2007


Hi,
This is my first kaffe email (& I'm a kaffe newbie), so please bear with 
me...

I have been trying to install and run 1.1.7 on gentoo for Alpha without 
success.  After lots of fruitless searching lists for help on classpath 
and java/lang/StackOverflowError messages, I decide to bite the bullet 
myself and I rebuilt kaffe static , gcc 4.1.1, with debug on, and started 
it up in gdb (verbose debug dump below), and I believe that I have found 
the initial cause of the segfaults.

% KAFFE_DEBUG=gdb /usr/local/kaffe/bin/java /tmp/hello.java
(gdb) run
Program received signal SIGSEGV, Segmentation fault.
detectStackBoundaries (jtid=0x1202a0030, mainThreadStackSize=1048576) at 
signal.c:470
470                 kaffeNoopFunc(*guessPointer);

(gdb) print handler_segv
$1 = (void *) 0x0
(gdb) print guessPointer
$2 = 0x11fb20000 "cal/kaffe/jre/bin/kaffe-bin"
(gdb) print handler_bus
$3 = (void *) 0x0

Neither handler_segv nor handler_bus is being set.  Looking at the 
/kaffevm/systems/unix-pthreads/signal.c:

"
#if defined(SIGSEGV)
 	handler_segv = registerSyncSignalHandler(SIGSEGV, stackOverflowDetector);
#endif
#if defined(SIGBUS)
 	handler_bus = registerSyncSignalHandler(SIGBUS, stackOverflowDetector);
#endif
"

After some brief checks, it seems that SIGSEGV and SIGBUS definitions are 
definitely not being set.

At this point I am at a loss to proceed, because I do not know where it 
should be set, or if it is the result of a failed configure option, which 
is supposed to look up these headers.  I am no guru, but if someone 
could point me to where this is supposed to be set, I would really 
appreciate fixing it for the Alpha (and probably for mips & others from 
what I've read) platform.

Thanks,
Beracah

-----
% kaffe -vmdebug INIT,VMTHREAD,GCSYSALLOC /tmp/hello.java
pagealloc(5251072) => 0x120296000
5251072 unused bytes in heap addr range
gc_system_alloc: 5251072 byte at 0x120274470
initCollector()
initCollector() done
initNativeThreads(0x10000)
Detected stackSize 1048576
initNativeThreads(0x10000) done
utf8ConstInit()
utf8ConstInit() done
initClasspath()
initClasspath() done, got 
/usr/local/kaffe/jre/lib/glibj.zip:/usr/local/kaffe/lib/tools.jar
initNative()
got lpath /usr/local/kaffe/jre/lib/alpha:/usr/local/kaffe/lib and 
libraryPath /usr/local/kaffe/jre/lib/alpha:/usr/local/kaffe/lib
trying to load /usr/local/kaffe/jre/lib/alpha/libjavalang
initNative() done
create names and signatures
done
initBaseClasses()
initTypes()
initTypes() done
finishTypes()
finishTypes() done
initBaseClasses() done
Internal error: caught an unexpected exception.
Please check your CLASSPATH and your installation.
java/lang/StackOverflowError
This error may occur because the stack size is not sufficient.
Try to increase the stack size using 'ulimit -s' or with the '-ss'
option on kaffe.
Segmentation fault






More information about the kaffe mailing list