Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

CTRL-C with --max-retries=0 doesn't kill all processes #38

Open
casey-speer opened this issue Apr 3, 2017 · 3 comments
Open

CTRL-C with --max-retries=0 doesn't kill all processes #38

casey-speer opened this issue Apr 3, 2017 · 3 comments
Labels

Comments

@casey-speer
Copy link

I'm running four webpack builds in parallel and occasionally have to terminate early by pressing CTRL-C.

When I press CTRL-C, I see the output about forcefully shutting down the child processes, but the main process stays alive and hangs without exiting. I need to press CTRL-C 1-2 more times to kill everything. I can verify that --max-retries=0 is getting correctly passed in. FWIW, one of my builds finishes rather quickly and the other three are longer running, so usually the SIGINT is sent after the first one is complete. Looks like if I CTRL-C quick enough before any builds have finished, the processes all terminate as expected.

Here is some example output from CTRL-C'ing later in the build:

^C[WEBPACK] Forcefully shutting down

(node:38167) Warning: a promise was rejected with a non-error: [object Object]
[WEBPACK] Build failed after 1.783 seconds
(node:38167) Warning: a promise was rejected with a non-error: [object Object]
(node:38167) Warning: a promise was rejected with a non-error: [object Object]
[WEBPACK] Forcefully shut down [name].js
CSPEER:(myBranch ⚡)$ events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: channel closed
    at process.target.send (internal/child_process.js:540:16)
    at callback (/Users/cspeer/repos/my-repo/node_modules/worker-farm/lib/child/index.js:29:17)
    at process.shutdownCallback (/Users/cspeer/repos/my-repo/node_modules/parallel-webpack/src/webpackWorker.js:96:17)
    at emitNone (events.js:86:13)
    at process.emit (events.js:185:7)
    at Signal.wrap.onsignal (internal/process.js:199:44)

CSPEER:(myBranch ⚡)$ events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: channel closed
    at process.target.send (internal/child_process.js:540:16)
    at callback (/Users/cspeer/repos/my-repo/node_modules/worker-farm/lib/child/index.js:29:17)
    at process.shutdownCallback (/Users/cspeer/repos/my-repo/node_modules/parallel-webpack/src/webpackWorker.js:96:17)
    at emitNone (events.js:86:13)
    at process.emit (events.js:185:7)
    at Signal.wrap.onsignal (internal/process.js:199:44)
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: channel closed
    at process.target.send (internal/child_process.js:540:16)
    at callback (/Users/cspeer/repos/my-repo/node_modules/worker-farm/lib/child/index.js:29:17)
    at process.shutdownCallback (/Users/cspeer/repos/my-repo/node_modules/parallel-webpack/src/webpackWorker.js:96:17)
    at emitNone (events.js:86:13)
    at process.emit (events.js:185:7)
    at Signal.wrap.onsignal (internal/process.js:199:44)

This is more of an annoyance than anything else most of the time, but sometimes results in stray processes left running. Not sure if this is an issue with worker farm or parallel-webpack's own worker management.

@pago pago added the bug label Apr 11, 2017
@siebertm
Copy link

this might be related to #57

@lubomir-chatoryiskyi
Copy link

Hello! Was this issue solved somehow?

@efegurkan
Copy link
Contributor

@lubomir-chatoryiskyi Unfortunately not at he moment. It will be fixed when we release 3.0.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants