-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
consume thread takes 100% cpu #2084
Comments
Please fill out the checklist: What's your client configuration and platform? |
I already fill out the checklist, do i need to to provide any other information? |
Thank you. Can you share relevant parts of your code? |
Okay, i will try as you say Today, i encounter another problem with the same phenomenon(consumer can't get any msg) . The last error msg is "Local: Broker transport failure", what does it mean? Follow is my code:
I create a thread to consume message from kafka, then post it to my working thread. |
I already reproduce this issue.
The debug environment is still running, what other information can i offer? |
Thank you. Both the cnd and mutex looks alright. |
Hi, In the above stack, what you say is right, Both the cnd and mutex looks alright, but the tspec is wrong. U can see that the ts->tv_nsec = 1000000000, It's an invalid value, Its interval must in[0,1000000000).
|
@edenhill hi! Will this be fixed in 11.6? And if so, do you have any idea when? Thx for info |
v0.11.6 has already been released. |
Sure, I will give it a try in our master branch (but because of breaking changes it will need some time). Anyway for our deployed solutions, could we expect fix in 11.6 version successor? I mean is 11.7 on plan? And if no, is there any timeschedule for 1.0 GA? Thanks |
The librdkafka project only maintains one release train, the latest release is always GA unless otherwise noted. |
Had this been fixed I wonder? I have the case in 0.11.6: #1858 (comment) |
Sorry for late answer, in 1.0 it works fine |
Description
After running my program for a period of time, i found that my consume thread takes 100% cpu
The stack is as follows:
#0 0x00007f9de4e09950 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00000000007b4c09 in cnd_timedwait (cond=, mtx=, ts=) at tinycthread.c:469
#2 0x00000000007b4fbd in cnd_timedwait_abs (cnd=cnd@entry=0xbac2c88, mtx=mtx@entry=0xbac2c60, tspec=tspec@entry=0x7f9dad7f8520) at tinycthread_extra.c:100
#3 0x000000000077d571 in rd_kafka_q_pop_serve (rkq=rkq@entry=0xbac2c60, timeout_ms=, version=version@entry=0, cb_type=cb_type@entry=RD_KAFKA_Q_CB_RETURN, callback=callback@entry=0x0, opaque=opaque@entry=0x0) at rdkafka_queue.c:373
#4 0x000000000077d640 in rd_kafka_q_pop (rkq=rkq@entry=0xbac2c60, timeout_ms=, version=version@entry=0) at rdkafka_queue.c:399
#5 0x000000000074ea55 in rd_kafka_consume0 (rk=0xbac1be0, rkq=0xbac2c60, timeout_ms=) at rdkafka.c:2239
#6 0x0000000000741a7a in RdKafka::KafkaConsumerImpl::consume (this=, timeout_ms=) at KafkaConsumerImpl.cpp:112
when i debug it, i found it dead cycle at rdkafka_queue.c:342
the pthread_cond_timedwait return 22, maybe the condition variable is invalid?
How to reproduce
I also don't know....
Checklist
IMPORTANT: We will close issues where the checklist has not been completed.
Please provide the following information:
<REPLACE with e.g., v0.10.5 or a git sha. NOT "latest" or "current">
<REPLACE with e.g., 0.10.2.3>
<REPLACE with e.g., message.timeout.ms=123, auto.reset.offset=earliest, ..>
<REPLACE with e.g., Centos 5 (x64)>
debug=..
as necessary) from librdkafkaThe text was updated successfully, but these errors were encountered: