Skip to content.

plope

Personal tools
You are here: Home » Plope Software » Plope Software Collector » mktempfile failure on debian
 
 
Views
Issue 252 of Plope Software Collector [Plope]
Title: mktempfile failure on debian
Status: Resolved Security related: No
Description: wilk reported: Hi, I'm trying to use supervisord2 version 3.0a3 to can manages my websites. But it raise this error. # supervisord Traceback (most...
From: chrism on: Dec 20, 07 23:06
chrism Last update: Dec 20, 07 23:06
Topic/class: supervisor/bug Importance: medium
Version info:
Assigned: chrism
Issue 252 Transcript
3 entries
= Resolve - Entry #3 by chrism on Dec 20, 2007 11:08 pm

 Status: Accepted => Resolved

I gave wilk a patch to options.py, which didnt work, but he applied a similar fix in a different place which did:

Can you try this patch to see if it helps?

It doesn't work where you said (it doesn't pass by there)
but it is this bug. If i put os._urandomfd=None in options.py
  1122     def mktempfile(self, suffix, prefix, dir):
  1123         os._urandomfd=None
  1124         fd, filename = tempfile.mkstemp(suffix, prefix, dir)
then it works...

I'm applying this patch to the HEAD.
________________________________________
= Comment - Entry #2 by chrism on Dec 20, 2007 11:07 pm

I responded:

I haven't seen this, but other Python folks seem to be having a similar issue in other contexts:

http://mail.python.org/pipermail/python-bugs-list/2005-April/028518.html

and a description of a workaround:

http://www.cafepy.com/quixote_extras/rex/toplevel.py


________________________________________
= Request - Entry #1 by chrism on Dec 20, 2007 11:06 pm

 Status: Pending => Accepted

 Supporters added: chrism

wilk reported:

Hi,

I'm trying to use supervisord2 version 3.0a3 to can manages my websites.

But it raise this error.

# supervisord
Traceback (most recent call last):
 File "/usr/bin/supervisord", line 7, in ?
   sys.exit(
 File "/usr/lib/python2.4/site-packages/supervisor-3.0a3-py2.4.egg/supervisor/s                                                               upervisord.py", line 316, in main
   go(options)
 File "/usr/lib/python2.4/site-packages/supervisor-3.0a3-py2.4.egg/supervisor/s                                                               upervisord.py", line 326, in go
   d.main()
 File "/usr/lib/python2.4/site-packages/supervisor-3.0a3-py2.4.egg/supervisor/s                                                               upervisord.py", line 90, in main
   config.after_setuid()
 File "/usr/lib/python2.4/site-packages/supervisor-3.0a3-py2.4.egg/supervisor/o                                                               ptions.py", line 1431, in after_setuid
   config.create_autochildlogs()
 File "/usr/lib/python2.4/site-packages/supervisor-3.0a3-py2.4.egg/supervisor/o                                                               ptions.py", line 1374, in create_autochildlogs
   self.stdout_logfile = get_autoname(name, sid, 'stdout')
 File "/usr/lib/python2.4/site-packages/supervisor-3.0a3-py2.4.egg/supervisor/o                                                               ptions.py", line 921, in get_autochildlog_name
   dir=self.childlogdir)
 File "/usr/lib/python2.4/site-packages/supervisor-3.0a3-py2.4.egg/supervisor/o                                                               ptions.py", line 1123, in mktempfile
   fd, filename = tempfile.mkstemp(suffix, prefix, dir)
 File "/usr/lib/python2.4/tempfile.py", line 302, in mkstemp
   return _mkstemp_inner(dir, prefix, suffix, flags)
 File "/usr/lib/python2.4/tempfile.py", line 230, in _mkstemp_inner
   names = _get_candidate_names()
 File "/usr/lib/python2.4/tempfile.py", line 221, in _get_candidate_names
   _name_sequence = _RandomNameSequence()
 File "/usr/lib/python2.4/tempfile.py", line 121, in __init__
   self.rng = _Random()
 File "/usr/lib/python2.4/random.py", line 96, in __init__
   self.seed(x)
 File "/usr/lib/python2.4/random.py", line 110, in seed
   a = long(_hexlify(_urandom(16)), 16)
 File "/usr/lib/python2.4/os.py", line 728, in urandom
   bytes += read(_urandomfd, n - len(bytes))
OSError: [Errno 9] Bad file descriptor


Something very strange is that i found this error just after install :

pkg_resources.ExtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

 [Errno 9] Bad file descriptor

but i simply could resolv this by importing meld3 from python
interpretor, and after that no more problem...

It could be a problem of my system but it did exactly the same on
differents machines (all running debian sarge)

Any idea ?