NixOS / NixOS/nix

Communicate garbage collection is running to programs outside Nix process

Open
#4,698 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
17.7k
Forks
2k
Avg merge
1d 16h
Merged PRs (30d)
80

Description

It's currently not possible to check if GC is running to prevent race conditions outside Nix (for example in Cachix).

Ideally, there would be a way to do that via file locking or something better that would prefer racing conditions.

Reported at https://github.com/cachix/cachix/issues/370

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Start by tracing how Nix's garbage collector exposes its running state and review the linked Cachix report; define an externally observable way for programs outside Nix to coordinate with garbage collection and verify that it prevents the reported race.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.