Skip to content

fix(cgroup): skip control files when sweeping stale lineage sessions - #1802

Merged
SequeI merged 1 commit into
mainfrom
cgroupFixDir
Sep 7, 2026
Merged

SequeI merged 1 commit into
mainfrom
cgroupFixDir

Conversation

@SequeI

@SequeI SequeI commented Sep 7, 2026

Copy link
Copy Markdown
Member

Linked Issue

Closes #1793

Summary

teardown_session_tree read_dir a session cgroup dir and rmdir every entry, including the cgroups own control/pseudo-files (memory.events, pids.peak, io.latency, ...), not just the cmd_* child cgroups it meant to remove. rmdir on those files fails with ENOTDIR, logging spurious "could not remove cgroup leaf" warnings on every stale-session sweep.

Filter to cmd_-prefixed entries only, matching CMD_PREFIX used elsewhere in this file.

Test Plan

Checklist

  • An issue exists and is linked above
  • All commits are signed-off, using DCO
  • All new code follows the project's coding standards (CLAUDE.md) and is covered by tests
  • Public-facing changes are paired with documentation updates
  • If this PR introduces a major feature, capability, or security-relevant change, a corresponding NEP has been opened or accepted and is linked

teardown_session_tree read_dir a session cgroup dir and rmdir every
entry, including the cgroups own control/pseudo-files (memory.events,
pids.peak, io.latency, ...), not just the cmd_* child cgroups it meant
to remove. rmdir on those files fails with ENOTDIR, logging spurious
"could not remove cgroup leaf" warnings on every stale-session sweep.

Filter to cmd_-prefixed entries only, matching CMD_PREFIX used
elsewhere in this file.

Signed-off-by: Aleksy Siek <aleksy@nolabs.ai>
@github-actions github-actions Bot added bug Something isn't working nono-cli size/small labels Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

PR Review Summary

Size

Metric Value
Lines added +9
Lines removed -1
Total changed 10
Classification Small (< 50 lines)

Affected crates

  • crates/nono-cli — CLI changes. Verify argument parsing, flag documentation, and UX behaviour across supported platforms.

Blast radius — Contained

This PR touches: source code


Updated automatically on each push to this PR.

@SequeI

SequeI commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

@icydipity let me know if this works please! Worked on my repro

@nogent-nolabs-ai nogent-nolabs-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nogent code review

No blocking issues found.

Findings: none flagged in scope.

Automated code + security review. CI already covers clippy, rustfmt, tests, cargo-audit and commit-lint.

@SequeI
SequeI merged commit a7e4ed1 into main Sep 7, 2026
18 checks passed
@icydipity

Copy link
Copy Markdown

@icydipity let me know if this works please! Worked on my repro

Yes, this worked. Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working nono-cli size/small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(cgroup): teardown fails on cgroup control files (pids.peak: Not a directory (os error 20))

3 participants