-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding packages is thread-unsafe? #2219
Comments
I don't think any effort has gone into making package operations threadsafe. Would probably make sense to just have a "global package lock" that prevents more than one package operation from being in progress at a time. |
This is an issue for Pluto users, since starting two notebooks at the same time is fairly common. This also means that we can't run notebooks in parallel inside github actions. I can implement this lock in the future built-in Pkg stuff, but users who manage their environment manually (by calling |
Are the notebooks run in the same process? |
Thanks for pointing that out -- no, it's on separate processes, so my guess is that this issue is present in any form of parallelism on the same file system. Maybe the registry update process? |
There's two levels of potential synchronization needed: same process and inter-process. In the one process, we can just put a global lock at the entrance to Pkg APIs. Locking between processes is much harder; we could use a mechanism like |
This package (solves and) references more discussions about this issue: https://github.com/simonbyrne/PkgLock.jl |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
In Yggdrasil, where we happen to install the same packages in parallel, we have often issues with files that disappear. Last example:
So
Pkg.add
deletes files?The text was updated successfully, but these errors were encountered: