Skip to content
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

Close all Build_log file descriptors just after sandbox finishes #118

Open
MisterDA opened this issue Sep 9, 2022 · 0 comments
Open

Close all Build_log file descriptors just after sandbox finishes #118

MisterDA opened this issue Sep 9, 2022 · 0 comments

Comments

@MisterDA
Copy link
Contributor

MisterDA commented Sep 9, 2022

On Windows, one cannot move a directory if it has files opened inside. A similar case occurs with ZFS. Ensure that all Build_log file descriptors are closed before promoting the temporary build directory and the log file it contains as definitive build result.
We can either ensure that all tail'ers have finished reading before closing the log file and moving the directory, or pause the tail'ers and resume reading from the moved log file.

I'm still struggling on it, it's not easy, I think I always end up in some sort of deadlock where the tail'ers and the Db_store layer are waiting on each other reciprocally.

I added a test for a very simple spec file that fails on ZFS (so I presume windows too iiuc) with the expected failure and the spec file -- now I'll look through the code to see why it's not working :))

Originally posted by @patricoferris in #98 (comment)

A workaround this issue is to let the store select the location of the log file and never move it, which I have implemented for the Windows backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant