[pypy-issue] [issue1258] Interrupted system call from os.urandom
Zooko
tracker at bugs.pypy.org
Tue Sep 11 11:06:41 CEST 2012
New submission from Zooko <zooko at zooko.com>:
This script has never done this under CPython, but just now I got this failure:
MAIN zompu:~/playground/stringchain$ time
PYTHONPATH=/usr/local/site-packages/pyutil-1.9.3_2-py2.7.egg/:/usr/local/site-packages/statprof-0.1.2-py2.7.egg
pypy -OOu -c 'from stringchain.bench import bench; bench.slow_bench(profile=True)'
N is the total number of bytes produced and consumed; results are in nanoseconds
per byte (scientific notation)
impl: StringChain
task: accumulate_then_one_gulp
N: 100000000Traceback (most recent call last):
File "app_main.py", line 51, in run_toplevel
File "app_main.py", line 575, in run_it
File "<string>", line 1, in <module>
File "stringchain/bench/bench.py", line 469, in slow_bench
benchutil.rep_bench(task, BSIZE, initfunc=initfunc,
UNITS_PER_SECOND=UNITS_PER_SECOND)#, profile=profile,
profresultsfileobj=profresultsfileobj)
File
"/usr/local/stow/pypy-1.9/site-packages/pyutil-1.9.3_2-py2.7.egg/pyutil/benchutil.py",
line 142, in rep_bench
initfunc(n)
File "stringchain/bench/bench.py", line 337, in init
self.l.append(randstr(nextchunksize))
File
"/usr/local/stow/pypy-1.9/site-packages/pyutil-1.9.3_2-py2.7.egg/pyutil/randutil.py",
line 84, in insecurerandstr
return os.urandom(n)
File "/usr/local/stow/pypy-1.9/lib-python/2.7/os.py", line 756, in urandom
bs += read(_urandomfd, n - len(bs))
OSError: [Errno 4] Interrupted system call
real 0m14.677s
user 0m1.703s
sys 0m12.936s
MAIN zompu:~/playground/stringchain$ time
PYTHONPATH=/usr/local/site-packages/pyutil-1.9.3_2-py2.7.egg/:/usr/local/site-packages/statprof-0.1.2-py2.7.egg
pypy -OOu -c 'from stringchain.bench import bench; bench.slow_bench(profile=True)'
N is the total number of bytes produced and consumed; results are in nanoseconds
per byte (scientific notation)
impl: StringChain
task: accumulate_then_one_gulp
N: 100000000Traceback (most recent call last):
File "app_main.py", line 51, in run_toplevel
File "app_main.py", line 575, in run_it
File "<string>", line 1, in <module>
File "stringchain/bench/bench.py", line 469, in slow_bench
benchutil.rep_bench(task, BSIZE, initfunc=initfunc,
UNITS_PER_SECOND=UNITS_PER_SECOND)#, profile=profile,
profresultsfileobj=profresultsfileobj)
File
"/usr/local/stow/pypy-1.9/site-packages/pyutil-1.9.3_2-py2.7.egg/pyutil/benchutil.py",
line 142, in rep_bench
initfunc(n)
File "stringchain/bench/bench.py", line 337, in init
self.l.append(randstr(nextchunksize))
File
"/usr/local/stow/pypy-1.9/site-packages/pyutil-1.9.3_2-py2.7.egg/pyutil/randutil.py",
line 84, in insecurerandstr
return os.urandom(n)
File "/usr/local/stow/pypy-1.9/lib-python/2.7/os.py", line 756, in urandom
bs += read(_urandomfd, n - len(bs))
OSError: [Errno 4] Interrupted system call
real 0m28.911s
user 0m3.436s
sys 0m25.242s
It seems to take a different amount of time to fail each time I run it. I'm
using statprof -- http://pypi.python.org/pypi/statprof/ -- which sets a timer
signal -- which is probably part of the problem.
----------
messages: 4735
nosy: pypy-issue, zooko
priority: bug
status: unread
title: Interrupted system call from os.urandom
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1258>
________________________________________
More information about the pypy-issue
mailing list