[ZODB-Dev] ZEO select.error: (9, "Bad file desriptor")

Andrew Kuchling akuchlin@mems-exchange.org
Wed, 13 Jun 2001 13:05:59 -0400


On Wed, Jun 13, 2001 at 11:50:17AM -0500, John D. Heintz wrote:
>    try: r, w, e = select.select([self._fileno],[],[],0.0)
>select.error: (9, 'Bad file descriptor')

Could the self._fileno descriptor be getting closed by another thread?

On Linux, the (0, 'No error') select.error you saw on Windows usually
indicates a threading mismatch when Python was compiled.  Quoting from
an old post of mine, "The most common cause of I/O errors being
reported as error number 0 on Linux is a problem with threads.  With
WITH_THREAD defined, GNU libc provides a thread-specific errno
variable by defining errno as "*(errno_location())"; without
WITH_THREAD, it's defined as "extern int errno".  Errors of zero can
therefore occur if different object files were compiled with different
definitions of errno, since one file winds up looking in the wrong
place."

Could something similar be happening with your Windows build of
Python?

--amk