8000 pynixd: a substituter query slower than 2 s counts as no substitute, so a loaded host builds from source · Issue #1265 · nixidae/nixidae · GitHub
[go: up one dir, main page]

Skip to content

pynixd: a substituter query slower than 2 s counts as no substitute, so a loaded host builds from source #1265

Closed

Description

@Lillecarl

substitution_query_timeout defaults to 2.0 s (pynixd/config.py:1272). SubstitutionQueue._query_store and _probe_http_narinfo (pynixd/substitution_queue.py:523, :572) treat a timeout as "no substitute". The build then runs from source, often through stdenv's bootstrap. Nix sets no deadline on a single query. It has only connect-timeout and stalled-download-timeout (300 s).

Seen twice in the functional suite under xdist, with 16 workers on 16 cores:

  • test_reverse_store::test_delegated_build_runs_on_the_builder: the builder's query to the guest daemon for glibc-2.44-25 timed out. pynixd then built the bootstrap chain, which failed on bash53-014 with no network.
  • test_substitution_import::test_a_substitution_imports_as_the_daemon_does: four narinfo queries to the test's HTTP cache timed out, and nix build exited 1.

Options:

  1. (Recommended) No deadline per query, as Nix: a slow substituter is slow, not absent. Keep the health log for one that never answers.
  2. Raise the default (for example to 30 s): smaller change, but the cliff stays.
  3. Keep 2 s and raise it in the test config only: hides the defect.

Assisted-By: Claude Opus 5.5

Activity

  1. added
    source: pynixd
    on Nov 10, 2026
  2. Lillecarl commented on Nov 10, 2026

    @Lillecarl
    ContributorAuthor

    Took option 1 in f39f4fa: substitution_query_timeout defaults to no deadline, and a narinfo GET uses the NAR download's stall rule (30 s to connect, 60 s with no bytes) in place of a 5 s total.

    • Negative control: test_a_slow_query_is_slow_and_not_absent (a 2.2 s hit) fails under the old 2 s default with available=False after substitution_query_timeout.
    • The functional suite under xdist: 324 passed, 9 skipped, 108.8 s, with no substitution_query_timeout in the artifacts.

    Assisted-By: Claude Opus 5.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    source: pynixd

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0