[pypy-dev] hunting for reason of a failing test (rpython/memory/test/)
Gregor Wegberg
gregor.wegberg at gmail.com
Thu May 29 17:28:43 CEST 2014
Hi,
I'm working on an object pinning feature for incminimark right now.
There is always one failing test (depending on the platform)
in rpython/memory/test/test_incminimark_gc.py which I just can't solve.
I'd appreciate any form of help. Even if it is just a "I may imagine
that it is connected to X and Y" :-)
Basic resources:
- all my changes are in the following fork & branch:
https://bitbucket.org/groggi/pypy/branch/gc-incminimark-pinning
- my `gc-incminimark-pinning` branch is based on PyPy's `release-2.3.x`
branch
- pinning should work for "simple" objects, i.e. basically RPython
strings. GC cards are not supported. More tests are needed of course.
- I am "gregor_w" in #pypy, so feel free to ping me
The following test results I get on the three major platforms running
pytest on /rpython/memory/test:
- Windows (Visual Studio 2013 native tools):
http://paste.pound-python.org/show/LPw4eCHE1EsfFTykQkWA/
=> failing test: test_print_leak
- OS X (clang): http://paste.pound-python.org/show/l85sUl56UCMDVxu1vrSS/
=> failing test: test_tagged_id
- Ubuntu (gcc): http://paste.pound-python.org/show/oAYctWSzF3OpqLtlBlUX/
=> failing tests: test_tagged_id
I have no idea why on Windows I get an other test to fail and
test_tagged_id passes. However, maybe this gives you a hint.
I imagine that one of the following three reasons are responsible for
the failing tests:
1.) I did some address calculations wrong inside incminimark. However,
I'd expect to see way more failing tests in this case.
2.) My changes to get the GC transformation working with pin()/unpin()
or the translation for the same two functions is wrong, so there is some
error in
rpython/memory/gctransform/framework.py,
rpython/memory/gctransform/transform.py,
rpython/rtyper/llinterp.py or
rpython/rtyper/lltypesystem/lloperation.py.
On the other hand I can translate PyPy with a PyPy binary containing
my changes -- so this seems also somehow impossible?!
3.) It is some side effect as a result of the following changeset
(llarena and lltype modification):
https://bitbucket.org/groggi/pypy/commits/84898085a09814d1ec4f6b2b0d4202c7a985c0f9
I tried my best to check all three explanations and some more. However,
I just can't see what is going wrong.
What I observed (only on OS X right now):
- changing `taggedpointers` to False solves the problem, i.e. test passes
- splitting both `print` statements inside the `fn` function into six
prints with only one parameter (`print a, b, c` -> `print a\n print b\n
print c`) leads to an error while executing the `print x`
- splitting the `print` statements again as before *and* setting
`taggedpointers` to False leads to the same error as the original
version of the test without modifications.
After 13-15 work hours trying to solve the bug I'm just lost. I have the
feeling that it is something stupid and/or simple but my lack of PyPy
knowledge stops me from seeing it. Any help is very much appreciated.
Cheers and thank you in advance,
Gregor
More information about the pypy-dev
mailing list