-
Notifications
You must be signed in to change notification settings - Fork 233
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
Getting IOError #16
Comments
running on ubuntu 12.04 |
To quote Antoine Pitrou (a core CPython developer) regarding this library
So probably you can't use the signal version of pyinstrument for your application. |
Okay... wow. Thanks for the bug report. I had no idea signals could affect system calls like that. I suppose syscalls have to bail so that the signal handler can fire in userspace? How often have you seen this with your program? Once/a few times/Always? Regardless, if you're getting a lot of these errors, you should switch to setprofile mode. I see you're using the command-line interface. I'll have a look at putting a flag in there to switch to setprofile mode, since I imagine it's going to be a problem for a few more people than just you. It might also be a good idea for me to catch IOError 4 in pyinstrument By the way, @asmeurer, do you have a link to the discussion you quoted? I might learn something! |
@joerick yes it would be great if you could add a setprofile mode argument for the command line |
No, it was an internal discussion on a company mailing list about pyinstrument. Antoine's comment that I pasted here was the only useful thing in the discussion about this. You'll have to reach out to other sources for information on this. Let me know what you learn. I also didn't know this about signals. |
Strangely, I couldn't recreate this on OS X or Ubuntu 13.04, but could with Ubuntu 12.04. I'm doing three things here:
|
Hopefully the |
@joerick just checked with the latest code - it does fix my problem. Thanks. |
Really hoping that PEP 475 makes it into Python 3.5. That could solve this once and for all. |
rahul@rahul-desktop { ~/pycharm-workspace/ceres_new }-> python -m pyinstrument ceres/sim/sim_definition.py
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in run_code
exec code in run_globals
File "/home/rahul/src/pyinstrument/pyinstrument/main.py", line 135, in
main()
File "/home/rahul/src/pyinstrument/pyinstrument/main.py", line 79, in main
exec(code, globs, None)
File "/home/rahul/src/pyinstrument/pyinstrument/main.py", line 25, in exec
exec("exec code in globs, locs")
File "", line 1, in
File "ceres/sim/sim_definition.py", line 48, in
main()
File "ceres/sim/sim_definition.py", line 31, in main
from aglyph.assembler import Assembler
File "/usr/local/lib/python2.7/dist-packages/aglyph/init.py", line 61, in
platform.platform()))
File "/usr/lib/python2.7/platform.py", line 1576, in platform
system,node,release,version,machine,processor = uname()
File "/usr/lib/python2.7/platform.py", line 1273, in uname
processor = _syscmd_uname('-p','')
File "/usr/lib/python2.7/platform.py", line 1029, in _syscmd_uname
output = string.strip(f.read())
IOError: [Errno 4] Interrupted system call
Alarm clock
The text was updated successfully, but these errors were encountered: