#11752: ecl.pyx should not touch SIGPWR neither SIGXCPU when initializing ecl
--------------------------+-------------------------------------------------
   Reporter:  pcpa        |          Owner:  was                           
       Type:  defect      |         Status:  positive_review               
   Priority:  minor       |      Milestone:  sage-4.7.2                    
  Component:  interfaces  |       Keywords:                                
Work_issues:              |       Upstream:  N/A                           
   Reviewer:  Nils Bruin  |         Author:  Paulo César Pereira de Andrade
     Merged:              |   Dependencies:                                
--------------------------+-------------------------------------------------

Old description:

> I experienced a problem in the Mandriva sagemath 4.7.1 that was causing
> sage to exit with the this somewhat funny message:
>
> sage: from sage.interfaces.maxima_lib import maxima_lib
>
> `/usr/share/sage/local/bin/sage-sage: line 178:  7177 Power failure     
>     sage-ipython "$@" -i`
>
> The problem is the logic in ecl.pyx that saves all signal handlers,
> initializes ecl and restores them, but this has the nasty side effect of
> messing with Boehm GC thread handling, that uses SIGXCPU and SIGPWR to
> stop/restart threads during gc.The attached patch corrects the problem
> for me, but is just a suggestion, and may need proper testing on non
> Linux systems, but on other systems Boehm GC should use a signal number
> larger than 32. Or, maybe add some comments about what those numbers are
> (SIGPWR = 30 and SIGXCPU = 24).
>
> -----
>
> Solution turned out to be: tell ECL not to create a separate signal-
> handling thread (which it won't do if threads are not enabled, as in the
> standard Sage build of ECL).
>
> Apply 11752_ecl-nothread.patch

New description:

 I experienced a problem in the Mandriva sagemath 4.7.1 that was causing
 sage to exit with the this somewhat funny message:

 sage: from sage.interfaces.maxima_lib import maxima_lib

 `/usr/share/sage/local/bin/sage-sage: line 178:  7177 Power failure      
    sage-ipython "$@" -i`

 The problem is the logic in ecl.pyx that saves all signal handlers,
 initializes ecl and restores them, but this has the nasty side effect of
 messing with Boehm GC thread handling, that uses SIGXCPU and SIGPWR to
 stop/restart threads during gc.The attached patch corrects the problem for
 me, but is just a suggestion, and may need proper testing on non Linux
 systems, but on other systems Boehm GC should use a signal number larger
 than 32. Or, maybe add some comments about what those numbers are (SIGPWR
 = 30 and SIGXCPU = 24).

 -----

 Solution turned out to be: tell ECL not to create a separate signal-
 handling thread (which it won't do if threads are not enabled, as in the
 standard Sage build of ECL).

 ----

 Apply only [attachment:11752_ecl-nothread.patch] to the Sage library.

--

Comment(by leif):

 Please use proper URLs (in this case to the raw attachment) or trac wiki
 mark-up ("`[attachment:here_comes_the_filename]`") when referring to
 patches (or spkgs) in the description.

 Also, an attachment comment ''"Apply only this patch."'' can make life
 easier.

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