facebookarchive / nuclide

An open IDE for web and native mobile development, built on top of Atom
https://nuclide.io
Other
7.79k stars 683 forks source link

Nuclide does not kill flow process #664

Open montogeek opened 8 years ago

montogeek commented 8 years ago

Issue and Steps to Reproduce

Open Nuclide, work with Flow, close Nuclide.

Expected Behavior

Kill flow process when Nuclide is closed

Actual Behavior

flow process are still running after closing Nuclide

Versions

nmote commented 8 years ago

I just double-checked to make sure that Nuclide properly kills Flow and for me it still does. I'm not sure what's going on here. I'm on Atom 1.9.6 and OS X 10.11.6 so I suppose one of those version differences could affect it.

Nuclide only kills Flow if it starts the Flow server itself. If there is already a Flow server, Nuclide will not kill it. Were you using Flow on the command line as well?

Could you paste the output of ps -eaf | grep flow after closing Atom?

montogeek commented 8 years ago

I am not using flow in the command line, I have installed flow-bin version 0.30.0. I am able to reproduce the bug with the following steps:

  1. Open Atom (Nuclide),
  2. Open Flow annotated file
  3. Work on file
  4. Quit Atom (Nuclide)

ps -eaf | grep flow output:

👉 ps -eaf | grep flow 501 5580 1 0 3:47PM ?? 0:02.10 /Users/montogeek/.nvm/versions/v5.3.0/lib/node_modules/flow-bin/vendor/flow server --from nuclide --max-workers 2 /Users/montogeek/project-js 501 5582 5580 0 3:47PM ?? 0:00.05 /Users/montogeek/.nvm/versions/v5.3.0/lib/node_modules/flow-bin/vendor/flow 501 5583 5580 0 3:47PM ?? 0:00.05 /Users/montogeek/.nvm/versions/v5.3.0/lib/node_modules/flow-bin/vendor/flow 501 5584 5580 0 3:47PM ?? 0:00.74 /Users/montogeek/.nvm/versions/v5.3.0/lib/node_modules/flow-bin/vendor/flow 501 5852 4923 0 3:49PM ttys000 0:00.00 grep flow

When reproducing the bug I had Activity monitor opened in another monitor, when I opened the Flow annotated file I saw a few flow process started, after closing Nuclide they were still running.

I updated this morning to macOS Sierra Beta 4, Atom 1.9.8 and Nuclide 0.161.0, problem persists.

nmote commented 8 years ago

Thanks for the additional details. I wasn't using flow-bin so I will try reproducing the issue with a global installation of flow-bin. It seems plausible that the way it invokes Flow could mean that the way we kill it won't work.

montogeek commented 8 years ago

@nmote I was using flow bin from homebrew, but uninstalled it in favor of flow-bin (https://github.com/flowtype/flow-bin) since it is recommended in the docs :)

Any idea @gabelevi? Thanks!

montogeek commented 8 years ago

Sometimes I find myself in this situation: screen shot 2016-08-11 at 20 13 41

nmote commented 8 years ago

Specifically are you unhappy about the memory usage? If so you'll need to report that on the Flow repo, that is not Nuclide's domain.

montogeek commented 8 years ago

@nmote Sorry