Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Add support for Python3.7 (#151) #153

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

henryzhangsta
Copy link

Fixes #151

@CLAassistant
Copy link

CLAassistant commented Aug 29, 2018

CLA assistant check
All committers have signed the CLA.

@rpodgorny
Copy link

...can you, please, merge? thanks!

@tavianator
Copy link

I get an unending spew of

Unexpected ptrace(2) exception: waitpid() indicated a WIFSTOPPED process, but got unexpected signal 11

with this branch.

@henryzhangsta
Copy link
Author

@tavianator What kernel/distribution are you using?

@tavianator
Copy link

Arch Linux, kernel 4.18.14-arch1-1-ARCH

@henryzhangsta
Copy link
Author

@tavianator Can you verify that SELinux is not denying the ptrace call?

@tavianator
Copy link

@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

@ghost
Copy link

ghost commented Dec 11, 2018

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.

@tavianator
Copy link

@metafex Hmm, maybe something I'm doing wrong then, still reproduces for me. What's your ./configure line, etc.?

@ghost
Copy link

ghost commented Dec 11, 2018

@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?

@tavianator
Copy link

$ ./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);

@tavianator
Copy link

Turns out that this is fixed by #155, sorry for the noise!

@rpodgorny
Copy link

bump ;-)

@randomstuff randomstuff mentioned this pull request Mar 3, 2019
@toabctl toabctl mentioned this pull request Mar 26, 2019
@toabctl
Copy link

toabctl commented Mar 26, 2019

friendly ping - any reason why this is not merged yet? Having py37 support would be really helpful...

@henryzhangsta
Copy link
Author

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.

@hound672
Copy link

hound672 commented Aug 1, 2019

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/

@tavianator
Copy link

@hound672 I think people have switched to https://github.com/benfred/py-spy these days

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Python 3.7
6 participants