Git Product home page Git Product logo

Comments (5)

jeevandev avatar jeevandev commented on May 20, 2024

The setup we have is pyflame runs on the host with appropriate permissions. It attaches to the specified docker instance on that host & does profiling on that using ptrace. @eklitzke Any idea about the issue?

from pyflame.

eklitzke avatar eklitzke commented on May 20, 2024

Are you using the PID from inside the container, or outside the container? If you're running Pyflame from the host you need the outside PID.

from pyflame.

mjbryant avatar mjbryant commented on May 20, 2024

I am attempting to run Pyflame from inside the container, and using the inside-container PID.

from pyflame.

eklitzke avatar eklitzke commented on May 20, 2024

We normally run pyflame from outside the container, since it's easier for us to deploy that way. That said, what you're trying to do should work. I'll probably get a chance to look into this later this week.

Thanks for the detailed bug report!

from pyflame.

eklitzke avatar eklitzke commented on May 20, 2024

Hi Michael,

The issue is that by default Docker images don't have the SYS_PTRACE capability. If you try to use strace or gdb within a Docker container you'll get the same problem. I found a good article describing the issue, as well as how to enable ptrace, here: http://blog.johngoulah.com/2016/03/running-strace-in-docker/

If you are able to strace other processes within a container, but are not able to run Pyflame, then please re-open this and let me know.

In a future release I will try to add code to Pyflame to detect when yama.ptrace_scope is too restrictive, or when the process does not have the SYS_PTRACE capability so that a better error message can be printed to the console.

Cheers, and tell mstop I say hi :-D.

from pyflame.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.