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

processor gets stuck in shutdown after error #176

Closed
frairon opened this issue Mar 8, 2019 · 2 comments
Closed

processor gets stuck in shutdown after error #176

frairon opened this issue Mar 8, 2019 · 2 comments

Comments

@frairon
Copy link
Contributor

frairon commented Mar 8, 2019

We have seen cases where a running processor gets stuck while shutting down, when one of the brokers goes down or the metadata is changed due to e.g. rebalance.
The error is supposedly a kafka.Promise that is never finished, because the producer gets cancelled. This leads to the waitgroup in https://github.com/lovoo/goka/blob/master/partition.go#L142 to never get done, so the partition never shuts down, thus the whole processor gets stuck.
We could not reproduce the bug, but a stack trace of one of the stuck processors showed this location.

PR is open, hope that will fix the issue.

@db7
Copy link
Collaborator

db7 commented Mar 8, 2019

The producer does not get canceled on rebalance. I think it should be then related to some error on emitting a message. Do you have the stack trace?

@frairon
Copy link
Contributor Author

frairon commented Mar 8, 2019

Sorry, my bad. The example was just wrong.
What happens is in this order:

  • a broker goes down
  • the leader of some partitions is not availble anymore
  • emitting fails (and sometimes the error is, that metadata has changed)
  • that makes the processor close the producer
  • the producer stops processing the Success/Error channels
  • the message processing is incomplete, the waitgroup is never finished
  • the partition cannot shutdown
  • the processor is stuck

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

No branches or pull requests

2 participants