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

Worker children not killed immediately when reaching --kill-after #25

Closed
ryanwitt opened this issue Jan 29, 2018 · 0 comments
Closed

Worker children not killed immediately when reaching --kill-after #25

ryanwitt opened this issue Jan 29, 2018 · 0 comments
Assignees

Comments

@ryanwitt
Copy link
Member

Observed in production that child processes do not exit and become orphaned once --kill-after is reached. Saw this on the command line.

Also see separate orphaned child processes on some production machines.

Theory on what's happening:

qdone uses child_process.exec (not to be confused with exec(3)) to execute children within a shell.

It seems like exec's timeout option (that we use to send SIGTERM to the child if it reaches the timeout) does not actually kill the child of the shell (observed on Ubuntu 16.04).

Seems like a fairly useless option for exec. Maybe a better option for execFile?

Workarounds:

  1. Kill the qdone process group?
  2. Find the PID of the child (not the child shell, but shell's child) and manually signal that.

I'm starting this ticket to record my findings, but it may be worth checking node issues as well to see if anybody has run into this strange design on exec.

@ryanwitt ryanwitt changed the title Worker children not killed immediately when reaching --kill-after? Worker children not killed immediately when reaching --kill-after Jan 29, 2018
@ryanwitt ryanwitt self-assigned this Jun 14, 2018
ryanwitt added a commit that referenced this issue Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant