Message24897
Logged In: YES
user_id=279987
We're facing this problem. We're thinking of patching our os.py
module to always open /dev/urandom on every call. Does
anybody know if this would have any bad consequences other
than the obvious system call overhead?
BTW, here's the traceback we get. As you probably can guess,
something called os.urandom before we closed all file descriptors
in the daemonizing code and it then failed when os.urandom
tried to use the cached fd.
Traceback (most recent call last):
File "/opt/race/share/sw/common/bin/dpmd", line 27, in ?
dpmd().run()
File "Linux/CommandLineApp.py", line 336, in run
File "Linux/daemonbase.py", line 324, in main
File "Linux/server.py", line 61, in addServices
File "Linux/dpmd.py", line 293, in __init__
File "Linux/threadutils.py", line 44, in start
File "Linux/xmlrpcd.py", line 165, in createThread
File "Linux/threadutils.py", line 126, in __init__
File "/opt/race/share/sw/os/Linux_2.4_i686/python/lib/python2.4/t
empfile.py", line 423, in NamedTemporaryFile
dir = gettempdir()
File "/opt/race/share/sw/os/Linux_2.4_i686/python/lib/python2.4/t
empfile.py", line 262, in gettempdir
tempdir = _get_default_tempdir()
File "/opt/race/share/sw/os/Linux_2.4_i686/python/lib/python2.4/t
empfile.py", line 185, in _get_default_tempdir
namer = _RandomNameSequence()
File "/opt/race/share/sw/os/Linux_2.4_i686/python/lib/python2.4/t
empfile.py", line 121, in __init__
self.rng = _Random()
File "/opt/race/share/sw/os/Linux_2.4_i686/python/lib/python2.4/r
andom.py", line 96, in __init__
self.seed(x)
File "/opt/race/share/sw/os/Linux_2.4_i686/python/lib/python2.4/r
andom.py", line 110, in seed
a = long(_hexlify(_urandom(16)), 16)
File "/opt/race/share/sw/os/Linux_2.4_i686/python/lib/python2.4/
os.py", line 728, in urandom
bytes += read(_urandomfd, n - len(bytes))
OSError : [Errno 9] Bad file descriptor
|
|
Date |
User |
Action |
Args |
2007-08-23 14:30:45 | admin | link | issue1177468 messages |
2007-08-23 14:30:45 | admin | create | |
|