Message71241
I've been trying to track down the following failure which very recently
has started to plague the py3k buildbots:
[...]
test_os
Traceback (most recent call last):
File "./Lib/test/regrtest.py", line 1197, in <module>
main()
File "./Lib/test/regrtest.py", line 400, in main
print(test)
File
"/home/buildbot/slave/py-build/3.0.norwitz-amd64/build/Lib/io.py", line
1490, in write
self.flush()
File
"/home/buildbot/slave/py-build/3.0.norwitz-amd64/build/Lib/io.py", line
1455, in flush
self.buffer.flush()
File
"/home/buildbot/slave/py-build/3.0.norwitz-amd64/build/Lib/io.py", line
1071, in flush
self._flush_unlocked()
File
"/home/buildbot/slave/py-build/3.0.norwitz-amd64/build/Lib/io.py", line
1079, in _flush_unlocked
n = self.raw.write(self._write_buf)
IOError: [Errno 9] Bad file descriptor
I've determined that the failure in writing to the raw stream underlying
stdout is caused by the fact that the file descriptor 0 has been closed
in test_os.test_closerange:
def test_closerange(self):
f = os.open(support.TESTFN, os.O_CREAT|os.O_RDWR)
# close a fd that is open, and one that isn't
os.closerange(f, f+2)
The problem arises when the call to os.open above returns 0. Normally 0
is the file descriptor underlying stdin, I don't know why it ends up
available for other uses, this would deserve investigation.
In the meantime, a way of circumventing this problem would be to rewrite
test_closerange in a saner way, such that closerange() doesn't try to
close important file descriptors. |
|
Date |
User |
Action |
Args |
2008-08-16 21:37:38 | pitrou | set | recipients:
+ pitrou |
2008-08-16 21:37:38 | pitrou | set | messageid: <1218922658.18.0.0206081400424.issue3571@psf.upfronthosting.co.za> |
2008-08-16 21:37:37 | pitrou | link | issue3571 messages |
2008-08-16 21:37:36 | pitrou | create | |
|