#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, #10352, #13878  |     
 Stopgaps:                                  
--------------------------------------------------------------------------+-

Comment (by SimonKing):

 #13878 turns out to be a considerable progress. With MALLOC_CHECK_=3, make
 ptest results in only two crashes and one file with three failures.

 {{{
 sage -t -force_lib "devel/sage/sage/misc/memory_info.py"
 **********************************************************************
 File
 "/home/simon/SAGE/debug/sage-5.6.beta1/devel/sage/sage/misc/memory_info.py",
 line 342:
     sage: MemoryInfo().available_swap() > 0
 Expected:
     True
 Got:
     False
 **********************************************************************
 File
 "/home/simon/SAGE/debug/sage-5.6.beta1/devel/sage/sage/misc/memory_info.py",
 line 421:
     sage: MemoryInfo().available_swap() > 0
 Expected:
     True
 Got:
     False
 **********************************************************************
 File
 "/home/simon/SAGE/debug/sage-5.6.beta1/devel/sage/sage/misc/memory_info.py",
 line 203:
     sage: MemoryInfo().available_swap() > 0
 Expected:
     True
 Got:
     False
 **********************************************************************
 3 items had failures:
    1 of   5 in __main__.example_13
    1 of   5 in __main__.example_18
    1 of   5 in __main__.example_7
 ***Test Failed*** 3 failures.
 For whitespace errors, see the file
 /home/simon/.sage//tmp/memory_info_26498.py
          [3.4 s]

 ----------------------------------------------------------------------
 The following tests failed:


         sage -t -force_lib "devel/sage/sage/misc/memory_info.py"
 Total time for all tests: 3.5 seconds
 }}}
 I don't know that these errors mean. Is it perhaps the case that a debug
 version of Sage does not use swap?

 The crashes, with gdb backtraces, are
 {{{
 sage -t -gdb -force_lib devel/sage/sage/combinat/tiling.py
 ...
 python: sage/combinat/matrices/dancing_links_c.h:217: void
 dancing_links::setup_columns(): Assertion `nr_columns > 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  0x00007fffc4260dc2 in dancing_links::setup_columns
 (this=0x7fffc047e620) at sage/combinat/matrices/dancing_links_c.h:217
 #5  0x00007fffc4261101 in dancing_links::add_rows (this=0x7fffc047e620,
 rows=...) at sage/combinat/matrices/dancing_links_c.h:268
 #6  0x00007fffc425a51d in
 
__pyx_pf_4sage_8combinat_8matrices_13dancing_links_20dancing_linksWrapper_14add_rows
 (__pyx_v_self=0x7fffc047e600, __pyx_v_rows=0x7fffbd3d21c8)
     at sage/combinat/matrices/dancing_links.cpp:2666
 #7  0x00007fffc4259c18 in
 
__pyx_pw_4sage_8combinat_8matrices_13dancing_links_20dancing_linksWrapper_15add_rows
 (__pyx_v_self=0x7fffc047e600, __pyx_v_rows=0x7fffbd3d21c8)
     at sage/combinat/matrices/dancing_links.cpp:2464
 #8  0x00007ffff7a21151 in PyCFunction_Call (func=0x7fffbd2dcb28,
 arg=0x7fffbd386e60, kw=0x0) at Objects/methodobject.c:101
 #9  0x00007ffff79be33e in PyObject_Call (func=0x7fffbd2dcb28,
 arg=0x7fffbd386e60, kw=0x0) at Objects/abstract.c:2529
 #10 0x00007fffc4258130 in
 
__pyx_pf_4sage_8combinat_8matrices_13dancing_links_20dancing_linksWrapper_2__cinit__
 (__pyx_v_self=0x7fffc047e600, __pyx_v_rows=0x7fffbd3d21c8)
     at sage/combinat/matrices/dancing_links.cpp:2010
 #11 0x00007fffc4257e79 in
 
__pyx_pw_4sage_8combinat_8matrices_13dancing_links_20dancing_linksWrapper_3__cinit__
 (__pyx_v_self=0x7fffc047e600, __pyx_args=0x7fffc2ebd920, __pyx_kwds=0x0)
     at sage/combinat/matrices/dancing_links.cpp:1946
 #12 0x00007fffc425bb28 in
 __pyx_tp_new_4sage_8combinat_8matrices_13dancing_links_dancing_linksWrapper
 (t=0x7fffc446d000
 <__pyx_type_4sage_8combinat_8matrices_13dancing_links_dancing_linksWrapper>,
     a=0x7fffc2ebd920, k=0x0) at
 sage/combinat/matrices/dancing_links.cpp:3037
 #13 0x00007ffff7a4bfe3 in type_call (type=0x7fffc446d000
 <__pyx_type_4sage_8combinat_8matrices_13dancing_links_dancing_linksWrapper>,
 args=0x7fffc2ebd920, kwds=0x0) at Objects/typeobject.c:721
 #14 0x00007ffff79be33e in PyObject_Call (func=0x7fffc446d000
 <__pyx_type_4sage_8combinat_8matrices_13dancing_links_dancing_linksWrapper>,
 arg=0x7fffc2ebd920, kw=0x0) at Objects/abstract.c:2529
 #15 0x00007fffc425af12 in
 __pyx_pf_4sage_8combinat_8matrices_13dancing_links_dlx_solver
 (__pyx_self=0x0, __pyx_v_rows=0x7fffbd3d21c8) at
 sage/combinat/matrices/dancing_links.cpp:2888
 #16 0x00007fffc425ae33 in
 __pyx_pw_4sage_8combinat_8matrices_13dancing_links_1dlx_solver
 (__pyx_self=0x0, __pyx_v_rows=0x7fffbd3d21c8) at
 sage/combinat/matrices/dancing_links.cpp:2852
 ...
 }}}
 and
 {{{
 sage -t -gdb -force_lib "devel/sage/sage/rings/polynomial/pbori.pyx"
 ...
 python: groebner/include/polybori/groebner/PolyEntryVector.h:74: virtual
 void polybori::groebner::PolyEntryVector::append(const
 polybori::groebner::PolyEntry&): Assertion `m_indices.checked(back().lead)
 == (size_type)-1' 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  0x00007fffd0dc0073 in
 polybori::groebner::PolyEntryVector::append(polybori::groebner::PolyEntry
 const&) [clone .part.506] ()
    from
 /home/simon/SAGE/debug/sage-5.6.beta1/local/lib/libpolybori_groebner-0.8.2.so.0
 #5  0x00007fffd0ddc5b9 in
 polybori::groebner::FGLMStrategy::FGLMStrategy(polybori::BoolePolyRing
 const&, polybori::BoolePolyRing const&,
 std::vector<polybori::BoolePolynomial,
 std::allocator<polybori::BoolePolynomial> > const&) () from
 /home/simon/SAGE/debug/sage-5.6.beta1/local/lib/libpolybori_groebner-0.8.2.so.0
 #6  0x00007fffd16fd8b7 in
 
WrappedPtr<polybori::groebner::FGLMStrategy>::WrappedPtr<polybori::BoolePolyRing,
 polybori::BoolePolyRing, std::vector<polybori::BoolePolynomial> >
 (this=0x7fffffff9240,
     arg1=..., arg2=..., arg3=...) at
 /home/simon/SAGE/debug/sage-5.6.beta1/local/include/csage/pb_wrap.h:197
 #7  0x00007fffd16a1c5e in
 __pyx_pf_4sage_5rings_10polynomial_5pbori_12FGLMStrategy___init__
 (__pyx_v_self=0x7fffc284f498, __pyx_v_from_ring=0x3e04420,
 __pyx_v_to_ring=0x3d5ca50,
     __pyx_v_vec=0x7fffc2851060) at sage/rings/polynomial/pbori.cpp:39777
 #8  0x00007fffd16a0e26 in
 __pyx_pw_4sage_5rings_10polynomial_5pbori_12FGLMStrategy_1__init__
 (__pyx_v_self=0x7fffc284f498, __pyx_args=0x7fffc284b460, __pyx_kwds=0x0)
     at sage/rings/polynomial/pbori.cpp:39568
 #9  0x00007ffff7a4c0dd in type_call (type=0x7fffd197ec20
 <__pyx_type_4sage_5rings_10polynomial_5pbori_FGLMStrategy>,
 args=0x7fffc284b460, kwds=0x0) at Objects/typeobject.c:737
 #10 0x00007ffff79be33e in PyObject_Call (func=0x7fffd197ec20
 <__pyx_type_4sage_5rings_10polynomial_5pbori_FGLMStrategy>,
 arg=0x7fffc284b460, kw=0x0) at Objects/abstract.c:2529
 #11 0x00007ffff7ac7a58 in do_call (func=0x7fffd197ec20
 <__pyx_type_4sage_5rings_10polynomial_5pbori_FGLMStrategy>,
 pp_stack=0x7fffffff95a0, na=3, nk=0) at Python/ceval.c:4239
 #12 0x00007ffff7ac6d92 in call_function (pp_stack=0x7fffffff95a0, oparg=3)
 at Python/ceval.c:4044
 #13 0x00007ffff7ac16ba in PyEval_EvalFrameEx (f=0x3ec7250, throwflag=0) at
 Python/ceval.c:2666
 #14 0x00007ffff7ac40aa in PyEval_EvalCodeEx (co=0x7fffa97d59e0,
 globals=0x30f8e00, locals=0x30f8e00, args=0x0, argcount=0, kws=0x0,
 kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
 #15 0x00007ffff7ab9a88 in PyEval_EvalCode (co=0x7fffa97d59e0,
 globals=0x30f8e00, locals=0x30f8e00) at Python/ceval.c:667
 #16 0x00007ffff7ac9693 in exec_statement (f=0x3e03f20,
 prog=0x7fffa97d59e0, globals=0x30f8e00, locals=0x30f8e00) at
 Python/ceval.c:4718
 #17 0x00007ffff7abde26 in PyEval_EvalFrameEx (f=0x3e03f20, throwflag=0) at
 Python/ceval.c:1880
 ...
 }}}

 I suggest someone (or I, a bit later) opens two new tickets for the two
 crashes, and a third for the lack of swap, if that is really an issue
 here.

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