Skip to content

core: a process joining between the cgroup member check and cgroup.kill is killed #258

Closed

Description

@ElbertePlinio

Found while fixing #250 (PR #254).

destroyCgroupMembers in packages/core/src/containment.ts checks the cgroup members and then writes cgroup.kill. Nothing stops a process from joining the cgroup in between. A forced demo moved another scope's supervisor into the cgroup in that gap. The cleanup killed it even though it carried a different token, and still reported confirmed: true with signaled: [].

This is harmless while scope IDs are unique, because real session IDs are desk-<8 random hex>. It matters only if two scopes can ever share a cgroup directory. Before PR #254, the containment tests did that with fixed IDs.

  • Decide whether destroy should freeze the cgroup or recheck members after the kill
  • Add a test for a member that joins between the check and the kill

Activity

  1. added
    bug
    on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions