Sample Error: ERROR_THREAD_STATE_NOT_FOUND in Python App
- Dominant language
- Python
- Stars
- 826
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
I ran into an issue where I am not seeing the stack for a bunch of threads in a python 3 app under test. This is using the python BPF profiler running in a docker container alongside the python app running inside its own container. The main thread shows up but the rest seemed to be grouped under a ERROR_THREAD_STATE_NOT_FOUND sample with a few kernel samples.

I don't see anything unusual in the agent logs apart from some reports of the below, not sure if it is related.
```
[15:11:26] Running global perf...
[15:12:26] python profiling failed
Traceback (most recent call last):
File "/app/gprofiler/main.py", line 272, in _snapshot
process_profiles.update(future.result())
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 432, in result
return self.__get_result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
raise self._exception
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/app/gprofiler/python.py", line 324, in snapshot
return self._ebpf_profiler.snapshot()
File "/app/gprofiler/python.py", line 260, in snapshot
collapsed_path = self._dump()
File "/app/gprofiler/python.py", line 241, in _dump
output = self._wait_for_output_file(self.dump_timeout)
File "/app/gprofiler/python.py", line 233, in _wait_for_output_file
assert len(output_files) == 1
AssertionError
[15:12:36] Finished running global perf
[15:12:38] Successfully uploaded profiling data to the server
```
Contributor guide
Assessment
This issue has not been assessed yet.