py-spy icon indicating copy to clipboard operation
py-spy copied to clipboard

"Access is denied" when trying to `py-spy dump` under Windows

Open gozdal opened this issue 3 years ago • 2 comments

I am trying to dump a Python process to understand why it's hung.

I have tried using the same user as the process (it's running under jenkins user from another Login session), a different user and Administrator user. Regardless on which user I choose I get:

(pyspy-venv) C:\Users\dev>py-spy dump --pid 1892
Error: Failed to open process - check if it is running.
Reason: Access is denied. (os error 5)
Reason: Access is denied. (os error 5)

How do I debug the problem? Why isn't Windows letting me see what the process is doing? I can see the process under Process Explorer ran from Administrator user just fine.

This is Windows 10 21H2, build 19044.2006, py-spy 0.3.14, Python 3.10.4

gozdal avatar Oct 03 '22 16:10 gozdal

I'm also facing the above issue, any updates on the issue

gsarathkumar92 avatar Oct 30 '23 14:10 gsarathkumar92