-
Notifications
You must be signed in to change notification settings - Fork 435
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
Error: failed to get os threadid #490
Comments
This means py-spy failed to get the native thread ID. This can happen due to numerous reasons depending on the OS you are using. On which system are you running py-spy? In any case, the direct trigger for this error is |
Hi, Jongy I profile a running process running inside the docker container. |
Ah, py-spy doesn't support getting the OS thread ID for dockerized processes. See
I think that's the issue. This is actually something we've been tackling but I don't have a solution ready yet. Meanwhile - I can suggest that you run py-spy inside the container - that is, in the same PID NS. For example, if the host PID is |
Thanks Jongy, |
Glad it helped :) |
Fwiw, with python 3.11 we can get the OS thread id directly from python, and will be able to grab it from a dockerized process from the host container. We still won't be able to do native profiling from the host into the container though - |
I also found the same error. ray-project/ray#30566 But for our case, we run py-spy within a docker container, so I am not sure how we can debug this issue... any pointer to take a look? |
I found when I don't specify this is returned
Is this related to that we have a thread |
@rkooo567 that looks pretty odd to me - I'm unsure why py-spy managed to figure out the native threadid in some cases, but not others. Is there a way I can run this myself to investigate ? (docker container with python script to run etc). |
py-spy top --native --pid 229875
Error: failed to get os threadid
py-spy 0.3.11
The text was updated successfully, but these errors were encountered: