#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):

 Even better!! The above test yields a reproducible crash on the command
 line:
 {{{
 sage -gdb
 ...
 sage: from sage.tests.benchmark import FiniteExtFieldMult
 sage: B = FiniteExtFieldMult(GF(Integer(9), 'x'), Integer(2))
 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=0x7fffc1b83a38, data=0x0) at
 Modules/gcmodule.c:326
 #5  0x00007ffff7a1cbce in dict_traverse (op=0x3017a60,
 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=168) at
 Objects/listobject.c:142
 #12 0x00007ffff2a2c395 in Pdata_popList (self=0x7fffc1c1ff90, start=80) at
 
/home/simon/SAGE/debug/sage-5.6.beta1/spkg/build/python-2.7.3.p5/src/Modules/cPickle.c:306
 #13 0x00007ffff2a3a0ee in do_append (self=0x7fffc26c17a0, x=80) at
 
/home/simon/SAGE/debug/sage-5.6.beta1/spkg/build/python-2.7.3.p5/src/Modules/cPickle.c:4401
 #14 0x00007ffff2a3a603 in load_appends (self=0x7fffc26c17a0) at
 
/home/simon/SAGE/debug/sage-5.6.beta1/spkg/build/python-2.7.3.p5/src/Modules/cPickle.c:4450
 #15 0x00007ffff2a3b875 in load (self=0x7fffc26c17a0) at
 
/home/simon/SAGE/debug/sage-5.6.beta1/spkg/build/python-2.7.3.p5/src/Modules/cPickle.c:4835
 #16 0x00007ffff2a3cbf9 in Unpickler_load (self=0x7fffc26c17a0, 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=0x7fffffff81e0, oparg=0)
 at Python/ceval.c:4005
 #18 0x00007ffff7ac16ba in PyEval_EvalFrameEx (f=0x301ca10, throwflag=0) at
 Python/ceval.c:2666
 #19 0x00007ffff7ac708a in fast_function (func=0x7fffc1bac060,
 pp_stack=0x7fffffff8560, n=2, na=2, nk=0) at Python/ceval.c:4107
 #20 0x00007ffff7ac6d76 in call_function (pp_stack=0x7fffffff8560, oparg=1)
 at Python/ceval.c:4042
 #21 0x00007ffff7ac16ba in PyEval_EvalFrameEx (f=0x301c800, throwflag=0) at
 Python/ceval.c:2666
 #22 0x00007ffff7ac708a in fast_function (func=0x7fffc1bac108,
 pp_stack=0x7fffffff88e0, n=3, na=3, nk=0) at Python/ceval.c:4107
 #23 0x00007ffff7ac6d76 in call_function (pp_stack=0x7fffffff88e0, oparg=2)
 at Python/ceval.c:4042
 #24 0x00007ffff7ac16ba in PyEval_EvalFrameEx (f=0x301c5d0, throwflag=0) at
 Python/ceval.c:2666
 #25 0x00007ffff7ac708a in fast_function (func=0x7fffc1baf258,
 pp_stack=0x7fffffff8c60, n=2, na=2, nk=0) at Python/ceval.c:4107
 #26 0x00007ffff7ac6d76 in call_function (pp_stack=0x7fffffff8c60, oparg=1)
 at Python/ceval.c:4042
 #27 0x00007ffff7ac16ba in PyEval_EvalFrameEx (f=0x301c3a0, throwflag=0) at
 Python/ceval.c:2666
 #28 0x00007ffff7ac40aa in PyEval_EvalCodeEx (co=0x7fffc1c57d50,
 globals=0x2f88d70, locals=0x0, args=0x7fffc2720358, argcount=2, kws=0x0,
 kwcount=0, defs=0x0, defcount=0, closure=0x0)
     at Python/ceval.c:3253
 #29 0x00007ffff79fd3fb in function_call (func=0x7fffc1baf1b0,
 arg=0x7fffc2720330, kw=0x0) at Objects/funcobject.c:526
 #30 0x00007ffff79be33e in PyObject_Call (func=0x7fffc1baf1b0,
 arg=0x7fffc2720330, kw=0x0) at Objects/abstract.c:2529
 #31 0x00007ffff79da311 in instancemethod_call (func=0x7fffc1baf1b0,
 arg=0x7fffc2720330, kw=0x0) at Objects/classobject.c:2578
 ...
 }}}

 I'd say this is something we now try to understand what is happening here.
 Could it be that there is some unpickle function that is not correctly
 raising the refcount?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13864#comment:78>
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.

Reply via email to