[Gc] powerpc64 problems

Christian Thalinger twisti at complang.tuwien.ac.at
Tue Nov 22 13:15:17 PST 2005


On Tue, 2005-11-22 at 12:39 -0800, Boehm, Hans wrote:
> It looks like we're either seeing a deadlock, or another thread is hung.
> Could you check whether in this mode, it is consuming significant
> amounts of CPU time?

It's using 0% of cpu time.

> 
> Could you also post stack backtraces for all the threads?  It would be
> good to know who is holding the allocation lock, and what that thread is
> doing.  The stack trace you posted only indicates that some thread is
> waiting for the allocation lock.

Hmm, strange enough but there is only one thread:

(gdb) info threads
* 1 Thread 549757910752 (LWP 7065)  0x0000008000043cc0
in .__nanosleep_nocancel
    () from /lib/tls/libpthread.so.0
(gdb) 

> 
> It may be that the GC_test_and_set implementation is broken on
> PowerPC64.  You might try building with USE_PTHREAD_LOCKS, and see if
> that works.  (This may be better with NPTL threads anyway.)

Interesting you're mentioning this function as this one crashes when
linked statically into CACAO (i should have mentioned this in my first
mail):

Program received signal SIGBUS, Bus error.
[Switching to Thread 549758075648 (LWP 18022)]
0x00000000100322f8 in GC_test_and_set (addr=0x1006b314) at
gc_locks.h:163
163               __asm__ __volatile__(
(gdb) bt
#0  0x00000000100322f8 in GC_test_and_set (addr=0x1006b314) at
gc_locks.h:163
#1  0x0000000010033460 in GC_expand_hp (bytes=102400) at alloc.c:996
#2  0x0000000010005ddc in gc_init (heapmaxsize=2097152,
heapstartsize=102400) at boehm.c:110
#3  0x00000000100035d4 in main (argc=6, argv=0x1ffffa5b448) at
cacaoh.c:273
(gdb) disas
Dump of assembler code for function GC_test_and_set:
0x00000000100322d8 <GC_test_and_set+0>: std     r31,-8(r1)
0x00000000100322dc <GC_test_and_set+4>: stdu    r1,-80(r1)
0x00000000100322e0 <GC_test_and_set+8>: mr      r31,r1
0x00000000100322e4 <GC_test_and_set+12>:        std     r3,128(r31)
0x00000000100322e8 <GC_test_and_set+16>:        li      r0,1
0x00000000100322ec <GC_test_and_set+20>:        std     r0,56(r31)
0x00000000100322f0 <GC_test_and_set+24>:        ld      r0,56(r31)
0x00000000100322f4 <GC_test_and_set+28>:        ld      r9,128(r31)
0x00000000100322f8 <GC_test_and_set+32>:        ldarx   r11,0,r9

When defining USE_PTHREAD_LOCKS the gctest works.  Why do you think this
will be better with NPTL threads?

TWISTI



More information about the Gc mailing list