Skip to content
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

KafkaConsumer segfault #608

Closed
vdeters opened this issue Apr 12, 2016 · 4 comments
Closed

KafkaConsumer segfault #608

vdeters opened this issue Apr 12, 2016 · 4 comments

Comments

@vdeters
Copy link

vdeters commented Apr 12, 2016

Hello,
My KafkaConsumer segfaulted while sitting in a consume(1000) loop with nothing happening except repeated ERR__TIMED_OUT. Did I neglect to hook up some callback? Using master as of 4/6. Thanks,
Vince

(gdb) where
#0 0x00007ffff5b3b0f8 in ?? ()
#1 0x00007fffe6230d9b in RdKafka::log_cb_trampoline (rk=,

level=3, fac=<optimized out>, 
buf=0x7fffdd110900 "localhost:9092/bootstrap: Receive failed: Disconnected") at HandleImpl.cpp:55

#2 0x00007fffe5fc6403 in rd_kafka_log0 (rk=0xece000, extra=extra@entry=0x0,

level=level@entry=3, fac=fac@entry=0x7fffe6006a44 "FAIL", 
fmt=fmt@entry=0x7fffe6006bac "%s") at rdkafka.c:158

#3 0x00007fffe5fd43fd in rd_kafka_broker_fail (rkb=rkb@entry=0xed2700,

level=3, err=RD_KAFKA_RESP_ERR__TRANSPORT, 
fmt=fmt@entry=0x7fffe6006a81 "Receive failed: %s") at rdkafka_broker.c:270

#4 0x00007fffe5fd4a10 in rd_kafka_recv (rkb=rkb@entry=0xed2700)

at rdkafka_broker.c:1088

#5 0x00007fffe5fe0dc8 in rd_kafka_transport_io_event (rktrans=0xe69a20,

events=1) at rdkafka_transport.c:1027

#6 0x00007fffe5fe1ae8 in rd_kafka_transport_io_serve (

rktrans=<optimized out>, timeout_ms=<optimized out>)
at rdkafka_transport.c:1072

#7 0x00007fffe5fd66bc in rd_kafka_broker_serve (rkb=rkb@entry=0xed2700,

timeout_ms=timeout_ms@entry=10) at rdkafka_broker.c:2132

#8 0x00007fffe5fd6991 in rd_kafka_broker_ua_idle (rkb=rkb@entry=0xed2700,

timeout_ms=timeout_ms@entry=0) at rdkafka_broker.c:2179

#9 0x00007fffe5fd72c1 in rd_kafka_broker_thread_main (arg=arg@entry=0xed2700)

at rdkafka_broker.c:3391

#10 0x00007fffe60005f7 in _thrd_wrapper_function (aArg=)

at tinycthread.c:611

#11 0x00007ffff4a10df5 in start_thread () from /lib64/libpthread.so.0
#12 0x00007ffff4d1b1ad in clone () from /lib64/libc.so.6

@edenhill
Copy link
Contributor

Looks like your log callback instance went out of scope.
Try running your program with valgrind to see if it can help you track it down.

@vdeters
Copy link
Author

vdeters commented Apr 12, 2016

I'm not sure I have a log callback instance...is it something different than RdKafka::EventCb?

@edenhill
Copy link
Contributor

It is the same. Can you paste your conf setup code and EventCb class instantiation?

@vdeters
Copy link
Author

vdeters commented Apr 12, 2016

Ok, my RdKafka::EventCb instance had indeed gone out of scoped. That's fixed, and I don't get the "Receive failed" error either, so that must have been related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants