Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dotnet): cover dotnet container requirements #42

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wojciechtobis
Copy link

Problem

Agent can't read dotnet application's data and log:
level=debug name=parca-agent ts=2023-07-27T16:23:24.738406352Z caller=cpu.go:316 component=cpu_profiler msg="failed to prefetch process info" pid=605299 err="failed to open proc 605299: stat /proc/605299: no such file or directory"

Changes

According to this documentation the changes are:

  • Add two required variables
  • Add SYS_ADMIN capability

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


wojciechtobis seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Sylfrena Sylfrena requested review from brancz and a team August 1, 2023 04:01
Copy link
Member

@maxbrunet maxbrunet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does not look right to me, failed to open proc 605299: stat /proc/605299: no such file or directory indicate that the process does not exist anymore (has exited) when the agent tries to fetch its info.

PerfCollect requires the SYS_ADMIN capability (in order to run the perf tool), so be sure the container is started with that capability.

We do not want to run perf, but enable the perfmap only, so the symbols (function names) are available to the agent. There should not be anymore requirements than DOTNET_PerfMapEnabled=1. I have tested this example, it works fine, see #18.

That kind of races happens from time to time and you will see these logs. While we are trying to reduce them, they cannot be avoided entirely. If it happens a whole lot, it is possible there could be a bug in the agent and we would appreciate a bug report on the agent repository, but from what you have shared, I do not believe the issue is in the Dotnet app here.

@wojciechtobis
Copy link
Author

@maxbrunet Thanks for your comment, I had a problem with this dotnet demo app during hackathon, and I found this documentation that helps in my case (that's why I thought that creating a PR with working solution is a good idea). Thank you for explanation how it works under the hood.
And you're right, there is already a PR to parca-agent that should fix the root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants