Skip to content

Revert "workflows/eval: disable swap"#432286

Merged
wolfgangwalther merged 2 commits intoNixOS:masterfrom
wolfgangwalther:ci-eval-swap-timeout
Aug 9, 2025
Merged

Revert "workflows/eval: disable swap"#432286
wolfgangwalther merged 2 commits intoNixOS:masterfrom
wolfgangwalther:ci-eval-swap-timeout

Conversation

@wolfgangwalther
Copy link
Contributor

This reverts commit f2648b2.

While the idea to never use swap was fine, in practice this meant that when nix ran OOM, some other process was killed instead. This lead to the job not being possible to be cancelled anymore and thus needing to timeout, before subsequent jobs could be scheduled. This can take up to 6 hours for GitHub Actions by default.

Re-enabling the swap file to catch this case more gracefully. It's still the goal to never actually use the swap file during Eval and just a safeguard.

Keeping the changed chunkSize and not reverting it - this makes it slightly less likely to hit the swap file when running with Lix.

Also setting sensible timeouts for all jobs to make sure that if we ever hit that again, these PRs are not blocked for 6 hours...

Things done


Add a 👍 reaction to pull requests you find important.

@wolfgangwalther
Copy link
Contributor Author

One PR where we hit this was #428706. Another one was, when I tested all Lix / Nix versions on updates to ci/pinned.json and then Lix started to swap.

This reverts commit f2648b2.

While the idea to never use swap was fine, in practice this meant that
when nix ran OOM, some other process was killed instead. This lead to
the job not being possible to be cancelled anymore and thus needing to
timeout, before subsequent jobs could be scheduled. This can take up to
6 hours for GitHub Actions by default.

Re-enabling the swap file to catch this case more gracefully. It's still
the goal to never actually *use* the swap file during Eval and just a
safeguard.

Keeping the changed chunkSize and not reverting it - this makes it
slightly less likely to hit the swap file when running with Lix.
None of our jobs is expected to run for 6 hours, the GitHub limit. These
limits are generous and take into accounts that some jobs need to wait
for others.

If jobs exceed these times, most likely something else is wrong and
needs investigation.
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion Discuss policies to work in and around Nixpkgs backport release-25.05 labels Aug 9, 2025
Copy link
Contributor

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are likely tricks that we can run with systemd’s and Linux’s OOM knobs and adjustments, but the immediate restoration of swap combined with data-derived timeouts is where the smart money lands.

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Aug 9, 2025
@wolfgangwalther wolfgangwalther merged commit 52a6849 into NixOS:master Aug 9, 2025
53 of 55 checks passed
@wolfgangwalther wolfgangwalther deleted the ci-eval-swap-timeout branch August 9, 2025 19:10
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Aug 9, 2025

Successfully created backport PR for release-25.05:

@github-actions github-actions bot added the 8.has: port to stable This PR already has a backport to the stable release. label Aug 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants