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

New leak, on process spawn #12

Open
clementfarabet opened this issue Feb 14, 2014 · 3 comments
Open

New leak, on process spawn #12

clementfarabet opened this issue Feb 14, 2014 · 3 comments

Comments

@clementfarabet
Copy link
Owner

here's a test that demonstrates it. Node idea where it comes from yet.

@soumith
Copy link
Contributor

soumith commented Feb 14, 2014

From a glance, it looks like another reference counting issue.
increases the refcount here luv_functions.c line 1367

But on killing the process with uv.process_kill it doesn't decrease the refcount.
After killing a process, you have to explicitly close the handle with uv.close in
https://github.com/clementfarabet/async/blob/master/async/process.lua line 24

I think that might fix it.

@clementfarabet
Copy link
Owner Author

You can't close it directly after, you need to wait for the onexit event, and then close it, which is how I'm doing it right now. I also close the stdin, stdout, and stderr.

@soumith
Copy link
Contributor

soumith commented Feb 14, 2014

Ah OK. Then maybe check if onexit is getting generated when kill is called?

What about a test where you don't kill the process and it finished cleanly.
Does it leak then as well?
On Feb 14, 2014 9:44 AM, "Clement Farabet" notifications@github.com wrote:

You can't close it directly after, you need to wait for the onexit event,
and then close it, which is how I'm doing it right now. I also close the
stdin, stdout, and stderr.

Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-35054280
.

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

2 participants