Replies: 1 comment
-
Can you try running your C application with valgrind? It helps find these types of errors Also upgrade to the latest librdkafka version 1.8.2. And I strongly suggest not to use the legacy consumer (start, stop) but the modern one where you use assign() to specify partitions. Also note that the consumer pre-fetches messages (up to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using single node Kafka as a message broker between a C application (model) and a Python application (controller). Both sides - i.e. model and controller produce and consume, from separate topics. The workflow is as below:
The apps are supposed to run for long times - 3-5 months. And each produce - consume cycle happens at around 1-5 seconds interval. Ideally, I want a synchronous producer and a synchronous consumer. i.e. the execution should wait until data is received and so on.
The setup works fine for sometime and then the C side consumer crashes with the error:
malloc(): mismatching next->prev_size (unsorted)
.I was able to capture the stack trace using GDB, and it is below:
I have tried both the high-level consumer as well as the simple consumer.
Any pointers in debugging this are appreciated.
I am using librdkafka v1.6.2 C library, confluent-kafka python package and Kafka broker using confluentinc/cp-latest (3.0).
The code in my consumer function is below:
I have also tried keep the consumer start stop calls, in the initialization function and only call them once at the beginning, but the behavior has not changed. Crashes still happen at random intervals during the program execution and the Python process is up and waiting for response from the C app.
Beta Was this translation helpful? Give feedback.
All reactions