SCons / scons

SCons - a software construction tool
http://scons.org
MIT License
2.08k stars 316 forks source link

CacheDir race #3094

Open bdbaddog opened 6 years ago

bdbaddog commented 6 years ago

This issue was originally created at: 2018-01-14 07:53:38. This issue was reported by: dsiroky. dsiroky said at 2018-01-14 07:53:38

I'm running into following errors while using CacheDir and running parallel jobs:

scons: *** [.....] AttributeError : 'EnvironmentError' object has no attribute 'strerror'
scons: warning: Please upgrade your cache by running  scons-configure-cache.py /home/xxxx/.build_cache
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner

It happens only if the cache directory does not exist. I think the same problem is described also here: http://bugs.nuitka.net/issue380

My working solution is to use a simple lock: https://github.com/dsiroky/scons/commit/212fc5e8f35c98808a4275e00091f18d468e80af

epistax commented 6 years ago

This issue also exists on Windows 7 if the cache directory is on a network drive and the host has gone offline. (The bug being the failure to properly process and report the error)

bdbaddog commented 4 years ago

Is this resolved in current master?

mwichmann commented 5 days ago

Going to suggest this is resolved in current code, as the cachedir and config file creation are protected. We can always repoen or file a new issue if it comes up again.