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

 OK, in principle it is possible to handle segfaults with code like:
 {{{
 import signal
 import os, sys
 import traceback
 def handler(a,frm):
     tb=traceback.extract_stack(frm)
     traceback.print_tb(tb,sys.stderr)
     sys.stderr.flush()
     os._exit(255)
 signal.signal(signal.SIGSEGV,handler)
 }}}
 Of course, with a serious corruption, it's doubtful that code can run
 successfully. Indeed, if we equip the doctesting script with it, we don't
 get useful information. It makes the script loop forever.

 I cannot debug on bsd because OSX wants admin credentials. However, I
 think it is possible to attach gdb to running processes, in which case it
 might be possible to poke around in the corpse a bit.

 See
 {{{
 
bsd.math.washington.edu:/scratch/nbruin/sage-5.4.beta0/segv_handle_infinite_loop.py
 }}}

 I've also tried to put `gc.collect()` in the doctest. If you put it early
 enough in the file (either before or a bit after the `an_element` call),
 it prevents the segfault. If you put it right before the test where the
 segfault happens, the collection itself does not lead to a segfault, but a
 segfault still happens. This is all consistent with a corruption that
 happens at one point and triggers a fault somewhere else. Is there a way
 to put a command in the doctest that would drop us into a (python)
 debugger or a REPL? then we could pick through the memory and see if
 there's anything unsavoury.

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