-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
crashes on too large messages #24
Comments
Hi, could you provide the full output from gdb: thread apply all bt You can trim out any parts of your program you dont want to expose, but please try to retain librdkafka call chains. Thanks |
HI,
|
Could you write this in gdb after crash, instead of 'bt': thread apply all bt full |
··· Thread 54 (Thread 0x7f8160dfa700 (LWP 29596)): Thread 53 (Thread 0x7f81317fb700 (LWP 29607)): Thread 52 (Thread 0x7f810ffff700 (LWP 29609)): Thread 51 (Thread 0x7f8147fff700 (LWP 29597)): Thread 50 (Thread 0x7f80da1fc700 (LWP 29624)): Thread 49 (Thread 0x7f8163fff700 (LWP 29591)): Thread 45 (Thread 0x7f81475fe700 (LWP 29598)): Thread 44 (Thread 0x7f81617fb700 (LWP 29595)): Thread 43 (Thread 0x7f8146bfd700 (LWP 29599)): Thread 42 (Thread 0x7f80b61fc700 (LWP 29636)): Thread 41 (Thread 0x7f80af5fe700 (LWP 29640)): Thread 40 (Thread 0x7f8130dfa700 (LWP 29608)): Thread 39 (Thread 0x7f810ebfd700 (LWP 29611)): ---Type to continue, or q to quit--- Thread 37 (Thread 0x7f80b75fe700 (LWP 29635)): Thread 36 (Thread 0x7f80f57fb700 (LWP 29619)): Thread 35 (Thread 0x7f80f6bfd700 (LWP 29617)): Thread 34 (Thread 0x7f80f4dfa700 (LWP 29620)): Thread 33 (Thread 0x7f816a647700 (LWP 29588)): Thread 32 (Thread 0x7f81461fc700 (LWP 29600)): Thread 31 (Thread 0x7f810d7fb700 (LWP 29613)): Thread 30 (Thread 0x7f8162bfd700 (LWP 29593)): Thread 29 (Thread 0x7f81457fb700 (LWP 29601)): Thread 28 (Thread 0x7f80dbfff700 (LWP 29621)): Thread 27 (Thread 0x7f80affff700 (LWP 29639)): Thread 26 (Thread 0x7f80be1fc700 (LWP 29631)): Thread 25 (Thread 0x7f80bd7fb700 (LWP 29632)): Thread 24 (Thread 0x7f80f75fe700 (LWP 29616)): Thread 23 (Thread 0x7f810e1fc700 (LWP 29612)): Thread 22 (Thread 0x7f80bcdfa700 (LWP 29633)): Thread 21 (Thread 0x7f81335fe700 (LWP 29604)): Thread 20 (Thread 0x7f8169c46700 (LWP 29589)): Thread 19 (Thread 0x7f8133fff700 (LWP 29603)): Thread 18 (Thread 0x7f810cdfa700 (LWP 29614)): Thread 17 (Thread 0x7f81321fc700 (LWP 29606)): Thread 16 (Thread 0x7f810f5fe700 (LWP 29610)): Thread 15 (Thread 0x7f8144dfa700 (LWP 29602)): Thread 14 (Thread 0x7f8169245700 (LWP 29590)): Thread 13 (Thread 0x7f80f7fff700 (LWP 29615)): Thread 12 (Thread 0x7f80bffff700 (LWP 29627)): Thread 11 (Thread 0x7f8132bfd700 (LWP 29605)): Thread 10 (Thread 0x7f80d97fb700 (LWP 29625)): Thread 9 (Thread 0x7f80dabfd700 (LWP 29623)): Thread 8 (Thread 0x7f80aebfd700 (LWP 29641)): Thread 7 (Thread 0x7f80f61fc700 (LWP 29618)): Thread 6 (Thread 0x7f80b4dfa700 (LWP 29638)): Thread 5 (Thread 0x7f80b7fff700 (LWP 29634)): Thread 4 (Thread 0x7f80bf5fe700 (LWP 29628)): Thread 3 (Thread 0x7f80ae1fc700 (LWP 29642)): Thread 2 (Thread 0x7f80b6bfd700 (LWP 29629)): Thread 1 (Thread 0x7f80d8dfa700 (LWP 29626)): ··· |
Could you check one more thing for me, when it crashes in rd_kafka_broker_produce_toppar(), type: and paste that into this bug issue report. How large are the messages you are producing? (they need to be smaller than message.max.bytes, which you can increase as you see fit but remember to do it on the broker aswell) |
··· |
How large are the messages you are producing? (they need to be smaller than message.max.bytes, which you can increase as you see fit but remember to do it on the broker and consumers aswell) |
for log size, |
I think this happens because you are trying to produce a message larger than "message.max.bytes", which is not handled correctly (I will fix that). Could you type this in gdb: |
(gdb) p *rktp->rktp_xmit_msgq.rkmq_msgs.tqh_first |
Sorry, try:
The message is 6.2Mb, and if you havent changed "messages.max.bytes" which defaults to 4Mb, then the message is too large to be produced and triggers a bug. I will push a fix for this causing the rd_kafka_produce() call to fail with errno set to EMSGSIZE. Ive reproduced this locally:
What you want to do is increase "messages.max.bytes" to fit your messages:
|
(gdb) p rkb->rkb_rk->rk_conf.max_msg_size |
Yep, what I thought. Thanks. |
greate, waiting for your patch. Thanks~! |
Producing a message larger than "message.max.bytes" will now make rd_kafka_produce() return -1 and set errno to EMSGSIZE.
Could you update and verify that this issue has been fixed in your setup aswell? |
OK, I will check it. |
I already test in my side, it works. |
I want to use librdkafa in my project, but when I do test, it cause my app crash.
my situation is, in main thread create neccessary object, and multithread will call rd_kafka_produce to send the message to kafka server.
when the application runnig sometimes, it will crashed. the call stack like following:
The text was updated successfully, but these errors were encountered: