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
BrokerConnection: deadlock casused by not handled socket recv exception, exists in latest master branch #1817
Comments
here is simple patch to avoid the deadlock, but lock guard instead of lock acquire/release is beter... diff --git a/kafka/conn.py b/kafka/conn.py
index 044d2d5..f5feb99 100644
--- a/kafka/conn.py
+++ b/kafka/conn.py
@@ -967,6 +967,8 @@ class BrokerConnection(object):
break
self._lock.release()
raise
+ except Exception as e:
+ log.exception(f'{type(e)} {e} unhandled exception.') |
Thanks for the bug report -- are you configuring TCP KeepAlive, perchance? |
default config |
Looks like this is fixed by #1820 |
Looks like i met the same problem.
|
kafka-python: 1.4.6
here is my code snippet :
traceback:
The text was updated successfully, but these errors were encountered: