#715: Parents probably not reclaimed due to too much caching
--------------------------------------------------------------------+-------
       Reporter:  robertwb                                          |         
Owner:  somebody                                 
           Type:  defect                                            |        
Status:  closed                                   
       Priority:  major                                             |     
Milestone:  sage-5.5                                 
      Component:  coercion                                          |    
Resolution:  fixed                                    
       Keywords:  weak cache coercion Cernay2012                    |   Work 
issues:                                           
Report Upstream:  N/A                                               |     
Reviewers:  Jean-Pierre Flori, Simon King, Nils Bruin
        Authors:  Simon King, Jean-Pierre Flori                     |     
Merged in:  sage-5.5.beta0                           
   Dependencies:  #13145, #13741, #13746, to be merged with #11521  |      
Stopgaps:                                           
--------------------------------------------------------------------+-------

Comment (by jdemeyer):

 With a trial of sage-5.6.beta2, I get the following doctest error on the
 Skynet machine `mark` (Solaris SPARC 32-bit):
 {{{
 sage -t  --long -force_lib devel/sage/sage/calculus/wester.py
 **********************************************************************
 File
 "/home/buildbot/build/sage/mark-1/mark_full/build/sage-5.6.beta2/devel
 /sage-main/sage/calculus/wester.py", line 456:
     sage: d = m.determinant()
 Exception raised:
     Traceback (most recent call last):
       File
 
"/home/buildbot/build/sage/mark-1/mark_full/build/sage-5.6.beta2/local/bin/ncadoctest.py",
 line 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 
"/home/buildbot/build/sage/mark-1/mark_full/build/sage-5.6.beta2/local/bin/sagedoctest.py",
 line 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 
"/home/buildbot/build/sage/mark-1/mark_full/build/sage-5.6.beta2/local/bin/ncadoctest.py",
 line 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_0[153]>", line 1, in <module>
         d = m.determinant()###line 456:
     sage: d = m.determinant()
       File "matrix2.pyx", line 1167, in
 sage.matrix.matrix2.Matrix.determinant (sage/matrix/matrix2.c:8553)
       File "matrix_symbolic_dense.pyx", line 436, in
 sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense.charpoly
 (sage/matrix/matrix_symbolic_dense.c:3556)
       File "expression.pyx", line 4911, in
 sage.symbolic.expression.Expression.polynomial
 (sage/symbolic/expression.cpp:23554)
       File
 
"/home/buildbot/build/sage/mark-1/mark_full/build/sage-5.6.beta2/local/lib/python
 /site-packages/sage/symbolic/expression_conversions.py", line 1056, in
 polynomial
         res = converter()
       File
 
"/home/buildbot/build/sage/mark-1/mark_full/build/sage-5.6.beta2/local/lib/python
 /site-packages/sage/symbolic/expression_conversions.py", line 214, in
 __call__
         return self.arithmetic(ex, operator)
       File
 
"/home/buildbot/build/sage/mark-1/mark_full/build/sage-5.6.beta2/local/lib/python
 /site-packages/sage/symbolic/expression_conversions.py", line 1010, in
 arithmetic
         ops = [self(a) for a in ex.operands()]
       File
 
"/home/buildbot/build/sage/mark-1/mark_full/build/sage-5.6.beta2/local/lib/python
 /site-packages/sage/symbolic/expression_conversions.py", line 214, in
 __call__
         return self.arithmetic(ex, operator)
       File
 
"/home/buildbot/build/sage/mark-1/mark_full/build/sage-5.6.beta2/local/lib/python
 /site-packages/sage/symbolic/expression_conversions.py", line 1011, in
 arithmetic
         return reduce(operator, ops)
       File "element.pyx", line 1682, in
 sage.structure.element.RingElement.__mul__
 (sage/structure/element.c:14096)
       File "polynomial_element.pyx", line 1156, in
 sage.rings.polynomial.polynomial_element.Polynomial._mul_
 (sage/rings/polynomial/polynomial_element.c:11992)
       File "polynomial_element.pyx", line 6165, in
 sage.rings.polynomial.polynomial_element.Polynomial_generic_dense.__richcmp__
 (sage/rings/polynomial/polynomial_element.c:42959)
       File "element.pyx", line 843, in
 sage.structure.element.Element._richcmp (sage/structure/element.c:7870)
       File "coerce.pyx", line 854, in
 sage.structure.coerce.CoercionModel_cache_maps.canonical_coercion
 (sage/structure/coerce.c:7932)
       File "coerce.pyx", line 1009, in
 sage.structure.coerce.CoercionModel_cache_maps.coercion_maps
 (sage/structure/coerce.c:9483)
       File "coerce.pyx", line 1150, in
 sage.structure.coerce.CoercionModel_cache_maps.discover_coercion
 (sage/structure/coerce.c:11033)
       File "parent.pyx", line 1974, in
 sage.structure.parent.Parent.coerce_map_from
 (sage/structure/parent.c:13804)
       File "parent.pyx", line 2068, in
 sage.structure.parent.Parent.discover_coerce_map_from
 (sage/structure/parent.c:14231)
       File "parent_old.pyx", line 507, in
 sage.structure.parent_old.Parent._coerce_map_from_
 (sage/structure/parent_old.c:6428)
       File
 
"/home/buildbot/build/sage/mark-1/mark_full/build/sage-5.6.beta2/local/lib/python
 /site-packages/sage/rings/polynomial/polynomial_ring.py", line 554, in
 _coerce_map_from_
         return self.coerce_map_from(base_ring) * connecting
       File "map.pyx", line 649, in sage.categories.map.Map.__mul__
 (sage/categories/map.c:4578)
       File "map.pyx", line 689, in sage.categories.map.Map._composition
 (sage/categories/map.c:4696)
       File
 
"/home/buildbot/build/sage/mark-1/mark_full/build/sage-5.6.beta2/local/lib/python
 /site-packages/sage/categories/homset.py", line 261, in Hom
         _cache[key] = KeyedRef(H, _cache.eraser,
 (id(X),id(Y),id(category)))
       File "coerce_dict.pyx", line 451, in
 sage.structure.coerce_dict.TripleDict.__setitem__
 (sage/structure/coerce_dict.c:2933)
       File "coerce_dict.pyx", line 471, in
 sage.structure.coerce_dict.TripleDict.set
 (sage/structure/coerce_dict.c:3199)
     KeyError: (26976432, 83278464, 7649040)
 **********************************************************************
 }}}

 The error is reproducible, except that the numbers in the `KeyError`
 change.

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