I located an issue with leaking file descriptors in the ZEO tests and
have a simple proposal how to fix it. (I can imagine a better way to
exist but can't see one right now.)

Here's what happens:

- The (single) thread in the client process uses a

- The __init__ of ManagedClientConnection's super class causes a trigger
  to be created which will then be replaced with a shared trigger by
  ManagedClientConnection's __init__.

- Unfortunately at this time the trigger that got temporarily created
  won't be garbage collected (or at least the file descriptor won't be),
  as asyncore holds a shared, module-global map of file descriptor
  numbers to file descriptor objects.

I fixed it for me by explicitly closing the trigger in
ManagedClientConnection before replacing it with the shared one.

After that, the number of file descriptors used by the test becomes
stable and my tests for the almost-merged iterator branch can run


Christian Theune · [EMAIL PROTECTED]
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1
Zope and Plone consulting and development

Attachment: signature.asc
Description: This is a digitally signed message part

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to