#715: Parents probably not reclaimed due to too much caching
-------------------------------------------------------------------+--------
       Reporter:  robertwb                                         |         
Owner:  somebody                                 
           Type:  defect                                           |        
Status:  needs_review                             
       Priority:  major                                            |     
Milestone:  sage-5.4                                 
      Component:  coercion                                         |    
Resolution:                                           
       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:                                           
   Dependencies:  #9138, #11900, #11599, to be merged with #11521  |      
Stopgaps:                                           
-------------------------------------------------------------------+--------

Comment (by nbruin):

 I don't think that `quit_sage()` is the cause. Here's why. When I run
 `python cachfunc*.py` I observe that the segfault is happening during the
 actual doctests. In fact, it can happen in `example_27`.
 I've changed the doctests there to fail, so that non-verbose output tells
 me what happens:
 {{{
 ...
 def example_27():       r""">>> set_random_seed(0L)

 >>> change_warning_output(sys.stdout)


         Call the cached method without using the cache.

         EXAMPLE::

             >>> 1
             DO WE SEE THIS?
             >>> P = QQ['a, b, c, d']; (a, b, c, d,) =
 P._first_ngens(4)###line 1038:_sage_    >>> P.<a,b,c,d> = QQ[]
             WE DO NOT SEE THIS
 ...
 }}}
 When I run that, the (added) doctest fails visibly on `DO WE SEE THIS?`
 but the next line does not fail visibly anymore. That's not to say that
 that line has the bug in it. It just happens to get trapped in whatever
 memory corruption has happened before. So at least we know that whatever
 causes the corruption, it's executed before that point.

 The actual trigger point may not bear real information. For instance, if I
 edit some doctests in e.g. example_17 to fail, I do get the printed
 failures but no segfault at all. That is consistent with `--verbose`
 making the segfault not happen in a way.

 In any case, it seems that in an interactive session the segfault trigger
 gets postponed even further and only happens in `quit_sage()`. But that
 doesn't mean that `quit_sage()` is to blame.

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