fix: allow bounded Erlang JIT file mappings in broker checks
This commit is contained in:
@@ -419,6 +419,11 @@ checks. Each helper keeps its fixed CPU, memory, process and privilege limits.
|
||||
These operator deadlines do not change student execution budgets. An expired or
|
||||
failed query keeps admission closed.
|
||||
|
||||
The broker helper has a 64 MiB per-file ceiling for Erlang JIT mappings.
|
||||
[OTP 27.3.4](https://github.com/erlang/otp/blob/OTP-27.3.4/erts/emulator/beam/jit/beam_jit_main.cpp)
|
||||
starts with a 32 MiB JIT block. Broker JSON output remains limited to 32 KiB; other
|
||||
operator helpers keep the 16 MiB file ceiling.
|
||||
|
||||
## Observe resources and queues
|
||||
|
||||
`python3.13 -m scripts.release.node_observation` uses a finite read-only Root cap0,
|
||||
|
||||
@@ -21,6 +21,10 @@ PROFILES = {
|
||||
}
|
||||
|
||||
|
||||
# OTP 27 reserves a 32 MiB dual-mapped JIT block before serving CLI queries.
|
||||
FILE_LIMIT_MIB = {"broker-health": 64}
|
||||
|
||||
|
||||
def guarded(name: str) -> None:
|
||||
_, uid, memory, pids, cpu, _ = PROFILES[name]
|
||||
if (
|
||||
@@ -58,7 +62,7 @@ def guarded(name: str) -> None:
|
||||
raise DeliveryError("operator helper/node budgets differ")
|
||||
for key, maximum in (
|
||||
(resource.RLIMIT_CORE, 0),
|
||||
(resource.RLIMIT_FSIZE, 16 * 1024**2),
|
||||
(resource.RLIMIT_FSIZE, FILE_LIMIT_MIB.get(name, 16) * 1024**2),
|
||||
(resource.RLIMIT_NOFILE, 256),
|
||||
(resource.RLIMIT_STACK, 16 * 1024**2),
|
||||
):
|
||||
@@ -133,7 +137,7 @@ def run(
|
||||
"TasksMax": str(pids),
|
||||
"CPUQuota": str(cpu) + "%",
|
||||
"LimitCORE": "0",
|
||||
"LimitFSIZE": "16M",
|
||||
"LimitFSIZE": str(FILE_LIMIT_MIB.get(name, 16)) + "M",
|
||||
"LimitNOFILE": "256",
|
||||
"LimitSTACK": "16M",
|
||||
"RuntimeMaxSec": str(seconds),
|
||||
|
||||
Reference in New Issue
Block a user