Skip to content

[SDK Sentinel] Synchronize cgroup memory test refresh - #1559

Open
sdk-sentinel-bot wants to merge 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/rust/33573995209-1-cbe405527d43
Open

[SDK Sentinel] Synchronize cgroup memory test refresh#1559
sdk-sentinel-bot wants to merge 1 commit into
temporalio:mainfrom
sdk-sentinel-forks:automation/sdk-sentinel/ci-flake/rust/33573995209-1-cbe405527d43

Conversation

@sdk-sentinel-bot

Copy link
Copy Markdown
Contributor

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 RealSysInfo synchronously 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-required

  • Flake confidence: high
  • Fix confidence: high
  • Value: medium
  • Patch scope: standard — 1 changed file; 1021 B
  • Local reproduction: unavailable — The investigation container lacks Docker access and the memory-limited cgroup files required to exercise the failing path.
  • Regression coverage: not-run — The modified existing test compiled and its skip path passed, but its cgroup assertion requires target CI.
  • Unchanged baseline (Cargo formatting, linting, and checks) — passed
  • Independent candidate (Cargo formatting, linting, and checks) — passed

Investigator-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

  • Per merge CI / cgroup tests on ubuntu-latest in the 512 MiB Ubuntu container

Residual risks

  • The actual constrained cgroup assertion was not exercised locally.
  • Kernel cgroup statistic behavior remains covered only by the target CI environment.

Automation provenance

If this finding should not be fixed, apply the sdk-sentinel:false-positive label and close the PR. Sentinel will suppress the finding until its affected source changes.

SDK Sentinel recurrence history

  • Unique failed CI run attempts: 1
  • First occurrence: 2026-09-01 00:42 UTC
  • Latest occurrence: 2026-09-01 00:42 UTC
  • Recent occurrences:

@sdk-sentinel-bot
sdk-sentinel-bot requested a review from a team as a code owner September 2, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant