plumbum leaking Popen objects

223 Views Asked by At

I have a daemon-like process which runs commands in subprocesses using plumbum. I noticed it leaks Popen objects.

Easy to reproduce:

from plumbum.cmd import ls
x = [ ls() for i in range(500) ]
del x
import gc
gc.collect()
import objgraph
[ x for x in objgraph.most_common_types(10000) if 'Popen' in str(x) ]
=> [('Popen', 500)]

Is this a bug? (I couldn't find where to report bugs in plumbum...)

I also "experimented" with modifying the leaking Popen objects, trying to break the reference-cycle (assuming one exists, to cause the leak), but it didn't help.

Running on linux, plumbum version 1.14.0.

1

There are 1 best solutions below

1
On BEST ANSWER