[Scons-users] CacheDir race

DS ml at dasir.net
Sun Dec 31 03:14:22 EST 2017


I didn't do the analysis in nuitka issue. Kudos goes to someone else. I 
just found it.

When the CacheDir statement is invoked in SConstruct then it is already 
running in parallel. My only reason to place the lock to the CacheDir 
constructor is that I don't know any other suitable place. However it 
does not mean there isn't any other. I just don't know the architecture 
well.

David

On 2017-12-30 14:12, Bill Deegan wrote:
>David,
>
>Thanks for the thorough analysis in nuitka issue
>Seems like a better fix would be to do the cachedir initialization outside of
>the multi-threaded path.
>(In SCons initiliiazation post SConstruct processing perhaps, but before the
>tree walk..)
>
>Can you think of any reason it needs to be done in the context where it get's
>called on each thread?
>
>-Bill
>
>On Sat, Dec 30, 2017 at 10:35 AM, David Siroky <ml at dasir.net> wrote:
>
>    Hi!
>
>    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/212fc5e8f35c98808a42
>    75e00091f18d468e80af
>
>    Since there is a note about a hazard race I wonder - is the thread lock
>    good enough or are there any possible side effects?
>
>    Regards,
>    David
>    _______________________________________________
>    Scons-users mailing list
>    Scons-users at scons.org
>    https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>

>_______________________________________________
>Scons-users mailing list
>Scons-users at scons.org
>https://pairlist4.pair.net/mailman/listinfo/scons-users



More information about the Scons-users mailing list