You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow sanity check to pass without locking the cache
We check the sanity file once, without holding the lock, and if that
fails we acquire the lock and check again.
This means that if some other process is performing some long running
cache operation (e.g building libc) it won't block all emscripten
processes from running (e.g. compile processes won't be blocked by link
process).
logger.debug(f'PID {os.getpid()} acquiring multiprocess file lock to Emscripten cache at {self.dirname}')
39
+
assert'EM_CACHE_IS_LOCKED'notinos.environ, 'attempt to lock the cache while a parent process is holding the lock'
48
40
try:
49
41
self.filelock.acquire(60)
50
42
exceptfilelock.Timeout:
51
-
# The multiprocess cache locking can be disabled altogether by setting EM_EXCLUSIVE_CACHE_ACCESS=1 environment
52
-
# variable before building. (in that case, use "embuilder.py build ALL" to prepopulate the cache)
53
-
logger.warning(f'Accessing the Emscripten cache at "{self.dirname}" is taking a long time, another process should be writing to it. If there are none and you suspect this process has deadlocked, try deleting the lock file "{self.filelock_name}" and try again. If this occurs deterministically, consider filing a bug.')
43
+
logger.warning(f'Accessing the Emscripten cache at "{self.dirname}" (for "{reason}") is taking a long time, another process should be writing to it. If there are none and you suspect this process has deadlocked, try deleting the lock file "{self.filelock_name}" and try again. If this occurs deterministically, consider filing a bug.')
0 commit comments