Closed pyramation closed 5 years ago
I'll see if someone can take a look at this.
Can you give instructions for reproducing it? I.e. s code repo? It's not clear which function you are removing or which one is running every through seconds.
We should be able to sort out the nil pointer.
@alexellis sure thing, let me get an example going.
Specifically, here is where the crash happens: https://github.com/pyramation/nats-queue-issue-43/blob/master/scripts/crash.sh#L26
One thing to note is that Kubernetes doesn't do anything new instant deletion, so I recommend using a rolling update instead of a delete/create.
I believe this is resolved with the latest changes in master. Please can someone confirm?
For future reference, the related PR is #44
I verified that the script supplied by @pyramation causes a panic before #44 @alexellis I verified the fix from #44 works and the panic does not occur when running the same script
Derek close: fixed in latest release
Derek close
Wonder if you're in the file @ewilde?
I have a service that is trying to call asynchronous functions at the same time those functions are being re-deployed.
Expected Behaviour
I would expect a caught error rather than seg fault or null pointer ref.
Current Behaviour
The queue-worker seems to have a fatal crash. Good news is, once the functions are re-deployed, everything does go back to normal.
Steps to Reproduce (for bugs)
foo
foo
function asynchronously every few secondsworker-queue
logsfaas remove
thenfaas deploy
the functionfoo
Context
Implementing a jobs system. If any of those jobs needs to be re-deployed, I imagine in production having to
remove
anddeploy
.Potentially there is a more graceful way to
remove
anddeploy
, but I imagine we still wouldn't want something as core as thenats-queue-worker
to have a fatal crash in this situation, given the fact that other functions that need to be called async may still be deployed, and it would be hard to notify external services and tell them to stop calling the functions during a (re)deployment.Your Environment
Docker for mac (k8s)