When I'm running prefview tool (https://github.com/microsoft/perfview) in the windows container, I encounter this exception:
[Exception Occurred: System.Runtime.InteropServices.COMException (0x80070296): Exception from HRESULT: 0x80070296
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.Diagnostics.Tracing.Extensions.ETWControl.EnableStackCaching(UInt64 traceHandle)
at Microsoft.Diagnostics.Tracing.Session.TraceEventSession.EnableKernelProvider(Keywords flags, Keywords stackCapture)
at PerfView.CommandProcessor.Start(CommandLineArgs parsedArgs)
at PerfView.CommandProcessor.Collect(CommandLineArgs parsedArgs)
at PerfView.CommandProcessor.ExecuteCommand(CommandLineArgs parsedArgs)]
Here is my usage:
- Download the latest prefview from: https://github.com/microsoft/perfview/releases/download/v3.0.6/PerfView.exe
- Copy the
PerfView.exeinto the windows container - use
crictl exec <contianer id> powershellcommand to open a Powershell in the container - Running the command
.\PerfView "/DataFile:PerfViewData.etl" /BufferSizeMB:256 /StackCompression /CircularMB:500 /logFile=log.txt /maxCollectSec=30 /NoGui collect
My windows container's base image is: mcr.microsoft.com/windows/nanoserver:1809
My isolation runtime is: runhcs-wcow-hypervisor
Anything I can do about it? Thanks in advance.
I have read this post: https://githublab.com/repository/issues/microsoft/perfview/1601. It said that we should use hyper-v isolation and that's exactly what I'm using.
1 Answer 1
Have you tried to use the Server Core image? It might be the case that PerfView is trying to access OS APIs that are not present in Nano Server.
3 Comments
docker run -it mcr.microsoft.com/windows/servercore:1803 powershell Also encounter this problem. Currently we can only add parameter /KernelEvents:Profile to omit some kernel info. But it lost many details in Flame Graph, so I still want to remove this parameter when I collect PerfView.Explore related questions
See similar questions with these tags.