py-spy: "Killed: 9"?
Hello there,
Thank you for your work on the tool! I’m very excited to use it, but seem to have hit a snag:
17:12 ~/code/optimizely/src/www
$ pstree 98465
--- 98465 swilson /Users/swilson/code/optimizely/.virtualenv/www/test/bin/python /Users/swilson/code/optimizely/.virtualenv/www/test/bin/pytest --pdb services_test/client_tes [truncated]
17:13 ~/code/optimizely/src/www
$ sudo py-spy --pid 98465 -f hottt
Killed: 9
I’ve ensured that the PID of pytest
isn’t moving around; i.e., it’s a long-running process with no child processes. Yet while it’s running, I get the output Killed: 9
, exit status 137.
Python 2.7.12 py-spy 0.1.8 macOS 12.13.6
Let me know if I can provide any other details!
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 20 (8 by maintainers)
@crepererum I think that htop problem might be the same as this : https://jvns.ca/blog/2018/01/28/mac-freeze/ - which we should handle (with the sleep call here: https://github.com/rbspy/proc-maps/blob/96b274b826d7f9246856986af632b33672e9a7d9/src/mac_maps/mod.rs#L144 and I think apple has fixed the kernel bug in the macos version he’s using). The htop issue is mentioned on this twitter thread about that post anyways: https://twitter.com/b0rk/status/957498366606368768
@spencerwilson-optimizely I think this program should reproduce the problem (without all the other rust/py-spy code getting in the way and confusing the issue):
compile with
g++ task_for_pid_test.cc -o task_for_pid_test
run withtask_for_pid_test 12345
where 12345 is your pid.