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

EventEmitter memory leak #321

Closed
ehmicky opened this issue Jun 25, 2019 · 2 comments · Fixed by #330
Closed

EventEmitter memory leak #321

ehmicky opened this issue Jun 25, 2019 · 2 comments · Fixed by #330

Comments

@ehmicky
Copy link
Collaborator

ehmicky commented Jun 25, 2019

Steps to reproduce:

index.js:

import execa from 'execa'

(async () => {
  const childProcess = execa('echo', ['test'])
  await childProcess
  await childProcess
  await childProcess
  await childProcess
  await childProcess
})()
$ node index.js
(node:12764) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit
(node:12764) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit

Node v12.4.0
Ubuntu 19.10
Execa 2.0.0

This might not be an issue, but simply us setting more than 10 global listeners. But I would like to investigate this to make sure.

@ehmicky
Copy link
Collaborator Author

ehmicky commented Jun 26, 2019

This seems to be a bug with pump, a dependency of get-stream that we use to retrieve streams with promises. Stream.pipeline() (available since Node 10.0.0) is a copy/paste of pump so I submitted a bug report directly to Node.

If this happened to a bug, I will submit a bug report to pump so they hopefully fix it (but the repository does not look actively maintained).

@ehmicky
Copy link
Collaborator Author

ehmicky commented Jun 26, 2019

PR at #330.

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

Successfully merging a pull request may close this issue.

1 participant