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

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

Open
henryzhangsta wants to merge 4 commits into
uber-archive:masterfrom
henryzhangsta:python3.7
Open

Add support for Python3.7 (#151)#153
henryzhangsta wants to merge 4 commits into
uber-archive:masterfrom
henryzhangsta:python3.7

Conversation

@henryzhangsta

Copy link
Copy Markdown

Fixes #151

@CLAassistant

CLAassistant commented Aug 29, 2018

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@rpodgorny

Copy link
Copy Markdown

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

@tavianator

Copy link
Copy Markdown

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
Copy Markdown
Author

@tavianator What kernel/distribution are you using?

@tavianator

Copy link
Copy Markdown

Arch Linux, kernel 4.18.14-arch1-1-ARCH

@henryzhangsta

Copy link
Copy Markdown
Author

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

@tavianator

Copy link
Copy Markdown

@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

ghost commented Dec 11, 2018

Copy link
Copy Markdown

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
Copy Markdown

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

@ghost

ghost commented Dec 11, 2018

Copy link
Copy Markdown

@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
Copy Markdown
$ ./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
Copy Markdown

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

@rpodgorny

Copy link
Copy Markdown

bump ;-)

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

toabctl commented Mar 26, 2019

Copy link
Copy Markdown

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

@henryzhangsta

Copy link
Copy Markdown
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

hound672 commented Aug 1, 2019

Copy link
Copy Markdown

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
Copy Markdown

@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