Skip to content

[iris/CW] Add SYS_PTRACE to controller pod for profiling on K8s #4416

@ravwojdyla-agent

Description

@ravwojdyla-agent

Describe the bug

iris process profile threads and iris process profile mem fail on the K8s controller with Permission denied (os error 13). py-spy and memray both require ptrace, which is blocked by the controller pod's security context.

Error: Profiling failed: py-spy dump failed: Error: Permission denied (os error 13)

Task pods have SYS_PTRACE in their security context (tasks.py:395), but the controller Deployment does not (controller.py:_build_controller_deployment).

To Reproduce

  1. Deploy Iris on CoreWeave K8s.
  2. Run uv run iris process profile threads or uv run iris process profile mem.
  3. Observe: Permission denied (os error 13).

Expected behavior

Profiling should work on the controller pod, same as it does on task pods.

Additional context

Fix: add SYS_PTRACE capability to the controller container spec in _build_controller_deployment (controller.py:163):

"securityContext": {"capabilities": {"add": ["SYS_PTRACE"]}},

Task pods already have this at tasks.py:395-398.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-generatedCreated by automation/agentbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions