Lix does not build on systems with btrfs compressed store #507

Closed
opened 2024-09-09 21:53:24 +00:00 by hcsch · 1 comment

Describe the bug

On a system with /nix (and /nix/store by extension) being located on a BTRFS filesystem with compression enabled for the directory (and with that also for all new files/directories in it) Lix fails to build due to errors in the check phase. All failed checks seem to fail because of the btrfs.compression extended file attribute, which the build process attempts to remove, but fails in doing so with Permission denied (I think the compression and therefore also the attribute can only be changed via a BTRFS defragmentation). I've attached build and test logs to the issue.

$ nix build https://git.lix.systems/lix-project/lix/archive/2.91.0.tar.gz --keep-failed --show-trace
note: keeping build directory '/tmp/nix-build-lix-2.91.0.drv-0/build'
error: builder for '/nix/store/qrz3ix4hbhbfprcpad96lp81ryig1qjh-lix-2.91.0.drv' failed with exit code 43;
       last 10 log lines:
       > 161/161 lix:installcheck / functional-binary-cache-build-remote               FAIL            11.32s   exit status 1
       >
       > Ok:                 114
       > Expected Fail:      0
       > Fail:               43
       > Unexpected Pass:    0
       > Skipped:            4
       > Timeout:            0
       >
       > Full log written to /build/source/build/meson-logs/testlog.txt
       For full logs, run 'nix log /nix/store/qrz3ix4hbhbfprcpad96lp81ryig1qjh-lix-2.91.0.drv'.

Steps To Reproduce

  1. Set up system where the /nix is on located a BTRFS filesystem
  2. Enable compression for /nix before using nix for the first time with btrfs property set /nix compression zstd
  3. Run nix for this first time, e.g. for installing
  4. Verify attribute propagation to /nix/store with btrfs property get /nix/store compression
  5. Build lix with nix build https://git.lix.systems/lix-project/lix/archive/2.91.0.tar.gz --keep-failed --show-trace
  6. See error in check phase

Expected behavior

Lix checks pass without errors even on a system with a compressed store and build succeeds as a whole.

nix --version output

nix (Nix) 2.18.5

Additional context

My setup has worked so far with NixCpp and building NixCpp also worked in the past, but I assume Lix just has a larger test suite. Building lix also fails with the official module, but the above was easier for me to try now and again and resulted in seemingly the same errors. If this is not a setup that you currently wish to support, feel free to change this to a feature request.

## Describe the bug On a system with `/nix` (and `/nix/store` by extension) being located on a BTRFS filesystem with compression enabled for the directory (and with that also for all new files/directories in it) Lix fails to build due to errors in the check phase. All failed checks seem to fail because of the `btrfs.compression` extended file attribute, which the build process attempts to remove, but fails in doing so with `Permission denied` (I think the compression and therefore also the attribute can only be changed via a BTRFS defragmentation). I've attached build and test logs to the issue. ```console $ nix build https://git.lix.systems/lix-project/lix/archive/2.91.0.tar.gz --keep-failed --show-trace note: keeping build directory '/tmp/nix-build-lix-2.91.0.drv-0/build' error: builder for '/nix/store/qrz3ix4hbhbfprcpad96lp81ryig1qjh-lix-2.91.0.drv' failed with exit code 43; last 10 log lines: > 161/161 lix:installcheck / functional-binary-cache-build-remote FAIL 11.32s exit status 1 > > Ok: 114 > Expected Fail: 0 > Fail: 43 > Unexpected Pass: 0 > Skipped: 4 > Timeout: 0 > > Full log written to /build/source/build/meson-logs/testlog.txt For full logs, run 'nix log /nix/store/qrz3ix4hbhbfprcpad96lp81ryig1qjh-lix-2.91.0.drv'. ``` ## Steps To Reproduce 1. Set up system where the `/nix` is on located a BTRFS filesystem 2. Enable compression for `/nix` before using nix for the first time with `btrfs property set /nix compression zstd` 3. Run nix for this first time, e.g. for installing 4. Verify attribute propagation to `/nix/store` with `btrfs property get /nix/store compression` 5. Build lix with `nix build https://git.lix.systems/lix-project/lix/archive/2.91.0.tar.gz --keep-failed --show-trace` 6. See error in check phase ## Expected behavior Lix checks pass without errors even on a system with a compressed store and build succeeds as a whole. ## `nix --version` output `nix (Nix) 2.18.5` ## Additional context My setup has worked so far with NixCpp and building NixCpp also worked in the past, but I assume Lix just has a larger test suite. Building lix also fails with the official module, but the above was easier for me to try now and again and resulted in seemingly the same errors. If this is not a setup that you currently wish to support, feel free to change this to a feature request.
hcsch added the
bug
label 2024-09-09 21:53:24 +00:00
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/1903 ("local-store: make extended attribute handling more robust")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/1903", "number": 1903, "kind": "commit message"}], "cl_meta": {"1903": {"change_title": "local-store: make extended attribute handling more robust"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/1903](https://gerrit.lix.systems/c/lix/+/1903) ("local-store: make extended attribute handling more robust")
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#507
No description provided.