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

unable to start collect #2105

Open
bian6 opened this issue Aug 27, 2024 · 6 comments
Open

unable to start collect #2105

bian6 opened this issue Aug 27, 2024 · 6 comments

Comments

@bian6
Copy link

bian6 commented Aug 27, 2024

Started with command line: "F:\bian\perfView\PerfView.exe" 
PerfView Version: 3.1.15  BuildDate: Mon, 26 Aug 2024 23:20:01 GMT
PerfView Start Time 8/27/2024 3:27:42 PM
Started: View
Warning: PdbScope not found at F:\bian\perfView\PerfViewExtensions\PdbScope.exe
Disabling the Image Size Menu Item.
Warning: ILSize not found at F:\bian\perfView\PerfViewExtensions\ILSize.dll
Disabling the IL Size Menu Item.
Completed: View   (Elapsed Time: 0.282 sec)
Collection Dialog open.
Started: Collecting data F:\bian\perfView\PerfViewData.etl
[Kernel Log: F:\bian\perfView\PerfViewData.kernel.etl]
Kernel keywords enabled: Default
Aborting tracing for sessions 'NT Kernel Logger' and 'PerfViewSession'.
Ensuring .NET Allocation profiler not installed.
Detected 64 bit system, removing 32 bit keys.
Completed: Collecting data F:\bian\perfView\PerfViewData.etl   (Elapsed Time: 5.625 sec)
Exception Occurred: System.Runtime.InteropServices.COMException (0x800700B7): Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7)
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.Diagnostics.Tracing.Session.TraceEventSession.EnableKernelProvider(Keywords flags, Keywords stackCapture)
   at PerfView.CommandProcessor.Start(CommandLineArgs parsedArgs) in D:\a\_work\1\s\src\PerfView\CommandProcessor.cs:line 507
   at PerfView.CommandProcessor.Collect(CommandLineArgs parsedArgs) in D:\a\_work\1\s\src\PerfView\CommandProcessor.cs:line 213
   at PerfView.MainWindow.<>c__DisplayClass27_0.<ExecuteCommand>b__0() in D:\a\_work\1\s\src\PerfView\MainWindow.xaml.cs:line 1393
   at PerfView.StatusBar.<>c__DisplayClass22_0.<StartWork>b__0() in D:\a\_work\1\s\src\PerfView\GuiUtilities\StatusBar\StatusBar.xaml.cs:line 254
An exceptional condition occurred, see log for details.
Started: Aborting any active Data collection
Completed: Aborting any active Data collection   (Elapsed Time: 0.000 sec)
Collection Dialog open.
Started: Collecting data F:\bian\perfView\PerfViewData.etl
[Kernel Log: F:\bian\perfView\PerfViewData.kernel.etl]
Kernel keywords enabled: Default
Completed: Collecting data F:\bian\perfView\PerfViewData.etl   (Elapsed Time: 0.890 sec)
Exception Occurred: System.Runtime.InteropServices.COMException (0x800700B7): Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7)
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.Diagnostics.Tracing.Session.TraceEventSession.EnableKernelProvider(Keywords flags, Keywords stackCapture)
   at PerfView.CommandProcessor.Start(CommandLineArgs parsedArgs) in D:\a\_work\1\s\src\PerfView\CommandProcessor.cs:line 507
   at PerfView.CommandProcessor.Collect(CommandLineArgs parsedArgs) in D:\a\_work\1\s\src\PerfView\CommandProcessor.cs:line 213
   at PerfView.MainWindow.<>c__DisplayClass27_0.<ExecuteCommand>b__0() in D:\a\_work\1\s\src\PerfView\MainWindow.xaml.cs:line 1393
   at PerfView.StatusBar.<>c__DisplayClass22_0.<StartWork>b__0() in D:\a\_work\1\s\src\PerfView\GuiUtilities\StatusBar\StatusBar.xaml.cs:line 254
An exceptional condition occurred, see log for details.

I have tried excute perfView---abort, and restart the computer, and used in different computer, the above error will occurs alse, the version is [PerfView and TraceEvent 3.1.15]. and the computer version is win10 ,

@bian6 bian6 closed this as completed Aug 27, 2024
@bian6 bian6 reopened this Aug 27, 2024
@cincuranet
Copy link
Collaborator

@bian6 The links above look like a malware. I would recommend not doing anything with the content. ❗

From the log you posted I see Cannot create a file when that file already exists. (that HRESULT is ERROR_ALREADY_EXISTS). Can you verify that you don't have previous trace file(s) in F:\bian\perfView?

Also can you share how are you starting the collect?

@bian6
Copy link
Author

bian6 commented Aug 27, 2024

@bian6 The links above look like a malware. I would recommend not doing anything with the content. ❗

From the log you posted I see Cannot create a file when that file already exists. (that HRESULT is ERROR_ALREADY_EXISTS). Can you verify that you don't have previous trace file(s) in F:\bian\perfView?

Also can you share how are you starting the collect?

yes,there is no previous trace file(s) inF:\bian\perfView , I start the PerfView.exe, then Collect--->Collect---->Start Collection

@cincuranet
Copy link
Collaborator

Yeah, I was not expecting existing file to be the case. PerfView would overwrite PerfViewData.etl anyway.

@brianrob Anything rings the bell from the log ?

@brianrob
Copy link
Member

I have not seen this before. Can you please try with an older version of PerfView just to rule out any recent changes? https://github.com/microsoft/perfview/releases/tag/v3.1.13. My suspicion is that this won't matter based on the stack, but want to be sure. Also, is it possible that there is a permissions issue with the target location? I've seen things like that before result in similar errors. Perhaps try to save the trace to the OS drive in your user profile directory?

@github-staff github-staff deleted a comment from bian6 Aug 27, 2024
@github-staff github-staff deleted a comment from bian6 Aug 27, 2024
@github-staff github-staff deleted a comment from bian6 Aug 27, 2024
@MagicAndre1981
Copy link
Contributor

This happended a lot in Windows 7, because here only 1 NT Kernel Logger was allowed and other tools like Process Explorer were running and also use ETW.

#635 also shows this

@MagicAndre1981
Copy link
Contributor

I have not seen this before

The NT Kernel Logger is still the issue, also you still use this name.

@brianrob If you don't support Windows 7 any longer in Trace Event/Perfview you can define your own name like TraceEventKernelTraceSession to avoid this issue. This custom name support for kernel loggers was added in Windows 8.

The SystemTraceProvider is a kernel provider with a predefined sets of kernel events supported on Windows 7, Windows Server 2008 R2, and later. On Windows 7 and Windows Server 2008 R2, the SystemTraceProvider could only be used for the NT Kernel Logger session.

On Windows 8, Windows Server 2012, and later, the SystemTraceProvider can be multiplexed for up to 8 logger sessions. The first two slots for logger sessions are reserved for the NT Kernel Logger and the Circular Kernel Context Logger .

@brian6 make sure you don't run any software that use ETW like ProcessExplorer, ResMon, ProcMon

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

No branches or pull requests

8 participants
@cincuranet @brianrob @MagicAndre1981 @bian6 and others