Opened 9 years ago

Last modified 9 years ago

#13826 closed defect

Race condition in star_imports cache — at Initial Version

Reported by: vbraun Owned by: GeorgSWeber
Priority: critical Milestone: sage-5.9
Component: build Keywords:
Cc: nbruin, robertwb Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges



The patchbot there sporadically fails on various tests with errors of the type

Traceback (most recent call last): 
  File "/mnt/storage2TB/patchbot/.sage/tmp/", line 6, in 
    from sage.all_cmdline import *; 
  File "/mnt/storage2TB/patchbot/Sage/sage-5.5.rc0/local/lib/python/ 
site-packages/sage/", line 14, in <module> 
    from sage.all import * 
  File "/mnt/storage2TB/patchbot/Sage/sage-5.5.rc0/local/lib/python/ 
site-packages/sage/", 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/", line 169, in <module> 
  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)) 

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.

Change History (0)

Note: See TracTickets for help on using tickets.