#13748: multiprocessing and sig_block don't interact well
----------------------+-----------------------------------------------------
   Reporter:  roed    |             Owner:  jdemeyer
       Type:  defect  |            Status:  new     
   Priority:  major   |         Milestone:  sage-5.6
  Component:  c_lib   |          Keywords:          
Work issues:          |   Report Upstream:  N/A     
  Reviewers:          |           Authors:          
  Merged in:          |      Dependencies:          
   Stopgaps:          |  
----------------------+-----------------------------------------------------
 The following problem arose while working on #12415.  Put the following
 code in your `~/.sage/init.sage`:

 {{{
 import multiprocessing
 class Task(multiprocessing.Process):
     def run(self):
         sage_namespace = dict(sage.all_cmdline.__dict__)
         exec compile("from sage.tests.interrupt import *","","single",0,1)
 in sage_namespace
         exec compile("test_sig_block()","","single",0,1) in sage_namespace
         exec compile("sig_on_count()","","single",0,1) in sage_namespace
 Task().start()
 }}}

 It will result in the following being printed (though your Sage process
 survives since the segfault occurs in a chile process):

 {{{
 42
 0

 ------------------------------------------------------------------------
 Unhandled SIGSEGV: A segmentation fault occurred in Sage.
 This probably occurred because a *compiled* component of Sage has a bug
 in it and is not properly wrapped with sig_on(), sig_off(). You might
 want to run Sage under gdb with 'sage -gdb' to debug this.
 Sage will now terminate.
 ------------------------------------------------------------------------
 }}}

 Typing it in to a running Sage session does not cause the same failure.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13748>
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