pyflame
pyflame copied to clipboard
Add support for Python3.7 (#151)
Fixes #151
...can you, please, merge? thanks!
I get an unending spew of
Unexpected ptrace(2) exception: waitpid() indicated a WIFSTOPPED process, but got unexpected signal 11
with this branch.
@tavianator What kernel/distribution are you using?
Arch Linux, kernel 4.18.14-arch1-1-ARCH
@tavianator Can you verify that SELinux is not denying the ptrace call?
@henryzhangsta No SELinux here. The relevant part of strace is:
ptrace(PTRACE_POKEDATA, 27855, 0x7fb56897e000, 0xccd0ff) = 0
ptrace(PTRACE_GETREGS, 27855, NULL, 0x7ffd34d418f0) = 0
ptrace(PTRACE_SETREGS, 27855, NULL, 0x7ffd34d41730) = 0
ptrace(PTRACE_CONT, 27855, NULL, SIG_0) = 0
wait4(27855, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGSEGV}], 0, NULL) = 27855
I just used it on Arch Linux with kernel 4.19.8-arch1-1-ARCH and did not get any errors, maybe there was something fixed related to this bug.
@metafex Hmm, maybe something I'm doing wrong then, still reproduces for me. What's your ./configure line, etc.?
@tavianator I ran configure without any parameters, it perfectly detects python 3.7 for me. I attached pyflame to a uwsgi process in a container though, how are you running it?
$ ./src/pyflame -t python3 -c 'import time; time.sleep(5); print("Hello world")'
Unexpected ptrace(2) exception: waitpid() indicated a WIFSTOPPED process, but got unexpected signal 11
Unexpected ptrace(2) exception: waitpid() indicated a WIFSTOPPED process, but got unexpected signal 11
Unexpected ptrace(2) exception: waitpid() indicated a WIFSTOPPED process, but got unexpected signal 11
...
The crash happens in the Python process when doing PtraceCallFunction(pid, addrs.tstate_get_addr);
Turns out that this is fixed by https://github.com/uber/pyflame/pull/155, sorry for the noise!
bump ;-)
friendly ping - any reason why this is not merged yet? Having py37 support would be really helpful...
The person that originally wrote pyflame no longer works at Uber. I have not been able to get an Uber open source contact, so if anyone knows of one, let me know.
Hi, is anybody trying to build this with python 3.7 installed by pyenv? I cannot get how to pass path to Python3.7 for build pyflame. Can help me? UPDATE: should use env var: export PKG_CONFIG_PATH=~/.pyenv/versions/3.7.3/lib/pkgconfig/
@hound672 I think people have switched to https://github.com/benfred/py-spy these days