[kaffe] threading/gc problem on linux/freebsd w/ jthreads

jrandom jrandom at i2p.net
Tue Nov 16 00:24:16 PST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I've been doing some hacking to get stack traces into the thread
dumps w/ Guilhem's help, but along the way I'm running into an
assertion failure:

assertion "!INTS_DISABLED()" failed: file "exception.c", line 314

With a little hacking, I've found thats consistently coming as an
NPE, fired by interrupt on the (kaffe-)gc thread.  GDB says

Program received signal SIGSEGV, Segmentation fault.
gcMarkObject (gcif=0x400d45e8, gc_info=0x0, objp=0xbfffd418) at
	gc-incremental.c:321
321       markObjectDontCheck(unit, info, GCMEM2IDX(info, unit));
(gdb) bt
#0  gcMarkObject (gcif=0x400d45e8, gc_info=0x0, objp=0xbfffd418) at
	gc-incremental.c:321
#1  0x400d216a in liveThreadWalker (tid=0x871d00c,
	private=0x400d45e8) at gc.h:175
#2  0x4007c58c in jthread_walkLiveThreads (func=0x400d2120
	<liveThreadWalker>, priv=0x400d45e8)
    at jthread.c:1108
#3  0x400d2264 in KaffeGC_walkRefs (collector=0x400d45e8) at
	gc-refs.c:200
#4  0x400ce64d in startGC (gcif=0x0) at gc-incremental.c:720
#5  0x400ce052 in gcMan (arg=0x400d45e8) at gc-incremental.c:580
#6  0x4004a901 in startSpecialThread (arg=0xbfffe970) at thread.c:295
#7  0x4007d302 in start_this_sucker_on_a_new_frame () at
	jthread.c:1523
#8  0x4007d575 in jthread_create (pri=28 '\034', func=0x82e3318,
	isDaemon=0, jlThread=0x0,
    threadStackSize=16384) at jthread.c:1597
#9  0x4004aa9a in createDaemon (func=0x0, nm=0x82f600c
	"`ù\t@\0303.\bä\236/\bàÀ\a@", arg=0x0,
    prio=0, stacksize=0, einfo=0xbfffe9c0) at thread.c:364
#10 0x400cfa4d in gcEnable (collector=0x400d45e8) at
	gc-incremental.c:1308
#11 0x4002c3fc in initialiseKaffe () at baseClasses.c:235
#12 0x400847dd in JNI_CreateJavaVM (vm=0x0, penv=0x0, args=0x0) at
	jni-base.c:221
#13 0x08049007 in main (argc=1, argv=0xbfffed24) at main.c:215
(gdb) print unit
$1 = (gc_unit *) 0xbfffd410
(gdb) print info
$2 = (gc_block *) 0x9d0a5d0

The gc_info=0x0 worried me, but looking at the source, that param
(and gcif) are ignored.

At first, I thought it was something in the new code I've been
adding, so I backported my mods to cvs -D 2004/09/09 (which is the
build date that my other systems have been running for the last, er,
2 months) With the backport, the assert is not triggered.  I also
ran vanilla cvs HEAD and was occationally able to see the same
assertion failure.

I know that its know there's something funky going on (the GCTest is
failing regression), but I'm pretty much lost as to what it is.
Hopefully this info can help out someone who knows whats going on
better - please let me know if there's any more data necessary.

Thanks,
=jr

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.1

iQA/AwUBQZm4iBpxS9rYd+OGEQIK9wCcDzG6Pe+j0zZnx+rCT1hExKTn2w4AoOHS
m8q7laK0Lc9jCTheLT/a0LK5
=F9pO
-----END PGP SIGNATURE-----




More information about the kaffe mailing list