concurrency=eventlet leaking?

Issue #330 resolved
David Szotten
created an issue

Been trying to debug a really strange error that appeared when using coverage --concurrency=eventlet ("Name or service not known: localhost)

Finally tracked it down to running out of file descriptors, and now that i know what to look for, i can see them build-up (using e.g. lsof). I had already noticed memory growing but had chalked that down to book-keeping, but i guess this might be related

are we accidentally preventing gc?

Removing the --concurrency flag stops the issue

Comments (3)

  1. David Szotten reporter

    think this small example highlights the issue:

    from weakref import WeakSet
    import eventlet
    
    
    def do():
        pass
    
    gts = WeakSet()
    gts.add(eventlet.spawn(do))
    
    print list(gts)
    eventlet.sleep(.1)
    print list(gts)
    
    $ coverage run test.py
    [<eventlet.greenthread.GreenThread object at 0x1072f3cd0>]
    []
    
    
    coverage run --concurrency=eventlet test.py
    [<eventlet.greenthread.GreenThread object at 0x10e33ee10>]
    [<eventlet.greenthread.GreenThread object at 0x10e33ee10>]
    
  2. Log in to comment