You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed in master branch.
This also changes the Conf semantics:
the application may now reuse Conf objects after Topic/Producer/Consumer ::create calls and must delete the Conf objects itself.
The code is as follows:
79 PropertyConfigurator::doConfigure(log_str);
80 RdKafka::Conf *gconf = RdKafka::Conf::create(RdKafka::Conf::CONF_GLOBAL);
81 RdKafka::Conf *tconf = RdKafka::Conf::create(RdKafka::Conf::CONF_TOPIC);
82
83 gconf->set("metadata.broker.list", "10.11.196.115:9092", errstr);
84 producer_ = RdKafka::Producer::create(gconf, errstr);
the information in the stack:
program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x41401940 (LWP 18931)]
RdKafka::socket_cb_trampoline (domain=2, type=1, protocol=6, opaque=)
at thirdparty/librdkafka/src-cpp/HandleImpl.cpp:92
92 return handle->socket_cb_->socket_cb(domain, type, protocol);
(gdb) bt
#0 RdKafka::socket_cb_trampoline (domain=2, type=1, protocol=6, opaque=)
#1 0x00000000005a93e0 in rd_kafka_broker_connect (arg=)
#2 rd_kafka_broker_thread_main (arg=)
#3 0x000000366100673d in start_thread () from /lib64/libpthread.so.0
#4 0x00000036604d3f6d in clone () from /lib64/libc.so.6
And when I added a constructor to class ConfImpl, the error had not happen again.
the constructor code is as follows:
135 class ConfImpl : public Conf {
136 public:
137 ConfImpl()
138 :dr_cb_(NULL),
139 event_cb_(NULL),
140 socket_cb_(NULL),
141 open_cb_(NULL),
142 partitioner_cb_(NULL){}
143 ~ConfImpl () {
144 if (rk_conf_)
145 rd_kafka_conf_destroy(rk_conf_);
146 else
147 rd_kafka_topic_conf_destroy(rkt_conf_);
148 }
149
The text was updated successfully, but these errors were encountered: