Noa Resare wrote:
ons 2004-10-20 klockan 18:47 +0200 skrev Guilhem Lavaux:

Hi Noa,

I've just commited it. Please test it extensively. I would like also a thread hog test to see if there are memory leaks with the new scheme.

Cheers,

Guilhem.


After half an hour of testing here it looks much better than before.
I'll run it overnight and see how it works.

On the other hand it seems like the pthread_cond_destroy() problem that
we had before have resurfaced. When I'm not LD_PRELOADing a noop
pthread_cond_destroy() I get hangs every two minutes or so. I'll look a
this some now, and probably some more tomorrow.

Hi Noa, salut Guilhem,

you could try running kaffe under valgrind. export KAFFE_DEBUG=valgrind and running mauve compiled with jikes with the latest CVS gave me these issues last evening using valgrind's default memcheck tool:

CLASSPATH=$CLASSPATH:`/bin/pwd` JAVAC="jikes -bootclasspath /home/topic/Projects/current/jre/lib/rt.jar" JAVA="/home/topic/Projects/current/bin/kaffe" /home/topic/Projects/current/bin/kaffe gnu.testlet.SimpleTestHarness
==12293== Memcheck, a memory error detector for x86-linux.
==12293== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==12293== Using valgrind-2.2.0, a program supervision framework for x86-linux.
==12293== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==12293== For more details, rerun with: -v
==12293==
==12293== warning: Valgrind's pthread_attr_setschedparam does nothing
==12293== (scheduling not changeable)
==12293== your program may misbehave as a result
==12293== warning: Valgrind's pthread_attr_setschedparam does nothing
==12293== (scheduling not changeable)
==12293== your program may misbehave as a result
==12293== Thread 2:
==12293== Conditional jump or move depends on uninitialised value(s)
==12293== at 0x1B97E709: jthread_on_current_stack (thread-impl.c:1446)
==12293== by 0x1B940B75: locks_internal_waitCond (locks.c:318)
==12293== by 0x1B9C986A: finaliserMan (gc-incremental.c:876)
==12293== by 0x1B948ED8: startSpecialThread (thread.c:308)
==12293==
==12293== Thread 2:
==12293== Conditional jump or move depends on uninitialised value(s)
==12293== at 0x1B940726: putHeavyLock (locks.c:154)
==12293== by 0x1B940CC7: locks_internal_waitCond (locks.c:319)
==12293== by 0x1B9C986A: finaliserMan (gc-incremental.c:876)
==12293== by 0x1B948ED8: startSpecialThread (thread.c:308)
==12293==
==12293== Thread 2:
==12293== Conditional jump or move depends on uninitialised value(s)
==12293== at 0x1B97E709: jthread_on_current_stack (thread-impl.c:1446)
==12293== by 0x1B9408F3: slowUnlockMutex (locks.c:223)
==12293== by 0x1B9CB263: gc_heap_malloc (gc-mem.c:440)
==12293== by 0x1B9C9E1A: gcMalloc (gc-incremental.c:1044)
==12293==
==12293== Thread 2:
==12293== Conditional jump or move depends on uninitialised value(s)
==12293== at 0x1B97E711: jthread_on_current_stack (thread-impl.c:1446)
==12293== by 0x1B9408F3: slowUnlockMutex (locks.c:223)
==12293== by 0x1B9CB263: gc_heap_malloc (gc-mem.c:440)
==12293== by 0x1B9C9E1A: gcMalloc (gc-incremental.c:1044)
==12293==
==12293== Conditional jump or move depends on uninitialised value(s)
==12293== at 0x1B97E709: jthread_on_current_stack (thread-impl.c:1446)
==12293== by 0x1B94080D: slowLockMutex (locks.c:182)
==12293== by 0x1B9C9E05: gcMalloc (thread-internal.h:116)
==12293== by 0x1B949D1C: utf8ConstNew (utf8const.c:193)
==12293==
==12293== Conditional jump or move depends on uninitialised value(s)
==12293== at 0x1B940816: slowLockMutex (locks.c:189)
==12293== by 0x1B9C9E05: gcMalloc (thread-internal.h:116)
==12293== by 0x1B949D1C: utf8ConstNew (utf8const.c:193)
==12293== by 0x1B97ED70: Kaffe_FindClass (errors.h:124)
==12293==
==12293== Thread 3:
==12293== Conditional jump or move depends on uninitialised value(s)
==12293== at 0x1B97E709: jthread_on_current_stack (thread-impl.c:1446)
==12293== by 0x1B940B75: locks_internal_waitCond (locks.c:318)
==12293== by 0x1B9C8E6A: gcMan (gc-incremental.c:512)
==12293== by 0x1B948ED8: startSpecialThread (thread.c:308)
==12293==
==12293== Thread 3:
==12293== Conditional jump or move depends on uninitialised value(s)
==12293== at 0x1B97E711: jthread_on_current_stack (thread-impl.c:1446)
==12293== by 0x1B940B75: locks_internal_waitCond (locks.c:318)
==12293== by 0x1B9C8E6A: gcMan (gc-incremental.c:512)
==12293== by 0x1B948ED8: startSpecialThread (thread.c:308)
==12293==
==12293== Thread 3:
==12293== Conditional jump or move depends on uninitialised value(s)
==12293== at 0x1B940726: putHeavyLock (locks.c:154)
==12293== by 0x1B940CC7: locks_internal_waitCond (locks.c:319)
==12293== by 0x1B9C8E6A: gcMan (gc-incremental.c:512)
==12293== by 0x1B948ED8: startSpecialThread (thread.c:308)
==12293==
==12293== Thread 3:
==12293== Conditional jump or move depends on uninitialised value(s)
==12293== at 0x1B97E709: jthread_on_current_stack (thread-impl.c:1446)
==12293== by 0x1B94080D: slowLockMutex (locks.c:182)
==12293== by 0x1B9C9E05: gcMalloc (thread-internal.h:116)
==12293== by 0x1B93B6C5: jmalloc (gc.c:22)
==12293==
==12293== Thread 3:
==12293== Conditional jump or move depends on uninitialised value(s)
==12293== at 0x1B940816: slowLockMutex (locks.c:189)
==12293== by 0x1B9C9E05: gcMalloc (thread-internal.h:116)
==12293== by 0x1B93B6C5: jmalloc (gc.c:22)
==12293== by 0x1B947AAD: execute_java_constructor_v (errors.h:124)
--12293-- INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) - exiting
--12293-- si_code=1 Fault EIP: 0xB0035465; Faulting address: 0x1C2EDC2B


valgrind: the `impossible' happened:
   Killed by fatal signal [1]

You can pass options to valgrind using the environment variable VALGRIND_OPTS. Running vagrind with VALGRIND_OPTS="--tool=helgrind" for the data race checker gives me these failures before vagrind blows up:

==32743== warning: Valgrind's pthread_attr_setschedparam does nothing
==32743== (scheduling not changeable)
==32743== your program may misbehave as a result
==32743== Possible data race writing variable at 0x8052B6C
==32743== at 0x1D4EA8CB: linkNativeAndJavaThread (thread.c:94)
==32743== by 0x1D4EB067: createDaemon (thread.c:376)
==32743== by 0x1D56C694: gcEnable (gc-incremental.c:1304)
==32743== by 0x1D4CD48B: initialiseKaffe (baseClasses.c:235)
==32743== Address 0x8052B6C is not stack'd, malloc'd or (recently) free'd
==32743== Previous state: exclusively owned by thread 2
==32743== warning: Valgrind's pthread_attr_setschedparam does nothing
==32743== (scheduling not changeable)
==32743== your program may misbehave as a result
==32743==
==32743== Thread 2:
==32743== Possible data race writing variable at 0x1D57158C (gc_lock)
==32743== at 0x1D4E2EDC: locks_internal_lockMutex (locks.c:432)
==32743== by 0x1D56BE05: gcMalloc (thread-internal.h:116)
==32743== by 0x1D4DD6C5: jmalloc (gc.c:22)
==32743== by 0x1D4E9AAD: execute_java_constructor_v (errors.h:124)
==32743== Address 0x1D57158C is in BSS section of /home/topic/Projects/current/jre/lib/i386/libkaffegc-1.1.x-cvs.so
==32743== Previous state: shared RO, no locks
==32743==
==32743== Thread 2:
==32743== Possible data race writing variable at 0x1D571A14 (gc_heap_lock)
==32743== at 0x1D4E2EDC: locks_internal_lockMutex (locks.c:432)
==32743== by 0x1D56D0DC: gc_heap_malloc (thread-internal.h:116)
==32743== by 0x1D56BE1A: gcMalloc (gc-incremental.c:1044)
==32743== by 0x1D4DD6C5: jmalloc (gc.c:22)
==32743== Address 0x1D571A14 is in BSS section of /home/topic/Projects/current/jre/lib/i386/libkaffegc-1.1.x-cvs.so
==32743== Previous state: shared RO, no locks
==32743==
==32743== Possible data race writing variable at 0x8052C5C
==32743== at 0x1D4EA8CB: linkNativeAndJavaThread (thread.c:94)
==32743== by 0x1D4EB067: createDaemon (thread.c:376)
==32743== by 0x1D56C6CC: gcEnable (gc-incremental.c:1307)
==32743== by 0x1D4CD48B: initialiseKaffe (baseClasses.c:235)
==32743== Address 0x8052C5C is not stack'd, malloc'd or (recently) free'd
==32743== Previous state: exclusively owned by thread 3
==32743==
==32743== Thread 3:
==32743== Possible data race writing variable at 0x1DF91CA8
==32743== at 0x1D4E281E: slowLockMutex (locks.c:198)
==32743== by 0x1D56BE05: gcMalloc (thread-internal.h:116)
==32743== by 0x1D4DD6C5: jmalloc (gc.c:22)
==32743== by 0x1D4E9AAD: execute_java_constructor_v (errors.h:124)
==32743== Address 0x1DF91CA8 is not stack'd, malloc'd or (recently) free'd
==32743== Previous state: shared RO, no locks
==32743==
==32743== Thread 3:
==32743== Possible data race writing variable at 0x1DF91CAC
==32743== at 0x1D4E281E: slowLockMutex (locks.c:198)
==32743== by 0x1D56BE05: gcMalloc (thread-internal.h:116)
==32743== by 0x1D4DD6C5: jmalloc (gc.c:22)
==32743== by 0x1D4E9AAD: execute_java_constructor_v (errors.h:124)
==32743== Address 0x1DF91CAC is not stack'd, malloc'd or (recently) free'd
==32743== Previous state: shared RO, no locks
--32743-- INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) - exiting
--32743-- si_code=1 Fault EIP: 0xB0035465; Faulting address: 0x1DE8FC2B


Using the addrcheck tool simply blows up valgrind without failures ;)

Do these warnings look useful?

cheers,
dalibor topic

[1] Yeah, Kaffe destroys valgrind after a while. It does the same to some kernels, gcc, gdb .. it's simply a good test for any platform's (toolchain's) stability ;)

_______________________________________________
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to