GithubHelp home page GithubHelp logo

New leak, on process spawn about async HOT 3 OPEN

clementfarabet avatar clementfarabet commented on August 24, 2024
New leak, on process spawn

from async.

Comments (3)

soumith avatar soumith commented on August 24, 2024

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.

from async.

clementfarabet avatar clementfarabet commented on August 24, 2024

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.

from async.

soumith avatar soumith commented on August 24, 2024

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" [email protected] 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
.

from async.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.