#13864: Configure Python with pydebug when SAGE_DEBUG is set
----------------------------------------------------------+-----------------
Reporter: jpflori | Owner:
jason
Type: task | Status:
needs_work
Priority: major | Milestone:
sage-pending
Component: misc | Resolution:
Keywords: python spkg | Work issues:
make sure Sage builds and starts
Report Upstream: N/A | Reviewers:
Volker Braun
Authors: Jean-Pierre Flori | Merged in:
Dependencies: #13865, #13867, #13868, #13876, #13832 | Stopgaps:
----------------------------------------------------------+-----------------
Comment (by SimonKing):
Replying to [comment:76 nbruin]:
> These tests succeeded for me with ZODB3-3.10.5. I don't know if these
particular tests failed for me prior to upgrading ZODB, but I had lots of
other tests fail.
Another Heisenbug?
Anyway. Here is a different test:
{{{
sage -t -gdb -force_lib "devel/sage/sage/tests/benchmark.py"
...
(gdb) r
Starting program: /home/simon/SAGE/debug/sage-5.6.beta1/local/bin/python
/home/simon/.sage//tmp/benchmark_3070.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
python: Modules/gcmodule.c:326: visit_decref: Assertion `gc->gc.gc_refs !=
0' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff6d95d95 in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6d95d95 in raise () from /lib64/libc.so.6
#1 0x00007ffff6d972ab in abort () from /lib64/libc.so.6
#2 0x00007ffff6d8e8fe in __assert_fail_base () from /lib64/libc.so.6
#3 0x00007ffff6d8e9a2 in __assert_fail () from /lib64/libc.so.6
#4 0x00007ffff7b129c9 in visit_decref (op=0x3a78ed0, data=0x0) at
Modules/gcmodule.c:326
#5 0x00007ffff7a1cbce in dict_traverse (op=0x30a04f0,
visit=0x7ffff7b1290e <visit_decref>, arg=0x0) at Objects/dictobject.c:2088
#6 0x00007ffff7b12a3e in subtract_refs (containers=0x7ffff7dc14e0
<generations>) at Modules/gcmodule.c:345
#7 0x00007ffff7b13a73 in collect (generation=0) at Modules/gcmodule.c:874
#8 0x00007ffff7b13d96 in collect_generations () at Modules/gcmodule.c:996
#9 0x00007ffff7b14a4a in _PyObject_GC_Malloc (basicsize=56) at
Modules/gcmodule.c:1457
#10 0x00007ffff7b14a82 in _PyObject_GC_New (tp=0x7ffff7d9a3c0
<PyList_Type>) at Modules/gcmodule.c:1467
#11 0x00007ffff7a02405 in PyList_New (size=242) at
Objects/listobject.c:142
#12 0x00007ffff23b8395 in Pdata_popList (self=0x3a12f90, start=280) at
/home/simon/SAGE/debug/sage-5.6.beta1/spkg/build/python-2.7.3.p5/src/Modules/cPickle.c:306
#13 0x00007ffff23c60ee in do_append (self=0x7fffbfaf26b8, x=280) at
/home/simon/SAGE/debug/sage-5.6.beta1/spkg/build/python-2.7.3.p5/src/Modules/cPickle.c:4401
#14 0x00007ffff23c6603 in load_appends (self=0x7fffbfaf26b8) at
/home/simon/SAGE/debug/sage-5.6.beta1/spkg/build/python-2.7.3.p5/src/Modules/cPickle.c:4450
#15 0x00007ffff23c7875 in load (self=0x7fffbfaf26b8) at
/home/simon/SAGE/debug/sage-5.6.beta1/spkg/build/python-2.7.3.p5/src/Modules/cPickle.c:4835
#16 0x00007ffff23c8bf9 in Unpickler_load (self=0x7fffbfaf26b8, unused=0x0)
at
/home/simon/SAGE/debug/sage-5.6.beta1/spkg/build/python-2.7.3.p5/src/Modules/cPickle.c:5393
#17 0x00007ffff7ac675c in call_function (pp_stack=0x7fffffff6cd0, oparg=0)
at Python/ceval.c:4005
#18 0x00007ffff7ac16ba in PyEval_EvalFrameEx (f=0x362a940, throwflag=0) at
Python/ceval.c:2666
#19 0x00007ffff7ac708a in fast_function (func=0x3a224f8,
pp_stack=0x7fffffff7050, n=2, na=2, nk=0) at Python/ceval.c:4107
#20 0x00007ffff7ac6d76 in call_function (pp_stack=0x7fffffff7050, oparg=1)
at Python/ceval.c:4042
#21 0x00007ffff7ac16ba in PyEval_EvalFrameEx (f=0x362a730, throwflag=0) at
Python/ceval.c:2666
#22 0x00007ffff7ac708a in fast_function (func=0x3a225a0,
pp_stack=0x7fffffff73d0, n=3, na=3, nk=0) at Python/ceval.c:4107
#23 0x00007ffff7ac6d76 in call_function (pp_stack=0x7fffffff73d0, oparg=2)
at Python/ceval.c:4042
#24 0x00007ffff7ac16ba in PyEval_EvalFrameEx (f=0x362a500, throwflag=0) at
Python/ceval.c:2666
#25 0x00007ffff7ac708a in fast_function (func=0x3a256f0,
pp_stack=0x7fffffff7750, n=2, na=2, nk=0) at Python/ceval.c:4107
...
#52 0x00007ffff79fd3fb in function_call (func=0x7fffde9a53a8,
arg=0x7fffbfa4db60, kw=0x36dbe00) at Objects/funcobject.c:526
#53 0x00007ffff79be33e in PyObject_Call (func=0x7fffde9a53a8,
arg=0x7fffbfa4db60, kw=0x36dbe00) at Objects/abstract.c:2529
#54 0x00007ffff79da311 in instancemethod_call (func=0x7fffde9a53a8,
arg=0x7fffbfa4db60, kw=0x36dbe00) at Objects/classobject.c:2578
#55 0x00007ffff79be33e in PyObject_Call (func=0x7fffbfd5a760,
arg=0x7fffc2b4ad08, kw=0x36dbe00) at Objects/abstract.c:2529
#56 0x00007fffe21bd081 in
__pyx_pf_4sage_9structure_7factory_13UniqueFactory_4__call__
(__pyx_v_self=0x7fffde99f418, __pyx_v_args=0x7fffc2b4ad08,
__pyx_v_kwds=0x36dbe00)
at sage/structure/factory.c:1028
#57 0x00007fffe21bcda7 in
__pyx_pw_4sage_9structure_7factory_13UniqueFactory_5__call__
(__pyx_v_self=0x7fffde99f418, __pyx_args=0x7fffc2b4ad08, __pyx_kwds=0x0)
at sage/structure/factory.c:979
#58 0x00007ffff79be33e in PyObject_Call (func=0x7fffde99f418,
arg=0x7fffc2b4ad08, kw=0x0) at Objects/abstract.c:2529
#59 0x00007ffff7ac7a58 in do_call (func=0x7fffde99f418,
pp_stack=0x7fffffff95a0, na=2, nk=0) at Python/ceval.c:4239
#60 0x00007ffff7ac6d92 in call_function (pp_stack=0x7fffffff95a0, oparg=2)
at Python/ceval.c:4044
#61 0x00007ffff7ac16ba in PyEval_EvalFrameEx (f=0x38ca1b0, throwflag=0) at
Python/ceval.c:2666
#62 0x00007ffff7ac40aa in PyEval_EvalCodeEx (co=0x7fffc02441a0,
globals=0x34bc850, locals=0x34bc850, args=0x0, argcount=0, kws=0x0,
kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#63 0x00007ffff7ab9a88 in PyEval_EvalCode (co=0x7fffc02441a0,
globals=0x34bc850, locals=0x34bc850) at Python/ceval.c:667
#64 0x00007ffff7ac9693 in exec_statement (f=0x36c0720,
prog=0x7fffc02441a0, globals=0x34bc850, locals=0x34bc850) at
Python/ceval.c:4718
#65 0x00007ffff7abde26 in PyEval_EvalFrameEx (f=0x36c0720, throwflag=0) at
Python/ceval.c:1880
#66 0x00007ffff7ac40aa in PyEval_EvalCodeEx (co=0x7fffc2bf9d50,
globals=0x7140d0, locals=0x0, args=0x7fffbfd46238, argcount=5, kws=0x0,
kwcount=0, defs=0x0, defcount=0, closure=0x0)
at Python/ceval.c:3253
#67 0x00007ffff79fd3fb in function_call (func=0x7fffc2c12840,
arg=0x7fffbfd46210, kw=0x0) at Objects/funcobject.c:526
#68 0x00007ffff79be33e in PyObject_Call (func=0x7fffc2c12840,
arg=0x7fffbfd46210, kw=0x0) at Objects/abstract.c:2529
#69 0x00007ffff79da311 in instancemethod_call (func=0x7fffc2c12840,
arg=0x7fffbfd46210, kw=0x0) at Objects/classobject.c:2578
#70 0x00007ffff79be33e in PyObject_Call (func=0x7fffbfaf6060,
arg=0x7fffbfd46210, kw=0x0) at Objects/abstract.c:2529
#71 0x00007ffff7ac7a58 in do_call (func=0x7fffbfaf6060,
pp_stack=0x7fffffffa270, na=5, nk=0) at Python/ceval.c:4239
#72 0x00007ffff7ac6d92 in call_function (pp_stack=0x7fffffffa270, oparg=5)
at Python/ceval.c:4044
#73 0x00007ffff7ac16ba in PyEval_EvalFrameEx (f=0x323cc40, throwflag=0) at
Python/ceval.c:2666
#74 0x00007ffff7ac40aa in PyEval_EvalCodeEx (co=0x7fffc2eb00f0,
globals=0x713f70, locals=0x0, args=0x37db250, argcount=5, kws=0x37db278,
kwcount=0, defs=0x0, defcount=0, closure=0x0)
at Python/ceval.c:3253
}}}
As much as I understand, the error occurs after finishing the tests.
However, running in verbose mode, I get:
{{{
...
Trying:
from sage.tests.benchmark import EllipticCurveMW###line 1612:_sage_
>>> from sage.tests.benchmark import EllipticCurveMW
Expecting nothing
ok
Trying:
B =
EllipticCurveMW([Integer(1),Integer(2),Integer(3),Integer(4),Integer(5)])###line
1613:_sage_ >>> B = EllipticCurveMW([1,2,3,4,5])
Expecting nothing
ok
Trying:
sig_on_count()
Expecting:
0
ok
Trying:
set_random_seed(0L)
Expecting nothing
ok
Trying:
change_warning_output(sys.stdout)
Expecting nothing
ok
Trying:
from sage.tests.benchmark import FiniteExtFieldMult###line 1636:_sage_
>>> from sage.tests.benchmark import FiniteExtFieldMult
Expecting nothing
ok
Trying:
B = FiniteExtFieldMult(GF(Integer(9), 'x'), Integer(2))###line
1637:_sage_ >>> B = FiniteExtFieldMult(GF(9, 'x'), 2)
Expecting nothing
python: Modules/gcmodule.c:326: visit_decref: Assertion `gc->gc.gc_refs !=
0' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff6d95d95 in raise () from /lib64/libc.so.6
}}}
So, is it in the middle of the tests, after all?
Anyway, the backtrace confirms Volker's statement that the problem is
related with pickling.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13864#comment:77>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.