-
Notifications
You must be signed in to change notification settings - Fork 409
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
fix: disable background digests on Windows #8243
Conversation
We can probably come up with a better fix but this one would mitigate the issue. |
This fix is not great; it will leave temporary directories and files laying around that will never be cleaned up. Do you understand when is the |
I don't understand how we run into this issue in the first place. When creating temporary directories in Windows, it is my understanding that we ask windows for a unique temp directory name which gets put into the common temp dir location. Then we can do whatever we like with the files inside and finally delete the temp directory since the name is unqiue. It appears in this case we are placing a non-unique directory name (from the caching stuff?) directly ourselves into the common windows temp dirs and then getting race conditions when two processes touch the same name. Wouldn't the solution be to fix how we create and delete temp directories in windows rather than ignoring the errors? |
How about we just disable background digests on windows until we understand the issue better? |
Sure, that's an even better workaround. I'll change the PR to do that and add that to 3.9.2. |
done |
Fixes ocaml#8228 In some cases when the shared cache is enabled, some temporary directories cannot be removed. Signed-off-by: Etienne Millon <[email protected]>
; value = background_default | ||
; value = | ||
(match Platform.OS.value with | ||
| Linux -> `Enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you disable it on Mac and the rest of the unixes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I remember that we have that fork bug as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can introduce a Toggle.and_
to express that as background_default and not windows
if you think it's more explicit.
Fixes ocaml#8228 In some cases when the shared cache is enabled, some temporary directories cannot be removed. Signed-off-by: Etienne Millon <[email protected]>
Fixes #8228 In some cases when the shared cache is enabled, some temporary directories cannot be removed. Signed-off-by: Etienne Millon <[email protected]>
CHANGES: - Disable background digests on Windows. This prevents an issue where unremovable files would make dune crash when the shared cache is enabled. (ocaml/dune#8243, fixes ocaml/dune#8228, @emillon) - Fix permission errors when `sendfile` is not available (ocaml/dune#8234, fixes ocaml/dune#8120, @emillon)
Fixes ocaml#8228 In some cases when the shared cache is enabled, some temporary directories cannot be removed. Signed-off-by: Etienne Millon <[email protected]>
CHANGES: - Disable background digests on Windows. This prevents an issue where unremovable files would make dune crash when the shared cache is enabled. (ocaml/dune#8243, fixes ocaml/dune#8228, @emillon) - Fix permission errors when `sendfile` is not available (ocaml/dune#8234, fixes ocaml/dune#8120, @emillon)
Fixes #8228
In some cases when the shared cache is enabled, some temporary directories cannot be removed.