-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
Weird hanging bug with --kill-others #104
Comments
Oh, just when I've filed an issue I find out what the problem is, as always. Apparently alpine uses busybox as Solution? I'm not sure. Perhaps |
So just when I've made an issue I find out what the problem is, as always. alpine uses busybox ash for Busybox ash will fork any commands given by Solution?Replace Or change Not sure which would be the best idea. Not a concurrently issue, but may be related to other issues here |
Great that you found a solution, @Maistho. By the way, you could try concurrently v3.2 or older; they used another dependency to spawn commands: |
Hi, I am seeing the same behavior when running in a alpine docker container. The same npm script, same node_modules directory, just mapped into a ubuntu docker container, will kill the other process. |
@cuipengfei yup, you'll need to use bash instead of the builtin shell in alpine. I have a docker image that uses bash instead, kadadev/node-small, that you might use. If you want to run your own image you can take a look at my dockerfile to see how to switch to bash |
I give up with running docker-compose on Travis CI. Using `bash` instead of Linux alpine's `sh` does **not** fix the issue as suggested here: https://github.com/kimmobrunfeldt/concurrently/issues/104
@Maistho linking |
@gustavohenke should this be reopened? |
Ideas on how to fix this in concurrently? |
Untested workaround: BTW I'm confused why OP's shell exits after forking. If the shell stuck around, concurrently should be able to kill both it and its children (it uses https://github.com/pkrumins/node-tree-kill). Untested idea: what if concurrently put each command in its own process group, then sent signal to whole groups rather than specific pids it saved? This is roughly how job control works in shells, and how Ctrl+C is delivered reliably. |
FWIW, |
I was bit by this, and it took a while to narrow down on In my case (details below), it was about a piping command making
Steps: You need: Node 14 or 16; npm 7.7+, Docker
Works in desktop (anything with bash and grep):
To try with Alpine, let's build a Docker image.
..and run it
This gets stuck, after the tests. Work-around: Have separate If you get time outs, comment out the |
Still reproducible in 7.6.0. I noticed that referencing another npm script (i.e. "npm:dev") causes the hanging, but writing the script directly seems to work fine. |
Hi,
I've found a superweird bug that I'd like some help to figure out what to do with.
When running concurrently in my node-alpine docker container, PIDs are (consistently) one off.
To test this, I modified concurrently to print the PID first when spawning a child process, and also when trying to kill them in
killOtherProcesses
. http-server is constantly one higher than the saved PID.Example output:
So it's trying to kill http-server on 1300, but http-server is actually on 1301. If I change the code to kill
child.pid+1
instead, all is fine...Any ideas? I'm stumped for ideas where to look further.
The text was updated successfully, but these errors were encountered: