Try to use dottrace inside an ephemeral container in kub environment and cannot profile a running PID

Hello ! 

 

I try to profile some of my app (runtime dotnet 9 ) that run inside a Kubernetes Cluster.

In order to do it in a transparent way, i build a special debug container that contains dottrace. 

I spawn this container as an ephemeral container by using : 

 

kubectl debug -it --image=customdebug --image-pull-policy=Never --target=webapp -c debug  --profile=sysadmin webapp

If i do a ps aux : 

I see my running dotnet application.

Bur when i try to launch timeline profiling with : 

 ./tools/dottrace attach 7 --save-to=./../../tmp/snapshot.dtp --timeout=20s --profiling-type=Timeline --overwrite

 i get the following error : 

Unable to find the process with the PID 7: This might not be a .NET process; its runtime version doesn't support attaching, or administrative rights are required to attach to this process. If you intentionally want to attach the profiler to a native process, note that it's possible only with the 'Timeline' profiling type and only on Windows.
Currently running processes:

I do not understand what is going wrong here. 
 

I try also by removing the shareProcessNamespace:true in the podspec and rely on --target for pid namespace sharing but get hte same error : 

 

Here are the content of the log file it it helps : 



20:55:48.600 |T|                               | :1                 | dotTrace command-line profiler 2025.1.4 build 777.0.20250617.82607. Copyright (C) 2025 JetBrains s.r.o.
20:55:48.603 |T|                               | :1                 | Environment: Linux, NetCore, Arm64
20:55:48.605 |T| IProperty                     | :1                 | New property Boolean::Threading.IsRecurringActivityAllowed initialized with value False.
20:55:48.606 |V| JetDispatcher                 | :1                 | Thread :1 pwned.
20:55:48.607 |V| JetDispatcher                 | :1                 | Thread :1 created a marshaller.
20:55:48.608 |T| IProperty                     | :1                 | New property Boolean::ReentrancyAlarm.IsApplicationActive initialized with value True.
20:55:48.609 |T| IProperty                     | :1                 | New property DateTime::ReentrancyAlarm.NearestDeadline initialized with value “01/01/0001 00:00:00”.
20:55:48.613 |T| IProperty                     | :1                 | New property Boolean::JetDispatcherIsAsyncBehaviorAllowed initialized with value True.
20:55:48.614 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=0]
20:55:48.614 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=0]
20:55:48.614 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.614 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=0]
20:55:48.614 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=0]
20:55:48.614 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.614 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=0]
20:55:48.614 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=0]
20:55:48.614 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.614 |T| JetDispatcher                 | :1                 | Queueing “Signal.FlowDeferredInto”.
20:55:48.615 |T| JetDispatcher                 | :1                 | BeginInvokeCore: calling Marshaller.BeginInvoke after enqueueing “Signal.FlowDeferredInto” to schedulle processing of 1 items in queue (1 queued since last execution). Conditions: (True)(False)(False).
20:55:48.615 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=0]
20:55:48.615 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=0]
20:55:48.615 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.615 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=0]
20:55:48.615 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=0]
20:55:48.615 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.615 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=0]
20:55:48.615 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=0]
20:55:48.615 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.616 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=0]
20:55:48.616 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=0]
20:55:48.616 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.616 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=0]
20:55:48.616 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=0]
20:55:48.616 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.616 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=0]
20:55:48.616 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=0]
20:55:48.616 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.617 |T| GroupingEventHost             | :1                 | [GEH] Added GroupingEvent(WatchdogEvent interval 00:00:16), now 1, total 1.
20:55:48.617 |T| GroupingEventHost             | :1                 | [GEH] Added GroupingEvent(WatchdogEvent interval 00:00:16), now 1, total 1.
20:55:48.618 |T| IProperty                     | :1                 | New property Boolean::ContentModelReadWriteLock::BackgroundReadersAllowedPolite initialized with value False.
20:55:48.618 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=0]
20:55:48.618 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=0]
20:55:48.618 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.618 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=0]
20:55:48.618 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=0]
20:55:48.618 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.618 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=0]
20:55:48.618 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=0]
20:55:48.618 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.618 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=0]
20:55:48.618 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=0]
20:55:48.618 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.619 |T| IProperty                     | :1                 | Boolean::ContentModelReadWriteLock::BackgroundReadersAllowedPolite: False -> True
20:55:48.621 |V| JetScheduler                  | JetPool Manager:5  | Thread 'JetPool Manager' started
20:55:48.621 |V| ShellLocks                    | :1                 | ShellLocks.Task.Scheduler.Implementation is <NULL>. Use $JetBrains.Application.Threading.Tasks.Scheduler.JetScheduler
20:55:48.622 |V| ThreadManager                 | :1                 | << (Opening) Request for STA Executor: ShellLocks #1.
20:55:48.626 |V| ServiceAgentProvider          | :1                 | Agent feature UseAttachHelper: False
20:55:48.626 |V| ServiceAgentProvider          | :1                 | Agent feature UseWinRtHelper: False
20:55:48.626 |V| ServiceAgentProvider          | :1                 | Agent feature SuppressProcessListPrefetch: False
20:55:48.626 |V| ServiceAgentProvider          | :1                 | Agent feature SuppressWinRtPackagePrefetch: False
20:55:48.626 |V| ServiceAgentProvider          | :1                 | Agent feature ForcePrefetch: False
20:55:48.626 |V| ServiceAgentProvider          | :1                 | Agent feature ForceProcessMetrics: False
20:55:48.626 |V| ServiceAgentProvider          | :1                 | Agent feature SuppressProcessMetrics: False
20:55:48.631 |V| EnvironmentVariablesUtil      | :1                 | Reading environment variable JET_ROAMING_APPDATA_DIR (no PID suffix).
20:55:48.631 |V| EnvironmentVariablesUtil      | :1                 | The environment variable JET_ROAMING_APPDATA_DIR (no PID suffix) has no value.
20:55:48.631 |V| EnvironmentVariablesUtil      | :1                 | Reading environment variable JET_ROAMING_APPDATA_DIR_PID_00000101 (PID-specific).
20:55:48.631 |V| EnvironmentVariablesUtil      | :1                 | The environment variable JET_ROAMING_APPDATA_DIR_PID_00000101 (PID-specific) has no value.
20:55:48.631 |V| EnvironmentVariablesUtil      | :1                 | No environment variables for additional packages are set.
20:55:48.636 |T| UpdatesManager                | :1                 | Launching the updates check (ConsoleUpdatesDescriptor) in a separate thread
20:55:48.639 |V| MachineIdManager              | :6                 | Failed to retrieve MachineId
20:55:48.652 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.SysTools methods=(7pcs)[SelfCheckCall, SelfCheckLongCall, AdjustPrivilege, GetPlatform, GetOSVersion, GetIsElevatedProcess, GetIsUserInteractive]
20:55:48.652 |T| BaseServiceRemotable          | :1                 | AssertFields type=JetBrains.Profiler.Windows.SysTools.SysTools fields=(34pcs)[AttachEnvironmentTools, AttachTools, BrowserTools, CleanupTools, CoreClrTools, DirectoryTools, EverythingEnvironmentTools, EnvironmentTools, EtwTools, EventPipeTools, EventTools, EverythingTools, ExecutableTools, FileCacheTools, FileTools, FileStorageTools, FrameworkTools, IISExpressTools, IISTools, ArchitectureTools, MetroTools, CommunicationTools, ProcessTools, RegistryHiveTools, RunTools, SemaphoreTools, TestTools, TransparentIntegrationTools, WcfHostTools, MonoTools, WindowsServiceEnvironmentTools, WindowsServiceTools, LifetimeTools, ProcessHelperTools]
20:55:48.652 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.AttachEnvironmentTools methods=(3pcs)[CleanAllProcessesEnvironment, CleanProcessEnvironment, UpdateProcessEnvironment]
20:55:48.653 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.AttachTools methods=(11pcs)[get_UseAttachHelper, set_UseAttachHelper, get_ProcessMetricsMode, set_ProcessMetricsMode, Prepare, SetupPrefetch, HasExecutable, SetExecutable, AttachProfiling, GetProcessesToAttach2, GetProcessesToAttach]
20:55:48.653 |V| AttachTools                   | :1                 | Create process list: native=False, monoVm=False
20:55:48.653 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.Tools.BrowserTools methods=(3pcs)[GetInternetBrowserInfos, GetDefaultInternetBrowserInfo, GetBrowserInfos]
20:55:48.653 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.Tools.CleanupTools methods=(3pcs)[BeginCleanup, PullCleanupEvent, EndCleanup]
20:55:48.653 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.CoreClrTools methods=(1pc)[TryGetDotNetExecutable]
20:55:48.653 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.DirectoryTools methods=(11pcs)[GetGlobalTemp, GetTemp, CreateGlobalTempDirectory, CreateUserTempDirectory, GetInfo, ExistsDirectory, CreateDirectory, DeleteDirectory, GetChildDirectories, GetChildFiles, CreateSymbolicLink]
20:55:48.653 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.EverythingEnvironmentTools methods=(3pcs)[CleanAllEverythingEnvironment, CleanEverythingEnvironment, UpdateEverythingEnvironment]
20:55:48.653 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.Tools.EnvironmentTools methods=(5pcs)[RegisterCore, UnregisterCore, GetUserTempDirs, GetEnvironmentVariables, GetSymbolPaths]
20:55:48.653 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.Tools.EtwTools methods=(5pcs)[IsSupported, PrepareToStart, Start, Term, GetLogDirectories]
20:55:48.653 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.EventPipeTools methods=(3pcs)[PrepareToStart, IsAllowed, StartCollector]
20:55:48.654 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.EventTools methods=(10pcs)[Event_Create, Event_Open, Event_Has, Event_WaitOne, Event_WaitOne, Event_WaitOne, Event_Set, Event_Reset, Event_Touch, Event_Close]
20:55:48.654 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.ExecutableTools methods=(5pcs)[IsMacBundle, TryGetExecutableFromMacBundle, IsValidExecutable, GetPathToExecutable, IsSandboxedExecutable]
20:55:48.654 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.FileCacheTools methods=(5pcs)[GrantFile_BuiltinUsers_ReadAndExecute, GrantFile_AllAppPackages_ReadAndExecute, GrantDirectory_BuiltinUsers_ReadAndExecute, GrantDirectory_AllAppPackages_ReadAndExecute, GrantDirectory_BuiltinUsers_Modify]
20:55:48.654 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.FileTools methods=(7pcs)[CreateGlobalTempFile, CreateUserTempFile, GetFileInfo, ExistsFile, DeleteFile, CopyFile, MoveFile]
20:55:48.654 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.FileStorageTools methods=(3pcs)[AddFile, GetFileName, DeleteFile]
20:55:48.654 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.FrameworkTools methods=(3pcs)[GetRuntimeDirectory, GetInstalledRuntimeVersions, GetInstalledFrameworkVersions]
20:55:48.654 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.IISExpressTools methods=(2pcs)[GetIISExpressSites, GetIISExpresses]
20:55:48.655 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.IISTools methods=(1pc)[GetIISServiceName]
20:55:48.655 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.Tools.ArchitectureTools methods=(4pcs)[GetFolderPath, ExpandForCurrentUser, GetToolsetArchitecture, GetArchitectures]
20:55:48.655 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.MetroTools methods=(14pcs)[get_UseWinRtHelper, set_UseWinRtHelper, HasExecutable, SetExecutable, IsSupported, GetPackageFullName, PrepareAttachProfiling, CleanAttachProfiling, PrepareStartProfiling, CleanStartProfiling, RunProfiling, GetMetroPackagesForCurrentUser, PrepareEverythingProfiling, CleanEverythingProfiling]
20:55:48.655 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.CommunicationTools methods=(17pcs)[GetFreeTcpListenPort, CheckForTcpListenPort, GetProcessForTcpListenPort, GetPortOwningProcess, SocketListener_Create, NamedPipeListener_Create, Listener_GetEndPoint, Listener_GetNewStreamIds, Listener_GetNewStreamIds, Listener_Touch, Listener_Close, Listener_InjectProxyStreamFactory, Channel_HasDataToRead, Channel_ReceiveCommand, Channel_SendCommand, Channel_Touch, Channel_Close]
20:55:48.657 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.ProcessTools methods=(20pcs)[ExecuteBrowser, HasByProcessName, HasByProcessName, KillByProcessName, KillByProcessName, Process_GetById, Process_Start, Process_Resume, Process_WaitForExit, Process_WaitForExit, Process_WaitForExit, Process_Kill, Process_KillTree, Process_CloseMainWindow, Process_CloseAllWindows, Process_HasExited, Process_ExitCode, Process_PathToExecutable, Process_Touch, Process_Close]
20:55:48.657 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.RunTools methods=(4pcs)[RunListServices, RunUninstallService, RunInstallService, RunConsoleExecutable]
20:55:48.657 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.SemaphoreTools methods=(10pcs)[Semaphore_Create, Semaphore_Open, Semaphore_Has, Semaphore_WaitOne, Semaphore_WaitOne, Semaphore_WaitOne, Semaphore_Release, Semaphore_Release, Semaphore_Touch, Semaphore_Close]
20:55:48.657 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.TestTools methods=(3pcs)[SelfCheckCall, SelfCheckLongCall, RootSelfCheck]
20:55:48.657 |T| BaseServiceRemotable          | :1                 | AssertFields type=JetBrains.Profiler.Windows.SysTools.TestTools fields=(1pc)[LeafTestTools]
20:55:48.657 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.LeafTestTools methods=(3pcs)[SelfCheckCall, SelfCheckLongCall, RootSelfCheck]
20:55:48.657 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.Tools.TransparentIntegrationTools methods=(5pcs)[MakeIntegrationCoreInfo, CleanUserIntegration, CleanGlobalIntegration, SetUserIntegration, SetGlobalIntegration]
20:55:48.657 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.WcfHostTools methods=(1pc)[GetWcfHosts]
20:55:48.657 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.MonoTools methods=(2pcs)[GetMonoRuntimes, GetFirstSuitableMonoRuntime]
20:55:48.657 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.WindowsServiceEnvironmentTools methods=(3pcs)[CleanAllWindowsServicesEnvironment, CleanWindowsServiceEnvironment, UpdateWindowsServiceEnvironment]
20:55:48.657 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.LifetimeTools methods=(3pcs)[LifetimeDefinition_Create, LifetimeDefinition_TerminateAndClose, LifetimeDefinition_Touch]
20:55:48.657 |T| BaseServiceRemotable          | :1                 | AssertMethods type=JetBrains.Profiler.Windows.SysTools.ProcessHelperTools methods=(2pcs)[HasExecutable, SetExecutable]
20:55:48.659 |V| SysTools                      | :1                 | SysTools location=Local res=created
20:55:48.660 |V| AttachTools                   | :1                 | Process list current params is different from given. Reinit.
20:55:48.660 |V| AttachTools                   | :1                 | Create process list: native=False, monoVm=True
20:55:48.665 |T| ClientUtil                    | :6                 | Set SecurityProtocol to Tls11, Tls12, old SystemDefault by SecureWebClient
20:55:48.675 |V| LocalHost_Vifox               | :1                 | GetProcessesToAttach duration: 00:00:00.0151284
20:55:48.675 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=1]
20:55:48.675 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=1]
20:55:48.675 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.678 |E| ConsoleProfilerRunner         | :1                 | Unable to find the process with the PID 1: This might not be a .NET process; its runtime version doesn't support attaching, or administrative rights are required to attach to this process. If you intentionally want to attach the profiler to a native process, note that it's possible only with the 'Timeline' profiling type and only on Windows.
--- EXCEPTION #1/1 [LoggerException]
Message = “
 Unable to find the process with the PID 1: This might not be a .NET process; its runtime version doesn't support attaching, or administrative rights are required to attach to this process. 
 If you intentionally want to attach the profiler to a native process, note that it's possible only with the 'Timeline' profiling type and only on Windows.
”
StackTraceString = “
 at JetBrains.Util.ILoggerEx.ErrorOuterWorld(ILogger logger, String message) in ErrorOuterWorld.il:line IL_0018 mvid 01F5
    at JetBrains.dotTrace.ConsoleProfiler.Profiler.ConfigurationBuilder.NothingToAttachArgumentError(List`1 processes, String error) in NothingToAttachArgumentError.il:line IL_0000 mvid B582
    at JetBrains.dotTrace.ConsoleProfiler.Profiler.ConfigurationBuilder.GetProcessToAttach(List`1 processes, IProcessSpec attachProcessSpec, Boolean isNativeProfilingSupported) in GetProcessToAttach.il:line IL_0027 mvid B582
    at JetBrains.dotTrace.ConsoleProfiler.Profiler.ConfigurationBuilder.BuildConfigurationFromCommands(IDefaultModeCommand commandLineModeOptions) in BuildConfigurationFromCommands.il:line IL_0276 mvid B582
    at JetBrains.dotTrace.ConsoleProfiler.Profiler.RunApplication..ctor(ILogger logger, ConfigurationBuilder configurationBuilder, ConsoleProfilerRunner runner, ConsoleApplicationExitCode exitCodeController, CompactConsoleLogger consoleLogger, IProfileOptions options)
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
    at System.Reflection.MethodBaseInvoker.InvokeWithManyArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in InvokeWithManyArgs.il:line IL_0243 mvid EE92
    at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in Invoke.il:line IL_0082 mvid EE92
    at BeatyBit.Armature.CreateByReflection.Process(IBuildSession buildSession) in Process.il:line IL_0057 mvid FD33
    at BeatyBit.Armature.Core.BuildSession.BuildActionProcess(IBuildAction buildAction, IBuildSession buildSession) in BuildActionProcess.il:line IL_0020 mvid A228
    at BeatyBit.Armature.Core.BuildSession.BuildUnit(Stack stack, WeightedBuildActionBag buildActionBag, Boolean engageParentBuilders) in BuildUnit.il:line IL_002F mvid A228 or BuildUnit.il:line IL_0054 mvid A228
    at BeatyBit.Armature.Core.BuildSession.<>c__DisplayClass7_0.<BuildUnit>b__0(Stack stack, WeightedBuildActionBag bag) in BuildSession.il:line IL_0000 mvid A228
    at BeatyBit.Armature.Core.BuildSession.Build[T](UnitId unitId, Func`3 build) in Build.il:line IL_00E1 mvid A228
    at BeatyBit.Armature.Core.BuildSession.BuildUnit(UnitId unitId, Boolean engageParentBuilders) in BuildUnit.il:line IL_002F mvid A228 or BuildUnit.il:line IL_0054 mvid A228
    at BeatyBit.Armature.Core.Builder.BuildUnit(UnitId unitId, IBuildStackPattern auxBuildStackPatternTree) in BuildUnit.il:line IL_0013 mvid A228
    at BeatyBit.Armature.BuilderExtension.Build[T](Builder builder, Object tag, Object[] arguments) in Build.il:line IL_0000 mvid FD33 or Build.il:line IL_0028 mvid FD33
    at JetBrains.dotTrace.ConsoleProfiler.ProfilerProgram.<>c__DisplayClass0_0.<MainImpl>b__0(Builder builder) in ProfilerProgram.il:line IL_0121 mvid B582
    at JetBrains.dotTrace.CommandLine.Common.CltHelpers.<>c__DisplayClass3_0`3.<RunApplicationCore>b__0() in CltHelpers.il:line IL_0000 mvid CA34
    at JetBrains.Util.ILoggerEx.Catch(ILogger logger, Action action, ExceptionOrigin origin, LoggingLevel loggingLevel) in Catch.il:line IL_0000 mvid 01F5 or Catch.il:line IL_0060 mvid 01F5
    at JetBrains.Util.ILoggerEx.Catch(ILogger logger, Action action, ExceptionOrigin origin) in Catch.il:line IL_0000 mvid 01F5 or Catch.il:line IL_0060 mvid 01F5
    at JetBrains.Util.ILoggerEx.CatchAsOuterDataError(ILogger logger, Action action) in CatchAsOuterDataError.il:line IL_0000 mvid 01F5
    at JetBrains.dotTrace.CommandLine.Common.CltHelpers.RunApplicationCore[TNewFormat,TDeprecatedFormat,TResult](String commandLine, String greetings, Action`1 mainMethod) in RunApplicationCore.il:line IL_00B8 mvid CA34
    at JetBrains.dotTrace.CommandLine.Common.CltHelpers.<>c__DisplayClass4_0`3.<RunApplication>b__0(String[] _) in CltHelpers.il:line IL_0000 mvid CA34
    at JetBrains.Util.Processes.DotNetGlobalToolsRunnerHelpers.RerunCltIfNeeded(Func`2 mainMethod, FileSystemPath mainModuleModulePath, String[] args, String runtimeConfigSuffix, Action`1 errorMessageLogger, Int32 failureReturnCode) in RerunCltIfNeeded.il:line IL_003D mvid 2BFE
    at JetBrains.dotTrace.CommandLine.Common.CltHelpers.RunApplication[TNewFormat,TDeprecatedFormat,TResult](String[] args, String greetings, Action`1 mainMethod) in RunApplication.il:line IL_0059 mvid CA34
    at JetBrains.dotTrace.ConsoleProfiler.ProfilerProgram.MainImpl(String[] args) in MainImpl.il:line IL_003E mvid B582
    at JetBrains.dotTrace.ConsoleProfiler.ProfilerProgram.ProfilerProgramEntryPoint.Main(String[] args) in Main.il:line IL_002C mvid B582
”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
HResult = COR_E_APPLICATION=80131600
20:55:48.701 |E| ConsoleProfilerRunner         | :1                 | Currently running processes:
--- EXCEPTION #1/1 [LoggerException]
Message = “Currently running processes:”
StackTraceString = “
 at JetBrains.Util.ILoggerEx.ErrorOuterWorld(ILogger logger, String message) in ErrorOuterWorld.il:line IL_0018 mvid 01F5
    at JetBrains.dotTrace.ConsoleProfiler.Profiler.ConfigurationBuilder.PrintRunningProcess(String header, List`1 processes, Boolean showDotNetOnly) in PrintRunningProcess.il:line IL_0006 mvid B582
    at JetBrains.dotTrace.ConsoleProfiler.Profiler.ConfigurationBuilder.NothingToAttachArgumentError(List`1 processes, String error) in NothingToAttachArgumentError.il:line IL_000C mvid B582
    at JetBrains.dotTrace.ConsoleProfiler.Profiler.ConfigurationBuilder.GetProcessToAttach(List`1 processes, IProcessSpec attachProcessSpec, Boolean isNativeProfilingSupported) in GetProcessToAttach.il:line IL_0027 mvid B582
    at JetBrains.dotTrace.ConsoleProfiler.Profiler.ConfigurationBuilder.BuildConfigurationFromCommands(IDefaultModeCommand commandLineModeOptions) in BuildConfigurationFromCommands.il:line IL_0276 mvid B582
    at JetBrains.dotTrace.ConsoleProfiler.Profiler.RunApplication..ctor(ILogger logger, ConfigurationBuilder configurationBuilder, ConsoleProfilerRunner runner, ConsoleApplicationExitCode exitCodeController, CompactConsoleLogger consoleLogger, IProfileOptions options)
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
    at System.Reflection.MethodBaseInvoker.InvokeWithManyArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in InvokeWithManyArgs.il:line IL_0243 mvid EE92
    at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in Invoke.il:line IL_0082 mvid EE92
    at BeatyBit.Armature.CreateByReflection.Process(IBuildSession buildSession) in Process.il:line IL_0057 mvid FD33
    at BeatyBit.Armature.Core.BuildSession.BuildActionProcess(IBuildAction buildAction, IBuildSession buildSession) in BuildActionProcess.il:line IL_0020 mvid A228
    at BeatyBit.Armature.Core.BuildSession.BuildUnit(Stack stack, WeightedBuildActionBag buildActionBag, Boolean engageParentBuilders) in BuildUnit.il:line IL_002F mvid A228 or BuildUnit.il:line IL_0054 mvid A228
    at BeatyBit.Armature.Core.BuildSession.<>c__DisplayClass7_0.<BuildUnit>b__0(Stack stack, WeightedBuildActionBag bag) in BuildSession.il:line IL_0000 mvid A228
    at BeatyBit.Armature.Core.BuildSession.Build[T](UnitId unitId, Func`3 build) in Build.il:line IL_00E1 mvid A228
    at BeatyBit.Armature.Core.BuildSession.BuildUnit(UnitId unitId, Boolean engageParentBuilders) in BuildUnit.il:line IL_002F mvid A228 or BuildUnit.il:line IL_0054 mvid A228
    at BeatyBit.Armature.Core.Builder.BuildUnit(UnitId unitId, IBuildStackPattern auxBuildStackPatternTree) in BuildUnit.il:line IL_0013 mvid A228
    at BeatyBit.Armature.BuilderExtension.Build[T](Builder builder, Object tag, Object[] arguments) in Build.il:line IL_0000 mvid FD33 or Build.il:line IL_0028 mvid FD33
    at JetBrains.dotTrace.ConsoleProfiler.ProfilerProgram.<>c__DisplayClass0_0.<MainImpl>b__0(Builder builder) in ProfilerProgram.il:line IL_0121 mvid B582
    at JetBrains.dotTrace.CommandLine.Common.CltHelpers.<>c__DisplayClass3_0`3.<RunApplicationCore>b__0() in CltHelpers.il:line IL_0000 mvid CA34
    at JetBrains.Util.ILoggerEx.Catch(ILogger logger, Action action, ExceptionOrigin origin, LoggingLevel loggingLevel) in Catch.il:line IL_0000 mvid 01F5 or Catch.il:line IL_0060 mvid 01F5
    at JetBrains.Util.ILoggerEx.Catch(ILogger logger, Action action, ExceptionOrigin origin) in Catch.il:line IL_0000 mvid 01F5 or Catch.il:line IL_0060 mvid 01F5
    at JetBrains.Util.ILoggerEx.CatchAsOuterDataError(ILogger logger, Action action) in CatchAsOuterDataError.il:line IL_0000 mvid 01F5
    at JetBrains.dotTrace.CommandLine.Common.CltHelpers.RunApplicationCore[TNewFormat,TDeprecatedFormat,TResult](String commandLine, String greetings, Action`1 mainMethod) in RunApplicationCore.il:line IL_00B8 mvid CA34
    at JetBrains.dotTrace.CommandLine.Common.CltHelpers.<>c__DisplayClass4_0`3.<RunApplication>b__0(String[] _) in CltHelpers.il:line IL_0000 mvid CA34
    at JetBrains.Util.Processes.DotNetGlobalToolsRunnerHelpers.RerunCltIfNeeded(Func`2 mainMethod, FileSystemPath mainModuleModulePath, String[] args, String runtimeConfigSuffix, Action`1 errorMessageLogger, Int32 failureReturnCode) in RerunCltIfNeeded.il:line IL_003D mvid 2BFE
    at JetBrains.dotTrace.CommandLine.Common.CltHelpers.RunApplication[TNewFormat,TDeprecatedFormat,TResult](String[] args, String greetings, Action`1 mainMethod) in RunApplication.il:line IL_0059 mvid CA34
    at JetBrains.dotTrace.ConsoleProfiler.ProfilerProgram.MainImpl(String[] args) in MainImpl.il:line IL_003E mvid B582
    at JetBrains.dotTrace.ConsoleProfiler.ProfilerProgram.ProfilerProgramEntryPoint.Main(String[] args) in Main.il:line IL_002C mvid B582
”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
HResult = COR_E_APPLICATION=80131600
20:55:48.702 |T| Lifetime                      | :1                 | Canceling Lifetime `.ctor` [Alive, executing=0, resources=1]
20:55:48.702 |T| Lifetime                      | :1                 | Terminating Lifetime `.ctor` [Terminating, executing=0, resources=1]
20:55:48.702 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.703 |T| Lifetime                      | :1                 | Canceling Lifetime `RunApplicationCore` [Alive, executing=0, resources=32]
20:55:48.703 |T| Lifetime                      | :1                 | Terminating Lifetime `RunApplicationCore` [Terminating, executing=0, resources=32]
20:55:48.703 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=0]
20:55:48.703 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=0]
20:55:48.703 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.703 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Alive, executing=0, resources=1]
20:55:48.703 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=1]
20:55:48.703 |T| BaseServiceRemotable          | :1                 | Dispose type=JetBrains.Profiler.Windows.SysTools.SysTools fields=(34pcs)[AttachEnvironmentTools, AttachTools, BrowserTools, CleanupTools, CoreClrTools, DirectoryTools, EverythingEnvironmentTools, EnvironmentTools, EtwTools, EventPipeTools, EventTools, EverythingTools, ExecutableTools, FileCacheTools, FileTools, FileStorageTools, FrameworkTools, IISExpressTools, IISTools, ArchitectureTools, MetroTools, CommunicationTools, ProcessTools, RegistryHiveTools, RunTools, SemaphoreTools, TestTools, TransparentIntegrationTools, WcfHostTools, MonoTools, WindowsServiceEnvironmentTools, WindowsServiceTools, LifetimeTools, ProcessHelperTools]
20:55:48.704 |V| EventTools                    | :1                 | OnDispose
20:55:48.704 |V| Event                         | :1                 | Dispose
20:55:48.704 |V| CommunicationTools            | :1                 | OnDispose
20:55:48.704 |V| Listener                      | :1                 | Dispose
20:55:48.704 |V| Socket                        | :1                 | Dispose
20:55:48.704 |V| ProcessTools                  | :1                 | OnDispose
20:55:48.704 |V| Process                       | :1                 | Dispose
20:55:48.704 |V| SemaphoreTools                | :1                 | OnDispose
20:55:48.704 |V| Semaphore                     | :1                 | Dispose
20:55:48.704 |T| BaseServiceRemotable          | :1                 | Dispose type=JetBrains.Profiler.Windows.SysTools.TestTools fields=(1pc)[LeafTestTools]
20:55:48.704 |V| ProcessHelperTools            | :1                 | Cleaning up agents
20:55:48.705 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.705 |T| Lifetime                      | :1                 | Canceling Lifetime `StaExecutor` [Alive, executing=0, resources=0]
20:55:48.705 |T| Lifetime                      | :1                 | Terminating Lifetime `StaExecutor` [Terminating, executing=0, resources=0]
20:55:48.705 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.706 |V| ThreadManager                 | :1                 | >> (Closing) Request for STA Executor: ShellLocks #1. (00:00:00.0834551 elapsed)
20:55:48.706 |V| JetScheduler                  | JetPool Manager:5  | Management Unit 'Short Tasks' terminated
20:55:48.706 |V| JetScheduler                  | JetPool Manager:5  | Management Unit 'Long Tasks' terminated
20:55:48.706 |V| JetScheduler                  | JetPool Manager:5  | Thread 'JetPool Manager' finished
20:55:48.706 |T| GroupingEventHost             | :1                 | [GEH] Removed GroupingEvent(WatchdogEvent interval 00:00:16), now 0, throughput 0.
20:55:48.707 |T| GroupingEventHost             | :1                 | [GroupingEvent] GroupingEvent(WatchdogEvent interval 00:00:16) schedulled for 2025-07-30T20:56:04.
20:55:48.707 |T| GroupingEventHost             | :1                 | [GEH] Removed GroupingEvent(WatchdogEvent interval 00:00:16), now 0, throughput 0.
20:55:48.707 |T| GroupingEventHost             | :1                 | [GroupingEvent] GroupingEvent(WatchdogEvent interval 00:00:16) schedulled for 2025-07-30T20:56:04.
20:55:48.707 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Canceling, executing=0, resources=1]
20:55:48.707 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=1]
20:55:48.707 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.707 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Canceling, executing=0, resources=0]
20:55:48.707 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=0]
20:55:48.707 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.707 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Canceling, executing=0, resources=2]
20:55:48.707 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=2]
20:55:48.707 |T| Lifetime                      | :1                 | Canceling Lifetime `JetDispatcherClosure` [Canceling, executing=0, resources=1]
20:55:48.707 |T| Lifetime                      | :1                 | Terminating Lifetime `JetDispatcherClosure` [Terminating, executing=0, resources=1]
20:55:48.707 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.707 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.707 |T| Lifetime                      | :1                 | Canceling Lifetime `Anonymous` [Canceling, executing=0, resources=2]
20:55:48.707 |T| Lifetime                      | :1                 | Terminating Lifetime `Anonymous` [Terminating, executing=0, resources=2]
20:55:48.707 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.708 |T| IProperty                     | :1                 | CultureContextComponent::CultureContextComponent.Instance: {Culture=CultureContextComponent.Culture=} -> {Culture=CultureContextComponent.Culture=}
20:55:48.709 |T| Lifetime                      | :1                 | Terminated Lifetime `Anonymous` [Terminated, executing=0, resources=0]
20:55:48.709 |T| Lifetime                      | :1                 | Canceling Lifetime `MainImpl` [Alive, executing=0, resources=1]
20:55:48.709 |T| Lifetime                      | :1                 | Terminating Lifetime `MainImpl` [Terminating, executing=0, resources=1]
0
2 comments

Hi!

The issue occurs because the profiled process doesn't have access to the profiler’s .dll files.

To resolve this, please refer to this article. You should move the dotTrace command line profiler files to a directory that is shared between both containers. Then, run the dottrace attach command from that shared directory.

0

Hello ! 
thanks for the feedback. 
Why profiled process needs to have access to profiler dll ? 

0

Please sign in to leave a comment.