node icon indicating copy to clipboard operation
node copied to clipboard

Node 6 uses full CPU core

Open alejandroiglesias opened this issue 10 years ago • 12 comments

  • Version: 6
  • Platform: OSX 10.11.4
  • Subsystem:

Node process starts using a 100% CPU core after updating from 5.10.1 to version 6. Not sure what other details to give other that I ran npm start on my project which runs the following command: webpack-dev-server --port 4444 --hot --inline --progress --colors. I have the same running at 0.0 CPU usage right now with version 5.10.1. If you need more information, please let me know.

alejandroiglesias avatar Apr 29 '16 00:04 alejandroiglesias

You should probably try asking at https://github.com/webpack/webpack-dev-server rather than here, if that specific application is affected.

addaleax avatar Apr 29 '16 01:04 addaleax

Sounds like a duplicate of https://github.com/nodejs/node/issues/6416

Fishrock123 avatar Apr 29 '16 01:04 Fishrock123

@Fishrock123 That sounds very unlikely, among other things because that other issue is actually rather about infinite recursion than about an infinite loop and throws an RangeError almost instantly. Plus, #6416 is ancient and not new in v6.

addaleax avatar Apr 29 '16 01:04 addaleax

@alejandroiglesias Can you peek into the process to see what it's doing (e.g. using strace or even trying to attach to the node debugger if possible)?

mscdex avatar Apr 29 '16 02:04 mscdex

I'm seeing the same thing. Not using dev server but I am using web pack and karma. Any thing that continues execution in a watch mode takes a full core: karma start, web pack -w and web storm's integration with karma. Just wanted to add detail to this issue.

babeal avatar Apr 30 '16 06:04 babeal

same issue when use v6 && webpack -w it look like fs.watch change?

skyblue avatar May 26 '16 02:05 skyblue

Has anyone reported this to webpack yet? We can't do much without a minimal test case. If it requires installing all of webpack, I doubt anyone is going to look at it.

bnoordhuis avatar May 26 '16 07:05 bnoordhuis

IIRC, both Karma and Webpack use Chokidar under the hood, so this might be paulmillr/chokidar#447

Florian-R avatar May 26 '16 08:05 Florian-R

We observed the same issue with a meteor-application (not using webpack).

On node4, cpu is low, on node6 always 100% (but in io-wait or similar)

macrozone avatar Sep 27 '16 09:09 macrozone

npm rebuild fsevents fixed it for me.

mulleady1 avatar Oct 28 '16 22:10 mulleady1

I'll go ahead and close this then. It doesn't appear to be an issue with node.js core.

bnoordhuis avatar Oct 29 '16 07:10 bnoordhuis

so, it is caused by webpack-server-dev????

plh97 avatar Aug 24 '19 03:08 plh97