burke / zeus

Boot any rails app in under a second.
MIT License
3.33k stars 231 forks source link

Terminated: 15 #598

Open typeoneerror opened 7 years ago

typeoneerror commented 7 years ago

Sorry for the issue spam, but occasionally when I run rspec through zeus I get this error and it just doesn't run. I'd like to know what it means if it's related to Zeus.

thedrow commented 7 years ago

We're experiencing it too on some of our development machines although I'm not sure what the problem is. Restarting zeus resolves the issue.

sideshowcoder commented 7 years ago

This error gets thrown when trying to trigger during restart of a worker at a certain point (not sure when exactly) I have seen this as well. Basically what seems to be happening

  1. A file is changed
  2. Immediatly run a command with zeus
  3. zeus restarts the worker to run the command
  4. error

There seems to be a race between 2 and 3 as far as I can see. Not sure where exactly so.

gltarsa commented 7 years ago

I would add to @sideshowcoder's comment that testarting Zeus is not necessary; retrying the command will eventually succeed. This supports the idea of a race condition of some kind.

sideshowcoder commented 7 years ago

Sorry for the confusion I was referring to zeus restarting the process it internally dispatches to when a command is issued from the client, and before this internal process is ready to receive command again the command should wait. It normally does wait but it seems like in certain situations (aka race) the command does not get blocked to wait but issued at a process which is either not ready to receive it or is in the process of shutting down.

speckins commented 5 years ago

To avoid manually re-running test commands, I've found this incantation to be a helpful workaround:

$ while zeus test <testname.rb>; [ $? -eq 143 ]; do : ; done

When the "Terminated 15" error occurs, the exit status is different from that of a failing test run, so this command just re-runs it until it doesn't encounter that exit status.