Profiler attach failed (HRESULT: 0x8007007E) from sidecar container in k8s environment

Hello everyone,

We're currently exploring the diagnostics sidecar approach within our k8s environment, and we've encountered an issue regarding attaching to dotnet process using dotMemory/dotTrace. The --profiling-type=Timeline parameter seems to work perfectly fine for dotTrace.

Interestingly, if the dotTrace console profiler is located within the application container, it functions as expected. However, that doesn't work when attempted from the sidecar container.

Here are a few specifics about our k8s deployment:

  • shareProcessNamespace is set to true.
  • There's a common /tmp folder that is shared between both containers within a pod.

For reference, the dotMemory trace log is available here:

Upload id: 2023_08_17_bsRZkG8FMgdQVvrg7DAvQk (file: dotmemory.log)

(You can also find this on YT)

Looking forward to any insights or suggestions from the community. Thank you!


Worth mentioning any dotnet diagnostics tools works just fine attaching to the app process from sidecar


Please follow this article to solve the issue.

The issue was that the profiled process didn't have access to the profiler’s .dll files.

You can solve this by moving the dotTrace command line profiler files to a folder accessible from both containers and running dottrace attach command from this folder.


Please sign in to leave a comment.