Files
craft-common-actions/.github
FredApps b24513e795 fix(freebsd): cap the VM's ZFS ARC so big test crates aren't OOM-killed (#190)
* fix(freebsd): give the VM a swap file and cap the ZFS ARC

photocraft's FreeBSD job was SIGKILLed compiling photocraft-ui-egui's lib tests late in the run (release run 42609972735, dispatch 42805955303). Add an 8 GB swap file when the guest has none, cap the ARC at 2 GB when the image uses ZFS, and print disk, swap and memory so the next OOM is diagnosable.

* fix(freebsd): only touch swap and the ARC inside a FreeBSD guest

The workflow tests run the prepare script on Linux under sh -eu, where swapctl doesn't exist. Run the ARC cap, swap file and diagnostics only when uname is FreeBSD, and don't let the diagnostics fail the step.

* fix(freebsd): add the swap file only with room to spare, and remove a partial one

Per review: a dd that runs out of space must not leave a partial /var/swap0 that then starves the build. Require 16 GB free on /var first and delete the file if any step fails.

* fix(freebsd): keep only the ZFS ARC cap; drop the swap-file fallback

Per review: swap on a ZFS-backed file can hang FreeBSD under memory pressure, and today's image already has a swap partition, so the fallback never ran. The verified run passed on the ARC cap alone.
2026-11-10 16:40:36 +01:00
..
2026-10-19 01:14:25 -04:00