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

 Replying to [comment:265 SimonKing]:

 > Why do you think so? It is the temporary file created by sage-doctest. I
 had modified sage-doctest so that the location of the temporary file is
 shown, instead of deleting the file - hence, I could copy it and post it
 here.

 I did the same but got a bigger file (I'm not attaching it because with
 the hardcoded paths it's useless, so you have to extract it yourself
 anyway)
 {{{
 duke sage/5.3rc1$ wc failing_test_under_gdb.py
   96  283 3714 failing_test_under_gdb.py
 duke sage/5.3rc1$ wc cachefunc_3730.py
  2592 10019 99307 cachefunc_3730.py
 }}}
 so I suspect that you edited it. However, if your shorter file is still
 capable of segfaulting, that's fine, of course.

 As you remark, it should be run in a sage shell:
 {{{
 duke sage/5.3rc1$ ./sage -sh

 Starting subshell with Sage environment variables set.  Don't forget
 to exit when you are done.  Beware:
  * Do not do anything with other copies of Sage on your system.
  * Do not use this for installing Sage packages using "sage -i" or for
    running "make" at Sage's root directory.  These should be done
    outside the Sage shell.

 Bypassing shell configuration files...

 Note: SAGE_ROOT=/usr/local/sage/5.3rc1
 > time python cachefunc_3730.py
 5.553u 2.243s 0:10.39 74.9%     0+0k 1128+17624io 1pf+0w
 }}}
 If you do this on the machine where you get the SEGV (i.e., bsd) in the
 doctest,
 you should really get a SEGV from this as well. If you don't, we should
 probably
 start taking cosmic radiation into account as well.

 For running under gdb:
 {{{
 > gdb --args python -t cachefunc_3730.py
 [...runs fine...]
 }}}
 we already know that that prevents the SEGV from happening.

 The key is that now you have a single file, `cachefunc_3730.py` for me,
 but
 you'd have a different name, which you can tweak bit by bit. As we've
 seen,
 running `sage -t --verbose` also prevents the SEGV, so setting
 {{{
 if __name__ ==  '__main__':
     verbose = True
 }}}
 will likely make the SEGV go away. However, you have finer control now. By
 tweaking the file bit by bit you can probably zoom in on what goes wrong.
 Plus,
 seeing the traceback from an unredirected stderr might already give you a
 hint
 of what's going wrong.

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