Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

PerfCollect can only profile privileged Docker processes #85

@mjrousos

Description

@mjrousos

PerfCollect docs say that as long as a developer execs into a Docker container with --privileged, perfcollect should work, even if the container wasn't itself started with --privileged.

Instead, collection immediately stops and I get this error:

root@2ffc1d52bc5f:/app/perfcollect# ./perfcollect collect test
Collection started. Press CTRL+C to stop.

...STOPPED.

Starting post-processing. This may take some time.

zero-sized file (perf.data), nothing to do!
Generating native image symbol files
zero-sized file (perf.data), nothing to do!
libcoreclr.so not found in perf data. Please verify that your .NET Core process is running and consuming CPU.
Saving native symbols
zero-sized file (perf.data), nothing to do!
...FINISHED
Exporting perf.data file
...FINISHED
Compressing trace files
...FINISHED
Cleaning up artifacts
...FINISHED

If the container to be profiled is started initially (at docker run time) with --privileged and --pid=host (as if I were going to be attaching LLDB), then perfcollect collection works as expected.

If perfcollect can be made to work with non-privileged containers, that would be great. Otherwise, we should update the docs to explain the necessary steps for collecting traces in a Docker container.

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