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

Open
opened 2026-11-26 20:20:34 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1209
Author: @lixonik
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: pipeline-linux-isolate-as-limit


📝 Commits (1)

  • f6c9e7c Limit Linux pipeline isolation worker address space

📊 Changes

3 files changed (+57 additions, -3 deletions)

View changed files

📝 docs/pipeline_check.md (+6 -1)
📝 runtime/test/check_vk_pipeline_cli.cmake (+10 -0)
📝 runtime/test/vk_pipeline_check.cpp (+41 -2)

📄 Description

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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1209 **Author:** [@lixonik](https://github.com/lixonik) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `pipeline-linux-isolate-as-limit` --- ### 📝 Commits (1) - [`f6c9e7c`](https://github.com/ubiquitarianism/leonida/commit/f6c9e7c1baa5be39343d169c1164cab576bc6773) Limit Linux pipeline isolation worker address space ### 📊 Changes **3 files changed** (+57 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/pipeline_check.md` (+6 -1) 📝 `runtime/test/check_vk_pipeline_cli.cmake` (+10 -0) 📝 `runtime/test/vk_pipeline_check.cpp` (+41 -2) </details> ### 📄 Description Claimed in the coordination issue as [PIPELINE-LINUX-ISOLATE-AS-LIMIT](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7143205150). 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1241
No description provided.