haskell / haskell/cabal

Non-deterministic removeDirectoryRecursive failures during package registration generation

Open
#11,255 4 comments 0 reactions 0 assignees View on GitHub
needs triage type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**
When building, `cabal build` occasionally with:
```
Error: [Cabal-7125]
Failed to build time-compat-1.9.8 (which is required by exe:ingest from blah-ingest-0.1.0.0). The failure occurred during the final install step. The exception was:
/home/bgamari/blah/ingest/dist-newstyle/tmp/package-registration--1315659: removeDirectoryRecursive:unlinkat: unsatisfied constraints (Directory not empty)
```

**To Reproduce**
Steps to reproduce the behavior:

```
$ cabal build
```
However, this is quite non-deterministic and rare. It may be relevant that the project is located on an NFS mount.

Restarting the build generally runs to completion.

**Expected behavior**
The build finishes.

**System information**
- Ubuntu 22.04
- GHC 9.12.2
- cabal-install 3.14.2.0
- Cabal 3.14.2.0

**Additional context**
Again, this may be a race which is tickled by NFS.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.