openFile gives "file is locked" error on Linux when creating a non-existing file
Harendra Kumar
harendra.kumar at gmail.com
Wed Oct 9 05:58:51 UTC 2024
You are right I guess. I changed the temp prefix for both the test
suites and the issue is still happening. Let me try creating a minimal
test. The problem is - changing the code affects the reproducibility.
-harendra
On Wed, 9 Oct 2024 at 10:31, Viktor Dukhovni <ietf-dane at dukhovni.org> wrote:
>
> On Wed, Oct 09, 2024 at 10:24:30AM +0530, Harendra Kumar wrote:
>
> > I just noticed that cabal seems to be running test suites in parallel.
> > We have two test suites. Even though each test suite generates the
> > temp names randomly, they use the same prefix, if the generated names
> > have a possibility of conflict due to PRNG it may cause a problem.
> > That is perhaps the more likely cause rather than hunting this in GHC.
> > cabal running tests in parallel without explicitly saying so came as a
> > surprise to me. In fact I found an issue in cabal repo asking for a
> > "feature" to run them sequentially, the issue is still open -
> > https://github.com/haskell/cabal/issues/6751 . Hopefully this is it.
>
> Just parallel execution is not sufficient to explain the observed
> problem, you still need to have the same inode/dev already open
> in the same process, or bookkeeping of which dev/ino pairs are
> in use to be incorrect.
>
> So either the Github filesystem is reusing inodes of already deleted,
> but still open files (a deviation from expected Unix behaviour), or
> somehow GHC fails to correctly track the dev/ino pairs of open handles.
>
> My best guess is that something is manipulating file descriptors
> directly, bypassing the Handle layer, and *then* parallel execution
> could exacerbate the resulting inconsistent state.
>
> --
> Viktor.
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
More information about the ghc-devs
mailing list