#13826: Race condition in star_imports cache
------------------------------------------------+---------------------------
       Reporter:  vbraun                        |         Owner:  GeorgSWeber   
 
           Type:  defect                        |        Status:  
positive_review
       Priority:  critical                      |     Milestone:  sage-5.10     
 
      Component:  build                         |    Resolution:                
 
       Keywords:                                |   Work issues:                
 
Report Upstream:  N/A                           |     Reviewers:  Volker Braun  
 
        Authors:  Volker Braun, Jeroen Demeyer  |     Merged in:                
 
   Dependencies:  #14292                        |      Stopgaps:                
 
------------------------------------------------+---------------------------

Comment (by jdemeyer):

 Added
 {{{
 #!diff
 diff --git a/sage/misc/lazy_import.pyx b/sage/misc/lazy_import.pyx
 --- a/sage/misc/lazy_import.pyx
 +++ b/sage/misc/lazy_import.pyx
 @@ -909,6 +909,7 @@
      """
      global star_imports
      if star_imports is None:
 +        star_imports = {}
          try:
              with open(get_cache_file()) as cache_file:
                  star_imports = pickle.load(cache_file)
 @@ -917,7 +918,6 @@
          except Exception:  # unpickling failed
              import warnings
              warnings.warn('star_imports cache is corrupted')
 -        star_imports = {}
      try:
          return star_imports[module_name]
      except KeyError:
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13826#comment:22>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to