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

IIS worker process profiling fails with "Unexpected error" message #11

Closed
markashleybell opened this issue Nov 26, 2024 · 2 comments
Closed
Labels
question Further information is requested

Comments

@markashleybell
Copy link

I'm not sure whether this is totally outside the scope of this project or not, and I'm not clear whether it's intended for working with .NET Framework code or just .NET Core... so if I'm just using it wrong, please feel free to close this!

My use case would be attaching to a running IIS worker process (w3wp.exe) to profile a web application. However, when I try that by attaching to the PID, I get the following error:

Unexpected error: The requested resource is in use. (0x800700AA)

Screenshot 2024-11-26 153704

Is this a bug, or am I doing something wrong (or is Ultra just not really intended for profiling web apps)?

@xoofx xoofx added the question Further information is requested label Nov 26, 2024
@xoofx
Copy link
Owner

xoofx commented Nov 26, 2024

Is this a bug, or am I doing something wrong (or is Ultra just not really intended for profiling web apps)?

I don't think it is a bug with ultra but something else with ETW/Windows that would happen if you were using another ETW based profiler. Others have been experiencing this similar issue:

You could try the workaround described here and see if it solves your issue.

@markashleybell
Copy link
Author

Yep, I can confirm that running the following in my elevated Powershell terminal allowed me to profile successfully:

Set-MpPreference -DisableTDTFeature $true

And ultra works really well! Looking forward to having a proper play with this tomorrow.

Incidentally (for anyone who stumbles across this), you can also re-enable the disabled feature easily enough after a profiling session:

# Re-enable TDT
Set-MpPreference -DisableTDTFeature $false

# Check the current status
Get-MpPreference | Select-Object -ExpandProperty IntelTDTEnabled

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

No branches or pull requests

2 participants