[Gc] Trying to fix test_stack on powerpc.

Lennart Sorensen lsorense at csclub.uwaterloo.ca
Wed May 22 15:26:37 PDT 2013


Does anyone have a hint as to where to look for the test_stack failure
on powerpc?

It seems to fail in one of two ways.

Either it fails when one thread fails to do a pop of the stack (it gets
a 0).

Or it fails when checking the stack at the end and the stack has a
circular list in it, due to the next pointers having gotten messed up.

For example for the circular list problem it can end up like this (note
I did add some extra debug printing to things):

Initial list (nthreads = 3):
6 0x1059b0e8 next=1059b0d8
5 0x1059b0d8 next=1059b0c8
4 0x1059b0c8 next=1059b028
3 0x1059b028 next=1059b018
2 0x1059b018 next=1059b008
1 0x1059b008 next=00000000
starting thread 1
starting thread 0
starting thread 2
finished thread 2: 360828 total ops
finished thread 0: 289581 total ops
finished thread 1: 349590 total ops
3 367
final list (should be reordered initial list):
(dump of original list locations)
0: 6 0x1059b0e8 next=1059b0e8
1: 5 0x1059b0d8 next=1059b0c8
2: 4 0x1059b0c8 next=1059b018
3: 3 0x1059b028 next=1059b028
4: 2 0x1059b018 next=00000000
5: 1 0x1059b008 next=1059b0e9
(print_list output)
6 0x1059b0e8 next=1059b0e8
6 0x1059b0e8 next=1059b0e8
6 0x1059b0e8 next=1059b0e8
6 0x1059b0e8 next=1059b0e8
6 0x1059b0e8 next=1059b0e8
6 0x1059b0e8 next=1059b0e8
6 0x1059b0e8 next=1059b0e8
6 0x1059b0e8 next=1059b0e8
6 0x1059b0e8 next=1059b0e8
6 0x1059b0e8 next=1059b0e8
6 0x1059b0e8 next=1059b0e8
6 0x1059b0e8 next=1059b0e8
6 0x1059b0e8 next=1059b0e8
... forever ...

So in this case the entry with 6 in it has become linked to itself,
and it would seem that so has the entry with 3 in it.  The rest of the
mostly for a linked list, although the next for 1 seems to be off by
one from the address of item 6.

So any suggestions on where to look?  I have tried gcc 4.4, 4.6, 4.7
and 4.8 with no change, and I even tried 64bit versuses 32bit with no
change either.  It doesn't seem to be a simple compiler bug the way the
alpha problem was.

The source version is the debian package from unstable, version
libatomic-ops-7.3~alpha3+git20121114

If there was anything in the git tree that looked promising to fix it,
I would do an update, but I don't see anything that looks promising.

In case it matters, I am running the test on an IBM p710, with a 6 core
power7 cpu.

-- 
Len Sorensen


More information about the Gc mailing list