vk_pipeline_check: cap Linux isolation worker address space (PIPELINE-LINUX-ISOLATE-AS-LIMIT) #1209

Open
github-bot wants to merge 1 commit from github-bot/gh-1209 into main AGit
Owner

@⁠lixonik on GitHub · 2026-11-24 20:17 UTC · original
lixonik:pipeline-linux-isolate-as-limit → main · +57 −3 · 3 files · 1 commits · open

Claimed in the coordination issue as PIPELINE-LINUX-ISOLATE-AS-LIMIT.

Refs #636.

What and why

An isolated Vulkan compiler process can still exhaust host memory. That happened in the Linux run reported in #636 even with --isolate enabled.

On Linux, vk_pipeline_check --isolate --isolate-address-space-mib N applies an opt-in RLIMIT_AS cap before each worker opens Vulkan. A stricter inherited limit is honored. The parent still runs with its inherited limit and uses the existing failure and bisection paths. The cap includes virtual mappings as well as allocated memory, so users can choose a budget appropriate for their driver.

Tested

  • Linux GCC build. A synthetic loader in the real isolation child observed a 64 MiB cap, accepted a 1 MiB mapping and received ENOMEM for an 80 MiB mapping. The same 80 MiB mapping worked with the option omitted. Tested both stricter inherited limits and a requested limit below the inherited one. A syscall trace confirmed that only the child set the limit.
  • Windows MSVC build. Both checker CTest tests and all 11 checker index tests passed. The Linux-only option exits with a usage error on Windows.
  • All 6,141 translator semantic tests and 16 documentation link tests passed. git diff --check and the game-data check passed.

GPUs tested: n/a (CPU-only synthetic checks).

AI-assisted.

Checklist

  • Based on current main.
  • One topic.
  • No game data, keys or decryption.
  • No translator rule change.
**@⁠lixonik** on GitHub · 2026-11-24 20:17 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1209) `lixonik:pipeline-linux-isolate-as-limit` → `main` · +57 −3 · 3 files · 1 commits · open Claimed in the coordination issue as [PIPELINE-LINUX-ISOLATE-AS-LIMIT](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14). Refs #636. ### What and why An isolated Vulkan compiler process can still exhaust host memory. That happened in the Linux run reported in #636 even with `--isolate` enabled. On Linux, `vk_pipeline_check --isolate --isolate-address-space-mib N` applies an opt-in `RLIMIT_AS` cap before each worker opens Vulkan. A stricter inherited limit is honored. The parent still runs with its inherited limit and uses the existing failure and bisection paths. The cap includes virtual mappings as well as allocated memory, so users can choose a budget appropriate for their driver. ### Tested - Linux GCC build. A synthetic loader in the real isolation child observed a 64 MiB cap, accepted a 1 MiB mapping and received ENOMEM for an 80 MiB mapping. The same 80 MiB mapping worked with the option omitted. Tested both stricter inherited limits and a requested limit below the inherited one. A syscall trace confirmed that only the child set the limit. - Windows MSVC build. Both checker CTest tests and all 11 checker index tests passed. The Linux-only option exits with a usage error on Windows. - All 6,141 translator semantic tests and 16 documentation link tests passed. `git diff --check` and the game-data check passed. GPUs tested: n/a (CPU-only synthetic checks). AI-assisted. ### Checklist - [x] Based on current `main`. - [x] One topic. - [x] No game data, keys or decryption. - [x] No translator rule change.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:42:58 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 07:08 UTC · original

Reviewed f6c9e7c1: built the tool on the PR and on main and ran the extended CLI battery (passes on the
PR build, fails on main at the new checks as it should), the old battery (passes - no regression) and
the 10 --isolate Python tests (OK on both builds on llvmpipe). Probe: the limit bites in the child
before libvulkan loads (1 MiB), stops setup cleanly at 64 MiB, a max value runs identically to no flag,
the parent classifies the limit-induced death as a setup failure rather than a MODULE CRASH, and a
stricter inherited limit wins with no setrlimit error. No findings.
AI-assisted review.

Recommendation: Merge

**@⁠PierreEbele** on GitHub · 2026-11-25 07:08 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1209#issuecomment-7155529115) Reviewed f6c9e7c1: built the tool on the PR and on main and ran the extended CLI battery (passes on the PR build, fails on main at the new checks as it should), the old battery (passes - no regression) and the 10 `--isolate` Python tests (OK on both builds on llvmpipe). Probe: the limit bites in the child before libvulkan loads (1 MiB), stops setup cleanly at 64 MiB, a max value runs identically to no flag, the parent classifies the limit-induced death as a setup failure rather than a MODULE CRASH, and a stricter inherited limit wins with no setrlimit error. No findings. AI-assisted review. **Recommendation:** Merge
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1209/head:github-bot/gh-1209'
git switch 'github-bot/gh-1209'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1209'
git switch 'github-bot/gh-1209'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1209'
git switch 'github-bot/gh-1209'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1209'
git switch 'main'
git merge --squash 'github-bot/gh-1209'
git switch 'main'
git merge --ff-only 'github-bot/gh-1209'
git switch 'main'
git merge 'github-bot/gh-1209'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.