Skip to content

Close all Build_log file descriptors just after sandbox finishes #118

@MisterDA

Description

@MisterDA

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions