Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leaking with delegator.chain()? #75

Open
psilocyber opened this issue Aug 1, 2019 · 0 comments
Open

Memory leaking with delegator.chain()? #75

psilocyber opened this issue Aug 1, 2019 · 0 comments

Comments

@psilocyber
Copy link

psilocyber commented Aug 1, 2019

I get a memory leak when using certain commands with the chain function. I boiled it down to this simple test case

import delegator

def run_shell_chain(cmd):
	return delegator.chain(cmd).out.strip("\n")

for i in range(50000):
	output = run_shell_chain("iostat -m -y 1 1")
	print(output)

If I watch ps, I can see the memory footprint increase indefinitely.

I cannot reproduce it with a simple piped hello world command. (echo 'hello world' | sed 's/hello/goodbye/')

System info

>>> pkg_resources.get_distribution("delegator.py").version
'0.1.1'

$ python3 -V
Python 3.6.8

 ~$ uname -a
4.18.0-25-generic #26~18.04.1-Ubuntu SMP Thu Jun 27 07:28:31 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

delegator-chain-with-original-cmd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant