-
Notifications
You must be signed in to change notification settings - Fork 914
Consumer close() function hungs and prevent app exit #1573
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
Comments
versions: |
I wonder if somebody can provide some reply. I need to understand if this issue makes sense and some refactoring could be done is scope of it. |
Can you provide code snippet that you are using? I will try to replicate the issue. |
I will try to create a sample. Here is strace and gdb log just in case: root@agent-2:~# cat /tmp/strace.txt (gdb) info threads
Thread 8 (Thread 0x7fc6f1ffb700 (LWP 34)): Thread 7 (Thread 0x7fc6f2ffd700 (LWP 32)): Thread 6 (Thread 0x7fc6f3fff700 (LWP 30)): Thread 5 (Thread 0x7fc6f8f5b700 (LWP 29)): Thread 4 (Thread 0x7fc6f975c700 (LWP 28)): Thread 3 (Thread 0x7fc6f9f5d700 (LWP 27)): Thread 2 (Thread 0x7fc6fa75e700 (LWP 26)): Thread 1 (Thread 0x7fc6fd83b740 (LWP 24)): #63 0x00000000005faa2e in _start () (gdb)
|
@pranavrth could you please have a look to the code I've provided in this issue's description. What do you think is it a bug or just wrong documentation about 'rd_kafka_queue_destroy' call order? |
The documentation is right and the code is also right. As far as I understand, queue reference is created in the Python app and hence it is cleared after destroying the consumer. This issue is not caused because of the ordering. Can you provide your code which is causing the issue? |
I've tried to create small sample but can't reproduce it quickly. Originally I've reproduced it when consumer worked and topic was deleted. if the code order is right we can close this item. I will create new issue with a code sample when I am able to reproduce it in more or less permanent way. |
I'm trying to resolve an issue I've faced with a consumer finalization:
A consumer had subscribed to a Topic and was processing data from the Topic. Then the Topic was deleted.
After some time the Consumer received error about non-existing topic and my application tried to perform consumer.close()
But unfortunately, the close() hang.
I've tried to investigate it a bit and see that it stuck at some wait lock "futex(0x7fc6f2ffd9d0, FUTEX_WAIT, 32, NULL"
I am not familiar much with rdkafka or confluent-kafka-python projects but see one inconsistency:
here rd_kafka_queue_destroy is called after consumer close
confluent-kafka-python/src/confluent_kafka/src/Consumer.c
Line 1105 in baf71ea
but documentation says that it should be called before
https://github.com/confluentinc/librdkafka/blob/4b63c6c8881968f7185da33f09cbd69561bb612c/src/rdkafka.h#L3432
The text was updated successfully, but these errors were encountered: