-
Notifications
You must be signed in to change notification settings - Fork 57
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
Why Python eBPF profiler initialization failed #361
Comments
Hi @baohongmin , can you please run gProfiler again with |
[2022-05-08 17:20:25,541] INFO: gprofiler: Running gprofiler (version 1.2.20), commandline: '--perf-mode=smart --python-mode=pyperf --profiling-frequency=30 --profiling-duration=30 -v -c -o gtest' |
Okay, I see the error here:
We use a small BPF program (see here). It scans kernel objects in runtime to find offsets needed for PyPerf to run, and it fails. I will try running it on a kernel matching yours and fix it. Will update here on progress :) Meanwhile, another bug that I see is that this If you want to continue profiling with py-spy meanwhile, you can use |
Thanks, Jongy. |
Yeah I recall your issue from benfred/py-spy#490, I will look into that as well since it is also weird. Anyway PyPerf works great for native extensions so I hope we get PyPerf working for ya :) |
Hmm..
Maybe it's related to the instance size? Structs may change with the number of CPUs you have. Trying again with 128 cores. |
Very weird..
|
@baohongmin , can you provide me with more details on the instance + operating system, so I can replicate your environment more carefully? |
processor : 127 [root@icx08]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c [root@icx08]# lsb_release -a [root@icx08]# cat /proc/version [root@icx08]# gcc -v [root@icx08]# lscpu [root@icx08 pyperf]# ./get_stack_offset Hi, Jongy, Is there any other information I need to provide? |
Just verifying - per the profiler logs I understand that this isn't a cloud machine but a physical one, is that correct? If you know to direct me where can I find this exact OS installation, I shall try to install it on a cloud machine. Otherwise I'll just search for it online. |
Yes, It is a physical machine. [15:40:54] Running gprofiler (version 1.2.20), commandline: '--perf-mode=smart --python-mode=pyperf --profiling-frequency=99 --profiling-duration=30 -c -o gtest' [root@milan01 ]# cat /etc/redhat-release |
Hi @baohongmin , sorry for the long delay in responding, I lost this thread. In this case, I am not sure if it's PyPerf or perf. PyPerf is used for Python processes, but in this case since I don't see any other Python stacks, it leads me to think that PyPerf is not being used. Native frames emitted by PyPerf should have a So, one problem is PyPerf not being used. Most likely, PyPerf fails to profile those processes, and thus the perf stacks for those PIDs are taken. Please provide the log of gProfiler and I'll be able to further debug it. As for perf failing to retrieve symbols - please try running gProfiler with |
[16:44:49] Running gprofiler (version 1.2.20), commandline: '--perf-mode=smart --python-mode=pyperf --profiling-frequency=30 --profiling-duration=30 -c -o gtest'
[16:44:49] gProfiler Python version: 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
[16:44:49] gProfiler deployment mode: standalone_executable
[16:44:49] Kernel uname release: 4.18.0-305.12.1.el8_4.x86_64
[16:44:49] Kernel uname version: #1 SMP Wed Aug 11 01:59:55 UTC 2021
[16:44:49] Total CPUs: 128
[16:44:49] Total RAM: 251.32 GB
[16:44:49] Linux distribution: CentOS Linux | 8 | n/a
[16:44:49] libc version: glibc-2.28
[16:44:49] Hostname: icx08
[16:44:55] Initialized JavaProfiler (frequency: 30hz, duration: 30s)
[16:44:56] Initialized SystemProfiler (frequency: 30hz, duration: 30s)
[16:44:56] Initialized PythonEbpfProfiler (frequency: 30hz, duration: 30s)
[16:44:56] Python eBPF profiler initialization failed
The text was updated successfully, but these errors were encountered: