Skip to content

Problems attaching to an already-running (No symbol "__pptop_start_injection" in current context) #4

@sgnn7

Description

@sgnn7

Setup:

  • Docker for Mac
  • Target: Running container with datadog-agent (Python 3.8 embedded process):
docker run --rm -d \
           --name dd-agent \
           --net host \
           -e DD_API_KEY="fake" \
           -v /proc/:/host/proc/:ro \
           -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
           -v /var/run/docker.sock:/var/run/docker.sock:ro \
           -v /opt/datadog-agent/run:/opt/datadog-agent/run:rw \
           datadog/agent

Attachment container (some flags aren't needed - was using this for debugging):

$ docker run --rm -it \
           --name="devenv" \
           --pid="container:dd-agent" \
           --cap-add="SYS_PTRACE" \
           --cap-add="SYS_ADMIN" \
           --privileged \
           --security-opt="seccomp=unconfined" \
           --security-opt="apparmor=unconfined" \
           ubuntu:21.10

Running:

$ apt update && apt install -y gdb python3-pip
$ pip3 install pptop

$ agent_pid=$(ps -ef | grep 'agent run$' | awk '{print $2}')

$ 
pptop $agent_pid
b'No symbol "__pptop_start_injection" in current context.\n'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions