-
Notifications
You must be signed in to change notification settings - Fork 444
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
Support pyinstaller binaries #42
Comments
What operating system are you on? I managed to replicate this on OSX, but want to make sure I'm targeting the right platform. Also can you enable logging and paste the output here ( I don't think the rest would work even if we passed the version in - py-spy is failing to find the right libpython binary, so even with the right version it would fail to find the python interpreter. On OSX pyinstaller is bundling the libpython to something like
and we are expecting something like 'libpython' or 'Python.Framework/.../Python'. I'm not sure what this is like on other systems =(. |
I'm on debian/centos. Would you mind making a release that allows you to specify the version and the offset for the |
I tested py-spy with pyinstaller on centos7, and found two different minor issues.
It looks like the pyinstaller process forks, and loads up python in the subprocess (while the main process waits for the subprocess to finish). This means that you can't go 'py-spy -- path/to/executable' and have to instead go 'py-spy --pid <pid_of_subprocess>'. Eventually I'd like for py-spy to inspect subprocesses too (to help with multiprocessing etc), but for now you'll have to specify the pid Note: pyinstaller on OSX doesn't seem to fork like this 🤷♂️
This is what's preventing py-spy from getting the version string for you =(. The problem is that libpython is something like we are expecting libpython to be in lib/ or lib64, matching like : Lines 409 to 410 in 9823477
which isn't the case for pyinstaller here =( The good news is that is pretty easy to fix, and I'll have a fix for this in the next version (either later today or on sunday). |
This commit should fix the failing to find libpython problem with pyinstaller: 064b8e7 This will be in the next release. Note that you still will need to pass the pid of the python subprocess for now. |
fixed in v0.1.8 |
Working great! Thank you |
hmm - marking these as idle seems unideal too though (would show process not being busy, when it's busy in subprocessess). I'm going to add an issue for a config file where you can specify custom functions to exclude. Also I think eventually it would be good to also sample from subprocesses |
In this case, looking at real cpu usage only 1 process is busy. The subprocesses only send a message via a queue at the very end of the processing, so there's also no communication.
…On September 28, 2018 11:10:05 PM GMT+02:00, Ben Frederickson ***@***.***> wrote:
hmm - marking these as idle seems unideal too though (would show
process not being busy, when it's busy in subprocessess). I'm going to
add an issue for a config file where you can specify custom functions
to exclude.
Also I think eventually it would be good to also sample from
subprocesses
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#42 (comment)
|
At the moment if you try to run py-spy on a binary created by py-installer you get
A trivial fix would be to allow the user to specify the version in case it cannot be detected.
Not entirely sure if the rest would work..
The text was updated successfully, but these errors were encountered: