[SDK Sentinel] Synchronize cgroup memory test refresh - #1559
Open
sdk-sentinel-bot wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Caution
This PR contains untrusted AI-generated code. Do not approve or run CI until a maintainer has reviewed the diff. SDK Sentinel verified that GitHub Actions remained approval-gated with zero executable jobs when this PR was opened.
Summary
Stabilize the Linux cgroup memory test. The [last known passing main run](https://github.com/temporalio/sdk-rust/actions/runs/33421872109) preceded the [first captured cgroup failure](https://github.com/temporalio/sdk-rust/actions/runs/33454605177).
Root cause
After allocating memory, the test slept for 200 ms and assumed the background sampler had refreshed. On the failing run it retained the pre-allocation sample, reporting near-zero usage instead of approximately half the cgroup limit.
Fix
Refresh
RealSysInfosynchronously after allocation so the assertion observes the intended state without depending on background-thread scheduling.Validation
The trusted unchanged baseline and canonical candidate validator passed. The focused unit-test harness also compiled and passed, but the cgroup-gated assertion could not run locally because Docker and the target memory-limited cgroup are unavailable. The 512 MiB cgroup CI job is required.
Validation status:
ci-validation-requiredhighhighmediumstandard— 1 changed file; 1021 Bunavailable— The investigation container lacks Docker access and the memory-limited cgroup files required to exercise the failing path.not-run— The modified existing test compiled and its skip path passed, but its cgroup assertion requires target CI.Cargo formatting, linting, and checks) — passedCargo formatting, linting, and checks) — passedInvestigator-run checks
CARGO_BUILD_JOBS=2 cargo test cgroup_realsysinfo_uses_cgroup_limits_mem— failed; 1 attempt(s). Stopped during unavailable toolchain bootstrap before test execution; not counted as validation.RUSTUP_TOOLCHAIN=1.94-x86_64-unknown-linux-gnu CARGO_NET_OFFLINE=true CARGO_BUILD_JOBS=2 cargo test cgroup_realsysinfo_uses_cgroup_limits_mem— failed; 1 attempt(s). zstd-sys encountered a sandbox EPERM before the changed crate compiled.RUSTUP_TOOLCHAIN=1.94-x86_64-unknown-linux-gnu CARGO_NET_OFFLINE=true CARGO_BUILD_JOBS=2 ZSTD_SYS_USE_PKG_CONFIG=1 cargo test cgroup_realsysinfo_uses_cgroup_limits_mem— passed; 1 attempt(s). The changed test compiled and the harness passed; the cgroup-gated body skipped because the local environment lacks the target cgroup.RUSTUP_DIST_SERVER=\[external URL removed\] RUSTUP_UPDATE_ROOT=\[external URL removed\] .ci-flake-runtime/input/validate.sh— passed; 1 attempt(s). Nightly formatting, cargo lint, cargo test-lint, and cargo check passed.Required target CI
Residual risks
Automation provenance
37d747ddaacc0b35d6bf98089a21c7a0e37bbbc5If this finding should not be fixed, apply the
sdk-sentinel:false-positivelabel and close the PR. Sentinel will suppress the finding until its affected source changes.SDK Sentinel recurrence history
2026-09-01 00:42 UTC2026-09-01 00:42 UTC