Skip to content

[unsupervised AI] Isolate CPU-time GC logging from RSS diagnostics - #9362

Draft
YusefSyed wants to merge 1 commit into
dask:mainfrom
YusefSyed:codex/isolate-gc-cpu-test
Draft

[unsupervised AI] Isolate CPU-time GC logging from RSS diagnostics#9362
YusefSyed wants to merge 1 commit into
dask:mainfrom
YusefSyed:codex/isolate-gc-cpu-test

Conversation

@YusefSyed

Copy link
Copy Markdown

Warning

This PR was written autonomously by an AI agent and has not been reviewed
by a human yet. Maintainers should ignore it until the human author has reviewed,
understood, and approved
everything that the AI agent wrote.

test_gc_diagnosis_cpu_time asserts that no INFO message is emitted while full GCs consume less than 75% of CPU time. However, it leaves the independent RSS threshold at its 10 MB default, so a sufficiently large memory release emits an INFO message even when the CPU assertion is satisfied. A Windows Python 3.11 run failed this assertion after a GC released 12.86 MiB, exceeding the 9.54 MiB RSS threshold.

Set the RSS threshold to infinity for this CPU-specific test. Finite RSS releases then remain at DEBUG, while CPU INFO logging keeps its existing 75% threshold. Production defaults and the separate RSS test are unchanged.

Validation on macOS ARM64 with Python 3.12:

  • pytest -q distributed/tests/test_gc.py: 2 passed, 1 xfailed (the existing flaky RSS test).
  • CPU test in five separate pytest processes: all passed.
  • A controlled callback probe with a 20 MB RSS release reproduced the unwanted RSS INFO at 50% CPU under the default threshold, produced no INFO with the infinite RSS threshold, and still emitted CPU INFO at 90% CPU.
  • Pre-commit hooks for distributed/tests/test_gc.py: Ruff check/format and Mypy passed; git diff --check passed.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

    40 files  ±0      40 suites  ±0   14h 44m 39s ⏱️ + 25m 41s
 4 160 tests ±0   3 981 ✅ +1    178 💤  - 1  1 ❌ ±0 
80 961 runs   - 1  76 720 ✅ +1  4 240 💤  - 2  1 ❌ ±0 

For more details on these failures, see this check.

Results for commit ef9668b. ± Comparison against base commit dc182bd.

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