microsoft / microsoft/pai

Add --cap-add=SYS_PTRACE for debug purpose

Open
#5,425 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2.7k
Forks
554
Avg merge
20h 42m
Merged PRs (30d)
14

Description

In some situation, user job will hang and need to attach the process the debug this issue.
Currently, in container, we cannot using gdb to atttach the process due to ptrace not allowed.

Consider to add --cap-add=SYS_PTRACE to allow gdb attach, Need to investigate this capability

https://stackoverflow.com/questions/19215177/how-to-solve-ptrace-operation-not-permitted-when-trying-to-attach-gdb-to-a-pro

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by locating the container configuration that controls Linux capabilities, then verify how adding SYS_PTRACE affects gdb attachment inside a job container. Done means the capability is applied in the intended debug scenario without weakening unrelated containers, with the behavior documented or tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, linux
Domain
infrastructure, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.