pyflame icon indicating copy to clipboard operation
pyflame copied to clipboard

Python 3.6.7 support, seems broken

Open ctrlbrett opened this issue 6 years ago • 3 comments

I am hitting trouble with miniconda on Python 3.6.7 and pyflame

python --version
Python 3.6.7 :: Anaconda, Inc.

 ./pyflame -v
pyflame 1.6.6 linux-gnu x86_64 (ABI list: 26 34 36)

I am utilizing the approach darindf recommended for conda:

sudo find ~/miniconda3 -iname python-*.pc # (find the pkgconfig directories)
export PKG_CONFIG_PATH=/home/brett/miniconda3/envs/far5/lib/pkgconfig/ # (far5 is the env I am using)
...build the normal way

(I am using the same conda environment to find the pkgconfig as the python program I am trying to trace), but I am getting

sudo ./pyflame -d --threads -p  15657                 
terminate called after throwing an instance of 'pyflame::PtraceException'
  what():  Failed to PTRACE_PEEKDATA (pid 15657, addr 0x55a8639c3508): Input/output error

For reference, i am trying to do this with a very minimal example:

import time

i = 0
while True:
    time.sleep(3)
    print('running', i)
    i += 1

ctrlbrett avatar Nov 30 '18 19:11 ctrlbrett

I'm geting the same error when I'm running code inside a conda environment

nitishgupta avatar Jan 18 '19 23:01 nitishgupta

I am hitting it in 3.6.8 in a conda environment.

sudo PATH=$PATH PYTHONPATH=$PYTHONPATH /home/awagner/miniconda3/bin/pyflame -o pyflame_profile.txt --threads --trace python3 ../common/bench.py Failed to PTRACE_PEEKDATA at 0x55628625c5a8: Input/output error

$ python --version
Python 3.6.8 :: Anaconda, Inc.

drewm1980 avatar Feb 05 '19 12:02 drewm1980

Following another issue report, things seem to work with 3.6.5. but not 3.6.6+, so this is a python version issue, not a conda issue.

Workaround:

conda install python=3.6.5

drewm1980 avatar Feb 05 '19 14:02 drewm1980