[kaffe] SIGSEGV running kaffe

Dalibor Topic robilad at kaffe.org
Fri Jan 2 13:45:03 PST 2004

Hi Mark,

Mark and Janice Juszczec wrote:
> Hi folks
> A little update on my tracking down the cause of the SIGSEGV when kaffe 
> tries to run a class on my mipsel-linux pda.
> I've temporarily ruled out using gdbserver.  I've only got 1 serial port 
> and its running a shell.  I've got to research how to start gdbserver 
> after boot with no command prompt.  Any suggestions?

Have you tried asking on the gdb mailing list?

> In the meantime, I ran:
> /bin # kaffe-bin -ss 1M -ms 1M -mx 2M -as 1M -cp /bin -vmdebug ALL 
> FirstClass
> and got the output below.
> Any suggestions about what I'm looking for?  A cursory glance at the 
> alloc/malloc information doesn't make the problem jump out at me.  I was 
> hoping it would be as simple as trying to malloc something at 
> 0xfffffffffffff or some other such screwy address.  Alas, fate has not 
> been so kind.

> You cannot debug the JIT in interpreter mode
> pagealloc(1048576) => 0x1001d000
> 1048576 unused bytes in heap addr range
> gc_system_alloc: 1048576 byte at 0x10014d48
> gc_primitive_free: Prepending (1048576,0x10014d48) beginning of freelist
> gc_primitive_alloc: 4096 bytes from freelist @ 0x10014d48
> gc_heap_malloc: small block 56 at 0x10014d48 free 0x1001d090
> gc_primitive_alloc: 16384 bytes from freelist @ 0x10014d70
> gc_heap_malloc: freelist 56 at 0x10014d48 free 0x1001d0c8
> gc_primitive_alloc: 4096 bytes from freelist @ 0x10014e10
> gc_heap_malloc: small block 328 at 0x10014e10 free 0x10022010
> allocating new thread, stack base 0x10022148-0x10022148
> resumeThread 0x10022018

Here's what I get on i686-linux with kaffe from CVS (intrp, jthreads)

You cannot debug the JIT in interpreter mode
pagealloc(1052672) => 0x8058000
1052672 unused bytes in heap addr range
gc_system_alloc: 1052672 byte at 0x80509f8

gc_primitive_free: freeing block 0x80509f8 (101000 bytes, 101)
gc_primitive_free: added 0x101000 bytes @ 0x80509f8 to freelist 20 @ 

gc_primitive_alloc: got to allocate 0x4000 bytes
gc_primitive_alloc: found best_fit 0x80509f8 diff 0xfd000 (0x101000 - 
gc_primitive_alloc: splitted remaining 0xfd000 bytes @ 0x8050a98
gc_primitive_alloc: 0x4000 bytes from freelist @ 0x80509f8
initCollector() done
and so on.

Could you retry with kaffe from current CVS? The lack of initCollector() 
for one in your output strikes me as very weird. That's one of the first 
things to happen when kaffe is initialised, see baseClasses.c for details.

dalibor topic

More information about the kaffe mailing list