#13826: Race condition in star_imports cache
------------------------------------------------+---------------------------
       Reporter:  vbraun                        |         Owner:  GeorgSWeber 
           Type:  defect                        |        Status:  needs_review
       Priority:  critical                      |     Milestone:  sage-5.9    
      Component:  build                         |    Resolution:              
       Keywords:                                |   Work issues:              
Report Upstream:  N/A                           |     Reviewers:              
        Authors:  Volker Braun, Jeroen Demeyer  |     Merged in:              
   Dependencies:  #14292                        |      Stopgaps:              
------------------------------------------------+---------------------------
Changes (by {'newvalue': u'Volker Braun, Jeroen Demeyer', 'oldvalue': u'Volker 
Braun'}):

  * dependencies:  => #14292
  * author:  Volker Braun => Volker Braun, Jeroen Demeyer


Old description:

> See https://groups.google.com/d/topic/sage-devel/SN88f9qEIV8/discussion
>
> The patchbot there sporadically fails on various tests with errors of
> the type
> {{{
> Traceback (most recent call last):
>   File "/mnt/storage2TB/patchbot/.sage/tmp/
> volker_desktop.stp.dias.ie-14095/multireplace_29004.py", line 6, in
> <module>
>     from sage.all_cmdline import *;
>   File "/mnt/storage2TB/patchbot/Sage/sage-5.5.rc0/local/lib/python/
> site-packages/sage/all_cmdline.py", line 14, in <module>
>     from sage.all import *
>   File "/mnt/storage2TB/patchbot/Sage/sage-5.5.rc0/local/lib/python/
> site-packages/sage/all.py", line 72, in <module>
>     from sage.rings.all      import *
>   File "/mnt/storage2TB/patchbot/Sage/sage-5.5.rc0/local/lib/python/
> site-packages/sage/rings/all.py", line 169, in <module>
>     lazy_import("sage.rings.universal_cyclotomic_field.all","*")
>   File "lazy_import.pyx", line 850, in
> sage.misc.lazy_import.lazy_import (sage/misc/lazy_import.c:5168)
>     names[ix:ix+1] = get_star_imports(module)
>   File "lazy_import.pyx", line 900, in
> sage.misc.lazy_import.get_star_imports (sage/misc/lazy_import.c:5924)
>     star_imports = pickle.load(open(cache_file))
> EOFError
> }}}
> The patchbot is on a separate harddisk, mounted under /mnt/storage2TB.
> But my temp directory is tmpfs. So the pickle is moved across block
> devices, which is of course not atomic. Hence the patchbot sometimes dies
> here while opening a half-written file. The temporary file should be
> created in the target directory, only then can we be sure that the move
> is atomic.

New description:

 See https://groups.google.com/d/topic/sage-devel/SN88f9qEIV8/discussion

 The patchbot there sporadically fails on various tests with errors of
 the type
 {{{
 Traceback (most recent call last):
   File "/mnt/storage2TB/patchbot/.sage/tmp/
 volker_desktop.stp.dias.ie-14095/multireplace_29004.py", line 6, in
 <module>
     from sage.all_cmdline import *;
   File "/mnt/storage2TB/patchbot/Sage/sage-5.5.rc0/local/lib/python/
 site-packages/sage/all_cmdline.py", line 14, in <module>
     from sage.all import *
   File "/mnt/storage2TB/patchbot/Sage/sage-5.5.rc0/local/lib/python/
 site-packages/sage/all.py", line 72, in <module>
     from sage.rings.all      import *
   File "/mnt/storage2TB/patchbot/Sage/sage-5.5.rc0/local/lib/python/
 site-packages/sage/rings/all.py", line 169, in <module>
     lazy_import("sage.rings.universal_cyclotomic_field.all","*")
   File "lazy_import.pyx", line 850, in
 sage.misc.lazy_import.lazy_import (sage/misc/lazy_import.c:5168)
     names[ix:ix+1] = get_star_imports(module)
   File "lazy_import.pyx", line 900, in
 sage.misc.lazy_import.get_star_imports (sage/misc/lazy_import.c:5924)
     star_imports = pickle.load(open(cache_file))
 EOFError
 }}}
 The patchbot is on a separate harddisk, mounted under /mnt/storage2TB. But
 my temp directory is tmpfs. So the pickle is moved across block devices,
 which is of course not atomic. Hence the patchbot sometimes dies here
 while opening a half-written file. The temporary file should be created in
 the target directory, only then can we be sure that the move is atomic.

 '''Apply''' [attachment:13826_star_imports_race_v2.patch]

--

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