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

the program of the Consumer crashed when create topic #2579

Closed
hyhtemple opened this issue Oct 22, 2019 · 28 comments
Closed

the program of the Consumer crashed when create topic #2579

hyhtemple opened this issue Oct 22, 2019 · 28 comments

Comments

@hyhtemple
Copy link

hyhtemple commented Oct 22, 2019

Recently, I used the librdkafka latest version library. v1.2.1, I create th new topic for consumer,but excute "RdKafka::Topic::create",the program crashed, received signal SIGSEGV mesage, the code fragments is :

   //Consumer
    RdKafka::Conf* mRdKafkaConf = RdKafka::Conf::create(RdKafka::Conf::CONF_GLOBAL);
    if (!mRdKafkaConf)
    {
        GLOGEX_E(("create mRdKafkaConf failed."));
        return CPSS_KAFKA_ERROR;
    }

    //broker list
    std::string strerr;
    RdKafka::Conf::ConfResult res;
    if ((res = mRdKafkaConf->set(CPSS_KAFKA_BROKER_LIST, mBrokerStr, strerr)) != RdKafka::Conf::CONF_OK)
    {
        GLOGEX_E((" set Broker failed! res=%u. broker=%s, err=%s", res, mBrokerStr.c_str(), strerr.c_str()));
        if (mRdKafkaConf)
        {
            delete mRdKafkaConf;
            mRdKafkaConf = NULL;
        }
        return CPSS_KAFKA_ERROR;
    }

    //创建kafka consumer实例
    mpKafkaConsumer = RdKafka::Consumer::create(mRdKafkaConf, strerr);
    if (!mpKafkaConsumer)
    {
        if (mRdKafkaConf)
        {
            delete mRdKafkaConf;
            mRdKafkaConf = NULL;
        }

        GLOGEX_E(("create consumer failed! err=%s.", strerr.c_str()));
        return CPSS_KAFKA_ERROR;
    }

    if (mRdKafkaConf)
    {
        delete mRdKafkaConf;
        mRdKafkaConf = NULL;
    }

    //Topic: MOTION-VEHICLE-SUBSCRIPTION
    RdKafka::Conf *RdKafkaTopicConf = NULL;
    RdKafkaTopicConf = RdKafka::Conf::create(RdKafka::Conf::CONF_TOPIC);
    if (!RdKafkaTopicConf)
    {
        GLOGEX_E(("create mRdKafkaTopicConf failed."));
        return CPSS_KAFKA_ERROR;
    }


    if (RdKafkaTopicConf->set(CPSS_KAFKA_AUTO_OFFSET_RESET, "smallest", strerr) != RdKafka::Conf::CONF_OK)
    {
        GLOGEX_E(("set %s=smallest failed.", CPSS_KAFKA_AUTO_OFFSET_RESET));

        if (RdKafkaTopicConf)
        {
            delete RdKafkaTopicConf;
            RdKafkaTopicConf = NULL;
        }

        return CPSS_KAFKA_ERROR;
    }

    mVehicleSubscriptionTopic = RdKafka::Topic::create(mpKafkaConsumer, mVehicleSubscriptionTopicName, RdKafkaTopicConf, strerr);
    if (!mVehicleSubscriptionTopic)
    {
        GLOGEX_E(("create VehicleSubscriptionTopic failed"));

        if (RdKafkaTopicConf)
        {
            delete RdKafkaTopicConf;
            RdKafkaTopicConf = NULL;
        }

        return CPSS_KAFKA_ERROR;
    }

what's wrong with my code?

@edenhill
Copy link
Contributor

Run your program in gdb (or with asan or valgrind) to find out where and why it crashes

@hyhtemple
Copy link
Author

this is my infomation by gdb
Thread 1 received signal SIGSEGV, Segmentation fault.
RdKafka::Topic::create (base=, topic_str=..., conf=0x7fffec042bf0, errstr=...)
at TopicImpl.cpp:84
84 TopicImpl.cpp: ûÓÐÄǸöÎļþ»òĿ¼.
(gdb) bt
#0 RdKafka::Topic::create (base=, topic_str=..., conf=0x7fffec042bf0, errstr=...)
at TopicImpl.cpp:84
#1 0x00000000006c0c54 in CpssKafkaConsumer::Init (this=0x7fffec0407f8)
at components/kafka/CpssKafkaConsumer.cpp:107
#2 0x00000000006b3413 in CpssKafkaWraper::Init_Consumer (this=0x7fffec040768)
at components/kafka/CpssKafkaWraper.cpp:114
#3 0x00000000006b31e2 in CpssKafkaWraper::Init (this=0x7fffec040768)
at components/kafka/CpssKafkaWraper.cpp:36
#4 0x00000000006886fa in KafkaListenThread::Init_Kafka (this=0x7fffec040660)
at components/kafka/KafkaListenThread.cpp:96
#5 0x000000000068891b in KafkaListenThread::Start (this=0x7fffec040660, cc=0xda3520,
pKafkaConfig=0x7fffffffdb70) at components/kafka/KafkaListenThread.cpp:165
#6 0x0000000000686800 in KafkaComponent::initComponent (this=0x7fffffffdb60, cc=..., env=...)
at components/kafka/KafkaComponent.cpp:57
#7 0x00000000006f2144 in YapiComponentContainer::start (this=0xda3520) at YapiComponentContainer.cpp:494
#8 0x00000000006dac76 in YapiSystem::startComponent (this=0x7fffffffda90, component_container=0xda3520)
at YapiSystem.cpp:208
#9 0x0000000000587893 in RunCpss () at ./main/main.cpp:322
#10 0x000000000058701c in main (argc=1, argv=0x7fffffffe398) at ./main/main.cpp:105
the position of the crash is
mVehicleSubscriptionTopic = RdKafka::Topic::create(mpKafkaConsumer, mVehicleSubscriptionTopicName, RdKafkaTopicConf, strerr);

@edenhill
Copy link
Contributor

inspect the mpKafkaConsumer object, or run with valgrind / asan

@edenhill
Copy link
Contributor

@Patrick-Hua
Copy link

I have the same error today ,do not know why...

@Patrick-Hua
Copy link

find answer,when updating rdkafka from lower version to 1.2.1, forgot to replace rdkafka headers in my project... rookie mistake...

@Lovett1991
Copy link

*Bump

v1.4.0

Thread 1 "JunctionBox" received signal SIGSEGV, Segmentation fault.
0x00005555555c0e6e in RdKafka::Topic::create (base=0x5555557f2b58, topic_str="postgres.public.testtable", conf=0x5555557f2990, errstr="") at /home/alex/workspace/public/compendium/junction-box/libs/librdkafka/src-cpp/TopicImpl.cpp:84
84	  rd_kafka_t *rk = dynamic_cast<HandleImpl*>(base)->rk_;

code is

   std::string brokers = "localhost";
    std::string errstr;

    RdKafka::Conf *conf = RdKafka::Conf::create(RdKafka::Conf::CONF_GLOBAL);
    RdKafka::Conf *tconf = RdKafka::Conf::create(RdKafka::Conf::CONF_TOPIC);

    if(conf -> set("metadata.broker.list", brokers, errstr)){
        cout << errstr << endl;
    }

    if (conf -> set("enable.partition.eof", "true", errstr)!= RdKafka::Conf::CONF_OK){
        cout << errstr << endl;
        return 1;
    }
    if(conf -> set("group.id", "foo", errstr)!= RdKafka::Conf::CONF_OK){
        cout << errstr << endl;
        return 1;
    }


    RdKafka::Consumer *consumer = RdKafka::Consumer::create(conf, errstr);
    RdKafka::Topic *topic = RdKafka::Topic::create(consumer, "postgres.public.testtable", tconf, errstr);

@edenhill
Copy link
Contributor

edenhill commented Apr 9, 2020

@Lovett1991 Interesting, can you print *base and the HandleImpl-casted base in gdb?
Would be interesting to see if that memory is readable and what rk_ is set to.

@Lovett1991
Copy link

Breakpoint 5, main (argc=1, argv=0x7fffffffdda8) at /home/alex/workspace/public/compendium/junction-box/src/JunctionBox.cpp:85
85	    RdKafka::Consumer *consumer = RdKafka::Consumer::create(conf, errstr);
[New Thread 0x7ffff76cf700 (LWP 15992)]
[New Thread 0x7ffff6ece700 (LWP 15993)]
[New Thread 0x7ffff66cd700 (LWP 15994)]
[New Thread 0x7ffff5ecc700 (LWP 15995)]
[Switching to thread 5 (Thread 0x7ffff5ecc700 (LWP 15995))](running)
=thread-selected,id="5"

Thread 1 "JunctionBox" received signal SIGSEGV, Segmentation fault.
0x00005555555bbc96 in RdKafka::Topic::create (base=0x555555769ad8, topic_str="postgres.public.testtable", conf=0x55555576c5d0, errstr="") at /home/alex/workspace/public/compendium/junction-box/libs/librdkafka/src-cpp/TopicImpl.cpp:84
84	  rd_kafka_t *rk = dynamic_cast<HandleImpl*>(base)->rk_;

base
0x555555769ad8

dynamic_cast<HandleImpl*>(base)
0x555555769ad8

rk
0x7ffff7b835b6 <void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+182>
rk_rep: 0xeb3b8b4824248b4c
rk_ops: 0x4fb1a3d8d4897
rk_brokers:
rk_broker_by_id:
rk_broker_cnt:
rk_broker_up_cnt:
rk_logical_broker_up_cnt:
rk_broker_down_cnt:
rk_broker_addrless_cnt:
rk_internal_rkb_lock:
rk_internal_rkb: 0x84358d48c1894c50
rk_broker_state_change_cnd:
rk_broker_state_change_lock:
rk_broker_state_change_version: 305206
rk_broker_state_change_waiters:
rk_topics:
rk_topic_cnt: -15673
rk_cgrp: 0x894808ec8348f589
rk_conf:
rk_logq: 0x8948550009b30505
rk_name:
rk_client_id: 0x8b48fa1e0ff39066
rk_group_id: 0x8948550009c25505
rk_flags: -1065137923
rk_terminate:
rk_lock:
rk_type: (RD_KAFKA_CONSUMER | unknown: 1209026186)
rk_tv_state_change:
rk_ts_last_poll:
rk_fatal:
rk_last_throttle:
rk_ts_metadata: 172419746632
rk_full_metadata: 0x48c0310824448948
rk_ts_full_metadata: 514629223203227275
rk_metadata_cache:
rk_clusterid: 0xfff50a32e8c35c41 <error: Cannot access memory at address 0xfff50a32e8c35c41>
rk_controllerid: 267620454
rk_simple_cnt:
rk_eos:
rk_null_bytes: 0x724548d4810468b
rk_curr_msgs:
rk_timers:
rk_thread: 17648272030416538440
rk_initialized: 1149978879
rk_init_wait_cnt: 1214515236
rk_init_cnd:
rk_init_lock:
rk_background:
rk_suppress:
rk_sasl:
handle: 0x7fe95def8948fff5

&rk
0x7fffffffda78
*&rk: 0x7ffff7b835b6 <void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+182>
rk_rep: 0xeb3b8b4824248b4c
rk_ops: 0x4fb1a3d8d4897
rk_brokers:
rk_broker_by_id:
rk_broker_cnt:
rk_broker_up_cnt:
rk_logical_broker_up_cnt:
rk_broker_down_cnt:
rk_broker_addrless_cnt:
rk_internal_rkb_lock:
rk_internal_rkb: 0x84358d48c1894c50
rk_broker_state_change_cnd:
rk_broker_state_change_lock:
rk_broker_state_change_version: 305206
rk_broker_state_change_waiters:
rk_topics:
rk_topic_cnt: -15673
rk_cgrp: 0x894808ec8348f589
rk_conf:
rk_logq: 0x8948550009b30505
rk_name:
rk_client_id: 0x8b48fa1e0ff39066
rk_group_id: 0x8948550009c25505
rk_flags: -1065137923
rk_terminate:
rk_lock:
rk_type: (RD_KAFKA_CONSUMER | unknown: 1209026186)
rk_tv_state_change:
rk_ts_last_poll:
rk_fatal:
rk_last_throttle:
rk_ts_metadata: 172419746632
rk_full_metadata: 0x48c0310824448948
rk_ts_full_metadata: 514629223203227275
rk_metadata_cache:
rk_clusterid: 0xfff50a32e8c35c41 <error: Cannot access memory at address 0xfff50a32e8c35c41>
rk_controllerid: 267620454
rk_simple_cnt:
rk_eos:
rk_null_bytes: 0x724548d4810468b
rk_curr_msgs:
rk_timers:
rk_thread: 17648272030416538440
rk_initialized: 1149978879
rk_init_wait_cnt: 1214515236
rk_init_cnd:
rk_init_lock:
rk_background:
rk_suppress:
rk_sasl:

@Lovett1991
Copy link

Misread your request...

*base
{...}

*(dynamic_cast<HandleImpl*>(base))
{...}
RdKafka::Handle (base): RdKafka::Handle
rk_: 0x55555576a210
consume_cb_: 0x0
event_cb_: 0x0
socket_cb_: 0x0
open_cb_: 0x0
dr_cb_: 0x0
partitioner_cb_: 0x0
partitioner_kp_cb_: 0x0
rebalance_cb_: 0x0
offset_commit_cb_: 0x0
oauthbearer_token_refresh_cb_: 0x0
ssl_cert_verify_cb_: 0x0

@edenhill
Copy link
Contributor

edenhill commented Apr 9, 2020

Can you print *((dynamic_cast<HandleImpl*>(base)))->rk_ ?

@Lovett1991
Copy link

*((dynamic_cast<HandleImpl*>(base)))->rk_
{...}
rk_rep: 0x55555576ae50
rk_ops: 0x55555576af10
rk_brokers:
rk_broker_by_id:
rk_broker_cnt:
rk_broker_up_cnt:
rk_logical_broker_up_cnt:
rk_broker_down_cnt:
rk_broker_addrless_cnt:
rk_internal_rkb_lock:
rk_internal_rkb: 0x5555557742c0
rk_broker_state_change_cnd:
rk_broker_state_change_lock:
rk_broker_state_change_version: 0
rk_broker_state_change_waiters:
rk_topics:
rk_topic_cnt: 0
rk_cgrp: 0x55555576b080
rk_conf:
rk_logq: 0x0
rk_name:
rk_client_id: 0x55555576beb0
rk_group_id: 0x55555576afd0
rk_flags: 0
rk_terminate:
rk_lock:
rk_type: RD_KAFKA_CONSUMER
rk_tv_state_change:
rk_ts_last_poll:
rk_fatal:
rk_last_throttle:
rk_ts_metadata: 0
rk_full_metadata: 0x0
rk_ts_full_metadata: 0
rk_metadata_cache:
rk_clusterid: 0x0
rk_controllerid: -1
rk_simple_cnt:
rk_eos:
rk_null_bytes: 0x55555576bdf0
rk_curr_msgs:
rk_timers:
rk_thread: 140737336108800
rk_initialized: 1
rk_init_wait_cnt: 0
rk_init_cnd:
rk_init_lock:
rk_background:
rk_suppress:
rk_sasl:

@edenhill
Copy link
Contributor

edenhill commented Apr 9, 2020

Okay, that looks fine.
Could you try running the program with valgrind to see if it can find the cause of memory error?

@Lovett1991
Copy link

==19478== Memcheck, a memory error detector
==19478== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==19478== Using Valgrind-3.15.0-608cb11914-20190413 and LibVEX; rerun with -h for copyright info
==19478== Command: ./JunctionBox
==19478== Parent PID: 12244
==19478== 
--19478-- 
--19478-- Valgrind options:
--19478--    --leak-check=full
--19478--    --show-leak-kinds=all
--19478--    --track-origins=yes
--19478--    --verbose
--19478--    --log-file=valgrind-out.txt
--19478-- Contents of /proc/version:
--19478--   Linux version 5.3.0-42-generic (buildd@lcy01-amd64-026) (gcc version 9.2.1 20191008 (Ubuntu 9.2.1-9ubuntu2)) #34-Ubuntu SMP Fri Feb 28 05:49:40 UTC 2020
--19478-- 
--19478-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand
--19478-- Page sizes: currently 4096, max supported 4096
--19478-- Valgrind library directory: /usr/lib/x86_64-linux-gnu/valgrind
--19478-- Reading syms from /home/alex/workspace/public/compendium/junction-box/build/JunctionBox
--19478-- Reading syms from /usr/lib/x86_64-linux-gnu/ld-2.30.so
--19478--   Considering /usr/lib/x86_64-linux-gnu/ld-2.30.so ..
--19478--   .. CRC mismatch (computed 27d27021 wanted aaa15eb8)
--19478--   Considering /lib/x86_64-linux-gnu/ld-2.30.so ..
--19478--   .. CRC mismatch (computed 27d27021 wanted aaa15eb8)
--19478--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.30.so ..
--19478--   .. CRC is valid
--19478-- Reading syms from /usr/lib/x86_64-linux-gnu/valgrind/memcheck-amd64-linux
--19478--    object doesn't have a symbol table
--19478--    object doesn't have a dynamic symbol table
--19478-- Scheduler: using generic scheduler lock implementation.
--19478-- Reading suppressions file: /usr/lib/x86_64-linux-gnu/valgrind/default.supp
==19478== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-19478-by-alex-on-???
==19478== embedded gdbserver: writing to   /tmp/vgdb-pipe-to-vgdb-from-19478-by-alex-on-???
==19478== embedded gdbserver: shared mem   /tmp/vgdb-pipe-shared-mem-vgdb-19478-by-alex-on-???
==19478== 
==19478== TO CONTROL THIS PROCESS USING vgdb (which you probably
==19478== don't want to do, unless you know exactly what you're doing,
==19478== or are doing some strange experiment):
==19478==   /usr/lib/x86_64-linux-gnu/valgrind/../../bin/vgdb --pid=19478 ...command...
==19478== 
==19478== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==19478==   /path/to/gdb ./JunctionBox
==19478== and then give GDB the following command
==19478==   target remote | /usr/lib/x86_64-linux-gnu/valgrind/../../bin/vgdb --pid=19478
==19478== --pid is optional if only one valgrind process is running
==19478== 
--19478-- REDIR: 0x4021b90 (ld-linux-x86-64.so.2:strlen) redirected to 0x580c9c82 (???)
--19478-- REDIR: 0x4021960 (ld-linux-x86-64.so.2:index) redirected to 0x580c9c9c (???)
--19478-- Reading syms from /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_core-amd64-linux.so
--19478--    object doesn't have a symbol table
--19478-- Reading syms from /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so
--19478--    object doesn't have a symbol table
==19478== WARNING: new redirection conflicts with existing -- ignoring it
--19478--     old: 0x04021b90 (strlen              ) R-> (0000.0) 0x580c9c82 ???
--19478--     new: 0x04021b90 (strlen              ) R-> (2007.0) 0x0483e060 strlen
--19478-- REDIR: 0x401e370 (ld-linux-x86-64.so.2:strcmp) redirected to 0x483efd0 (strcmp)
--19478-- REDIR: 0x40220f0 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4842a20 (mempcpy)
--19478-- Reading syms from /usr/lib/x86_64-linux-gnu/libssl.so.1.1
--19478--    object doesn't have a symbol table
--19478-- Reading syms from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
--19478--    object doesn't have a symbol table
--19478-- Reading syms from /usr/lib/x86_64-linux-gnu/libpthread-2.30.so
--19478--   Considering /usr/lib/debug/.build-id/7f/4107df84da625f1b445ade877e1e0ab6ba823d.debug ..
--19478--   .. build-id is valid
--19478-- Reading syms from /usr/lib/x86_64-linux-gnu/libdl-2.30.so
--19478--   Considering /usr/lib/x86_64-linux-gnu/libdl-2.30.so ..
--19478--   .. CRC mismatch (computed 771ab420 wanted a8d0413b)
--19478--   Considering /lib/x86_64-linux-gnu/libdl-2.30.so ..
--19478--   .. CRC mismatch (computed 771ab420 wanted a8d0413b)
--19478--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libdl-2.30.so ..
--19478--   .. CRC is valid
--19478-- Reading syms from /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28
--19478--    object doesn't have a symbol table
--19478-- Reading syms from /usr/lib/x86_64-linux-gnu/libm-2.30.so
--19478--   Considering /usr/lib/x86_64-linux-gnu/libm-2.30.so ..
--19478--   .. CRC mismatch (computed e12bfda3 wanted 14b81770)
--19478--   Considering /lib/x86_64-linux-gnu/libm-2.30.so ..
--19478--   .. CRC mismatch (computed e12bfda3 wanted 14b81770)
--19478--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libm-2.30.so ..
--19478--   .. CRC is valid
--19478-- Reading syms from /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
--19478--    object doesn't have a symbol table
--19478-- Reading syms from /usr/lib/x86_64-linux-gnu/libc-2.30.so
--19478--   Considering /usr/lib/x86_64-linux-gnu/libc-2.30.so ..
--19478--   .. CRC mismatch (computed 7a789c53 wanted 61e075a4)
--19478--   Considering /lib/x86_64-linux-gnu/libc-2.30.so ..
--19478--   .. CRC mismatch (computed 7a789c53 wanted 61e075a4)
--19478--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.30.so ..
--19478--   .. CRC is valid
--19478-- REDIR: 0x4fe9630 (libc.so.6:memmove) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe8930 (libc.so.6:strncpy) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe9960 (libc.so.6:strcasecmp) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe8250 (libc.so.6:strcat) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe8990 (libc.so.6:rindex) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4feae00 (libc.so.6:rawmemchr) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x5005e90 (libc.so.6:wmemchr) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x50059d0 (libc.so.6:wcscmp) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe9790 (libc.so.6:mempcpy) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe95c0 (libc.so.6:bcmp) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe88c0 (libc.so.6:strncmp) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe8300 (libc.so.6:strcmp) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe96f0 (libc.so.6:memset) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x5005990 (libc.so.6:wcschr) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe8820 (libc.so.6:strnlen) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe83e0 (libc.so.6:strcspn) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe99b0 (libc.so.6:strncasecmp) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe8380 (libc.so.6:strcpy) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe9b00 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x5007100 (libc.so.6:wcsnlen) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x5005a10 (libc.so.6:wcscpy) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe89d0 (libc.so.6:strpbrk) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe82b0 (libc.so.6:index) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe87e0 (libc.so.6:strlen) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4ff1d50 (libc.so.6:memrchr) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe9a00 (libc.so.6:strcasecmp_l) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe9580 (libc.so.6:memchr) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x5005ae0 (libc.so.6:wcslen) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe8c90 (libc.so.6:strspn) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe9900 (libc.so.6:stpncpy) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe98a0 (libc.so.6:stpcpy) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4feae40 (libc.so.6:strchrnul) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe9a50 (libc.so.6:strncasecmp_l) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x5076bb0 (libc.so.6:__memcpy_chk) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x4fe94a0 (libc.so.6:strstr) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--19478-- REDIR: 0x50d19c0 (libc.so.6:__strrchr_avx2) redirected to 0x483da10 (rindex)
--19478-- REDIR: 0x4fe3290 (libc.so.6:malloc) redirected to 0x483a780 (malloc)
--19478-- REDIR: 0x50d1b90 (libc.so.6:__strlen_avx2) redirected to 0x483df40 (strlen)
--19478-- REDIR: 0x50ce180 (libc.so.6:__memcmp_avx2_movbe) redirected to 0x48411e0 (bcmp)
--19478-- REDIR: 0x50cd090 (libc.so.6:__strcmp_avx2) redirected to 0x483eed0 (strcmp)
--19478-- REDIR: 0x50d4ba0 (libc.so.6:__memcpy_avx_unaligned_erms) redirected to 0x48419f0 (memmove)
--19478-- REDIR: 0x4c981c0 (libstdc++.so.6:operator new(unsigned long)) redirected to 0x483adf0 (operator new(unsigned long))
--19478-- REDIR: 0x4fe4cc0 (libc.so.6:calloc) redirected to 0x483cce0 (calloc)
--19478-- REDIR: 0x50d5020 (libc.so.6:__memset_avx2_unaligned_erms) redirected to 0x48418e0 (memset)
--19478-- REDIR: 0x4c96400 (libstdc++.so.6:operator delete(void*)) redirected to 0x483bf50 (operator delete(void*))
--19478-- REDIR: 0x50ce560 (libc.so.6:__strcasecmp_avx) redirected to 0x483e830 (strcasecmp)
--19478-- REDIR: 0x4fe4030 (libc.so.6:realloc) redirected to 0x483cf30 (realloc)
--19478-- REDIR: 0x50d17d0 (libc.so.6:__strchrnul_avx2) redirected to 0x4842540 (strchrnul)
--19478-- REDIR: 0x50cd4d0 (libc.so.6:__strncmp_avx2) redirected to 0x483e670 (strncmp)
--19478-- REDIR: 0x50d15a0 (libc.so.6:__strchr_avx2) redirected to 0x483dbf0 (index)
--19478-- REDIR: 0x5004590 (libc.so.6:__strstr_sse2_unaligned) redirected to 0x4842c20 (strstr)
--19478-- REDIR: 0x4fe3880 (libc.so.6:free) redirected to 0x483b9d0 (free)
==19478== Invalid read of size 8
==19478==    at 0x132942: RdKafka::Topic::create(RdKafka::Handle*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (TopicImpl.cpp:84)
==19478==    by 0x123140: main (JunctionBox.cpp:86)
==19478==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
==19478== 
==19478== 
==19478== Process terminating with default action of signal 11 (SIGSEGV)
==19478==  Access not within mapped region at address 0x8
==19478==    at 0x132942: RdKafka::Topic::create(RdKafka::Handle*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (TopicImpl.cpp:84)
==19478==    by 0x123140: main (JunctionBox.cpp:86)
==19478==  If you believe this happened as a result of a stack
==19478==  overflow in your program's main thread (unlikely but
==19478==  possible), you can try to increase the size of the
==19478==  main thread stack using the --main-stacksize= flag.
==19478==  The main thread stack size used in this run was 8388608.
==19478== 
==19478== HEAP SUMMARY:
==19478==     in use at exit: 18,514 bytes in 68 blocks
==19478==   total heap usage: 73 allocs, 5 frees, 92,814 bytes allocated
==19478== 
==19478== Searching for pointers to 68 not-freed blocks
==19478== Checked 33,805,968 bytes
==19478== 
==19478== 1 bytes in 1 blocks are still reachable in loss record 1 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4FE853E: strdup (strdup.c:42)
==19478==    by 0x1489BB: rd_strdup (rd.h:117)
==19478==    by 0x15CAAC: rd_kafka_broker_add (rdkafka_broker.c:4732)
==19478==    by 0x13C776: rd_kafka_new (rdkafka.c:2205)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 4 bytes in 1 blocks are still reachable in loss record 2 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4FE853E: strdup (strdup.c:42)
==19478==    by 0x174206: rd_strdup (rd.h:117)
==19478==    by 0x17585C: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1452)
==19478==    by 0x175D42: rd_kafka_anyconf_set_prop (rdkafka_conf.c:1615)
==19478==    by 0x17682A: rd_kafka_anyconf_set (rdkafka_conf.c:1944)
==19478==    by 0x1768D2: rd_kafka_conf_set (rdkafka_conf.c:1985)
==19478==    by 0x124732: RdKafka::ConfImpl::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConfImpl.cpp:44)
==19478==    by 0x12302C: main (JunctionBox.cpp:75)
==19478== 
==19478== 10 bytes in 1 blocks are still reachable in loss record 3 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4FE853E: strdup (strdup.c:42)
==19478==    by 0x174206: rd_strdup (rd.h:117)
==19478==    by 0x17585C: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1452)
==19478==    by 0x175D42: rd_kafka_anyconf_set_prop (rdkafka_conf.c:1615)
==19478==    by 0x17682A: rd_kafka_anyconf_set (rdkafka_conf.c:1944)
==19478==    by 0x1768D2: rd_kafka_conf_set (rdkafka_conf.c:1985)
==19478==    by 0x124732: RdKafka::ConfImpl::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConfImpl.cpp:44)
==19478==    by 0x122E3E: main (JunctionBox.cpp:62)
==19478== 
==19478== 10 bytes in 1 blocks are still reachable in loss record 4 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4FE853E: strdup (strdup.c:42)
==19478==    by 0x1489BB: rd_strdup (rd.h:117)
==19478==    by 0x15CAAC: rd_kafka_broker_add (rdkafka_broker.c:4732)
==19478==    by 0x15E15F: rd_kafka_brokers_add0 (rdkafka_broker.c:5220)
==19478==    by 0x13C7CE: rd_kafka_new (rdkafka.c:2212)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 12 bytes in 1 blocks are still reachable in loss record 5 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4FE853E: strdup (strdup.c:42)
==19478==    by 0x1489BB: rd_strdup (rd.h:117)
==19478==    by 0x15CB01: rd_kafka_broker_add (rdkafka_broker.c:4736)
==19478==    by 0x13C776: rd_kafka_new (rdkafka.c:2205)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 14 bytes in 2 blocks are still reachable in loss record 6 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4FE853E: strdup (strdup.c:42)
==19478==    by 0x174206: rd_strdup (rd.h:117)
==19478==    by 0x17585C: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1452)
==19478==    by 0x1772FA: rd_kafka_anyconf_copy (rdkafka_conf.c:2299)
==19478==    by 0x177390: rd_kafka_conf_dup (rdkafka_conf.c:2310)
==19478==    by 0x1260B2: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:54)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 16 bytes in 1 blocks are still reachable in loss record 7 of 54
==19478==    at 0x483A723: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x483D017: realloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1E7148: rd_realloc (rd.h:106)
==19478==    by 0x1E7343: rd_list_grow (rdlist.c:47)
==19478==    by 0x1E7398: rd_list_init (rdlist.c:56)
==19478==    by 0x148493: rd_kafka_assignors_init (rdkafka_assignor.c:489)
==19478==    by 0x13C1FF: rd_kafka_new (rdkafka.c:2069)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 17 bytes in 1 blocks are still reachable in loss record 8 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4FE853E: strdup (strdup.c:42)
==19478==    by 0x1489BB: rd_strdup (rd.h:117)
==19478==    by 0x15CAAC: rd_kafka_broker_add (rdkafka_broker.c:4732)
==19478==    by 0x15D573: rd_kafka_broker_add_logical (rdkafka_broker.c:4911)
==19478==    by 0x16559B: rd_kafka_cgrp_new (rdkafka_cgrp.c:231)
==19478==    by 0x13C395: rd_kafka_new (rdkafka.c:2109)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 17 bytes in 1 blocks are still reachable in loss record 9 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4FE853E: strdup (strdup.c:42)
==19478==    by 0x1489BB: rd_strdup (rd.h:117)
==19478==    by 0x15CB01: rd_kafka_broker_add (rdkafka_broker.c:4736)
==19478==    by 0x15D573: rd_kafka_broker_add_logical (rdkafka_broker.c:4911)
==19478==    by 0x16559B: rd_kafka_cgrp_new (rdkafka_cgrp.c:231)
==19478==    by 0x13C395: rd_kafka_new (rdkafka.c:2109)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 18 bytes in 1 blocks are still reachable in loss record 10 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1334AB: rd_malloc (rd.h:100)
==19478==    by 0x1342C0: rd_kafkap_str_new (rdkafka_proto.h:283)
==19478==    by 0x13C3B2: rd_kafka_new (rdkafka.c:2113)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 19 bytes in 1 blocks are still reachable in loss record 11 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x162A07: rd_malloc (rd.h:100)
==19478==    by 0x1635DC: rd_kafkap_str_new (rdkafka_proto.h:283)
==19478==    by 0x1723F9: rd_kafka_cgrp_set_member_id (rdkafka_cgrp.c:3268)
==19478==    by 0x165521: rd_kafka_cgrp_new (rdkafka_cgrp.c:216)
==19478==    by 0x13C395: rd_kafka_new (rdkafka.c:2109)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 20 bytes in 2 blocks are still reachable in loss record 12 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4FE853E: strdup (strdup.c:42)
==19478==    by 0x174206: rd_strdup (rd.h:117)
==19478==    by 0x17585C: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1452)
==19478==    by 0x176644: rd_kafka_defaultconf_set (rdkafka_conf.c:1879)
==19478==    by 0x1766DD: rd_kafka_topic_conf_new (rdkafka_conf.c:1897)
==19478==    by 0x124992: RdKafka::Conf::create(RdKafka::Conf::ConfType) (ConfImpl.cpp:86)
==19478==    by 0x122DD9: main (JunctionBox.cpp:60)
==19478== 
==19478== 22 bytes in 1 blocks are still reachable in loss record 13 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1334AB: rd_malloc (rd.h:100)
==19478==    by 0x1342C0: rd_kafkap_str_new (rdkafka_proto.h:283)
==19478==    by 0x13C102: rd_kafka_new (rdkafka.c:2038)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 24 bytes in 1 blocks are still reachable in loss record 14 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x145D63: rd_malloc (rd.h:100)
==19478==    by 0x14672C: rd_kafkap_str_new (rdkafka_proto.h:283)
==19478==    by 0x14835E: rd_kafka_assignor_add (rdkafka_assignor.c:453)
==19478==    by 0x148621: rd_kafka_assignors_init (rdkafka_assignor.c:515)
==19478==    by 0x13C1FF: rd_kafka_new (rdkafka.c:2069)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 25 bytes in 1 blocks are still reachable in loss record 15 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4FE853E: strdup (strdup.c:42)
==19478==    by 0x1489BB: rd_strdup (rd.h:117)
==19478==    by 0x15CB01: rd_kafka_broker_add (rdkafka_broker.c:4736)
==19478==    by 0x15E15F: rd_kafka_brokers_add0 (rdkafka_broker.c:5220)
==19478==    by 0x13C7CE: rd_kafka_new (rdkafka.c:2212)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 26 bytes in 1 blocks are still reachable in loss record 16 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1334AB: rd_malloc (rd.h:100)
==19478==    by 0x1342C0: rd_kafkap_str_new (rdkafka_proto.h:283)
==19478==    by 0x13C0D9: rd_kafka_new (rdkafka.c:2035)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 26 bytes in 1 blocks are still reachable in loss record 17 of 54
==19478==    at 0x483AE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4D3859C: void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==19478==    by 0x1230F2: main (JunctionBox.cpp:86)
==19478== 
==19478== 27 bytes in 1 blocks are still reachable in loss record 18 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1741A3: rd_malloc (rd.h:100)
==19478==    by 0x174B1A: rd_kafkap_str_new (rdkafka_proto.h:283)
==19478==    by 0x1758E0: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1464)
==19478==    by 0x176644: rd_kafka_defaultconf_set (rdkafka_conf.c:1879)
==19478==    by 0x17669B: rd_kafka_conf_new (rdkafka_conf.c:1890)
==19478==    by 0x124983: RdKafka::Conf::create(RdKafka::Conf::ConfType) (ConfImpl.cpp:84)
==19478==    by 0x122DC8: main (JunctionBox.cpp:59)
==19478== 
==19478== 27 bytes in 1 blocks are still reachable in loss record 19 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1741A3: rd_malloc (rd.h:100)
==19478==    by 0x174B1A: rd_kafkap_str_new (rdkafka_proto.h:283)
==19478==    by 0x1758E0: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1464)
==19478==    by 0x176644: rd_kafka_defaultconf_set (rdkafka_conf.c:1879)
==19478==    by 0x17669B: rd_kafka_conf_new (rdkafka_conf.c:1890)
==19478==    by 0x177352: rd_kafka_conf_dup (rdkafka_conf.c:2306)
==19478==    by 0x1260B2: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:54)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 27 bytes in 1 blocks are still reachable in loss record 20 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x145D63: rd_malloc (rd.h:100)
==19478==    by 0x14672C: rd_kafkap_str_new (rdkafka_proto.h:283)
==19478==    by 0x148377: rd_kafka_assignor_add (rdkafka_assignor.c:454)
==19478==    by 0x148621: rd_kafka_assignors_init (rdkafka_assignor.c:515)
==19478==    by 0x13C1FF: rd_kafka_new (rdkafka.c:2069)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 27 bytes in 1 blocks are still reachable in loss record 21 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x145D63: rd_malloc (rd.h:100)
==19478==    by 0x14672C: rd_kafkap_str_new (rdkafka_proto.h:283)
==19478==    by 0x148377: rd_kafka_assignor_add (rdkafka_assignor.c:454)
==19478==    by 0x148668: rd_kafka_assignors_init (rdkafka_assignor.c:520)
==19478==    by 0x13C1FF: rd_kafka_new (rdkafka.c:2069)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 28 bytes in 1 blocks are still reachable in loss record 22 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1334AB: rd_malloc (rd.h:100)
==19478==    by 0x13444B: rd_kafkap_bytes_new (rdkafka_proto.h:408)
==19478==    by 0x13C029: rd_kafka_new (rdkafka.c:2025)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 29 bytes in 1 blocks are still reachable in loss record 23 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x145D63: rd_malloc (rd.h:100)
==19478==    by 0x14672C: rd_kafkap_str_new (rdkafka_proto.h:283)
==19478==    by 0x14835E: rd_kafka_assignor_add (rdkafka_assignor.c:453)
==19478==    by 0x148668: rd_kafka_assignors_init (rdkafka_assignor.c:520)
==19478==    by 0x13C1FF: rd_kafka_new (rdkafka.c:2069)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 40 bytes in 1 blocks are still reachable in loss record 24 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1E744C: rd_list_alloc (rdlist.c:81)
==19478==    by 0x1E7466: rd_list_new (rdlist.c:85)
==19478==    by 0x165535: rd_kafka_cgrp_new (rdkafka_cgrp.c:218)
==19478==    by 0x13C395: rd_kafka_new (rdkafka.c:2109)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 57 bytes in 1 blocks are still reachable in loss record 25 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1B246E: rd_malloc (rd.h:100)
==19478==    by 0x1B5F4A: rd_kafka_q_io_event_enable (rdkafka_queue.c:729)
==19478==    by 0x15D0DC: rd_kafka_broker_add (rdkafka_broker.c:4816)
==19478==    by 0x15D573: rd_kafka_broker_add_logical (rdkafka_broker.c:4911)
==19478==    by 0x16559B: rd_kafka_cgrp_new (rdkafka_cgrp.c:231)
==19478==    by 0x13C395: rd_kafka_new (rdkafka.c:2109)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 57 bytes in 1 blocks are still reachable in loss record 26 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1B246E: rd_malloc (rd.h:100)
==19478==    by 0x1B5F4A: rd_kafka_q_io_event_enable (rdkafka_queue.c:729)
==19478==    by 0x15D0DC: rd_kafka_broker_add (rdkafka_broker.c:4816)
==19478==    by 0x15E15F: rd_kafka_brokers_add0 (rdkafka_broker.c:5220)
==19478==    by 0x13C7CE: rd_kafka_new (rdkafka.c:2212)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 64 bytes in 1 blocks are still reachable in loss record 27 of 54
==19478==    at 0x483A723: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x483D017: realloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1E7148: rd_realloc (rd.h:106)
==19478==    by 0x1E7343: rd_list_grow (rdlist.c:47)
==19478==    by 0x1E7398: rd_list_init (rdlist.c:56)
==19478==    by 0x13BCFC: rd_kafka_new (rdkafka.c:1970)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 72 bytes in 1 blocks are still reachable in loss record 28 of 54
==19478==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x145D1B: rd_calloc (rd.h:94)
==19478==    by 0x148349: rd_kafka_assignor_add (rdkafka_assignor.c:451)
==19478==    by 0x148621: rd_kafka_assignors_init (rdkafka_assignor.c:515)
==19478==    by 0x13C1FF: rd_kafka_new (rdkafka.c:2069)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 72 bytes in 1 blocks are still reachable in loss record 29 of 54
==19478==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x145D1B: rd_calloc (rd.h:94)
==19478==    by 0x148349: rd_kafka_assignor_add (rdkafka_assignor.c:451)
==19478==    by 0x148668: rd_kafka_assignors_init (rdkafka_assignor.c:520)
==19478==    by 0x13C1FF: rd_kafka_new (rdkafka.c:2069)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 112 bytes in 1 blocks are still reachable in loss record 30 of 54
==19478==    at 0x483AE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x125FE1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:42)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 120 bytes in 1 blocks are still reachable in loss record 31 of 54
==19478==    at 0x483AE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x12495F: RdKafka::Conf::create(RdKafka::Conf::ConfType) (ConfImpl.cpp:79)
==19478==    by 0x122DC8: main (JunctionBox.cpp:59)
==19478== 
==19478== 120 bytes in 1 blocks are still reachable in loss record 32 of 54
==19478==    at 0x483AE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x12495F: RdKafka::Conf::create(RdKafka::Conf::ConfType) (ConfImpl.cpp:79)
==19478==    by 0x122DD9: main (JunctionBox.cpp:60)
==19478== 
==19478== 176 bytes in 1 blocks are still reachable in loss record 33 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1B246E: rd_malloc (rd.h:100)
==19478==    by 0x1B4A7A: rd_kafka_q_new0 (rdkafka_queue.c:108)
==19478==    by 0x13BDBE: rd_kafka_new (rdkafka.c:1983)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 176 bytes in 1 blocks are still reachable in loss record 34 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1B246E: rd_malloc (rd.h:100)
==19478==    by 0x1B4A7A: rd_kafka_q_new0 (rdkafka_queue.c:108)
==19478==    by 0x13BDE3: rd_kafka_new (rdkafka.c:1984)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 176 bytes in 1 blocks are still reachable in loss record 35 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1B246E: rd_malloc (rd.h:100)
==19478==    by 0x1B4A7A: rd_kafka_q_new0 (rdkafka_queue.c:108)
==19478==    by 0x165420: rd_kafka_cgrp_new (rdkafka_cgrp.c:206)
==19478==    by 0x13C395: rd_kafka_new (rdkafka.c:2109)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 176 bytes in 1 blocks are still reachable in loss record 36 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1B246E: rd_malloc (rd.h:100)
==19478==    by 0x1B4A7A: rd_kafka_q_new0 (rdkafka_queue.c:108)
==19478==    by 0x165469: rd_kafka_cgrp_new (rdkafka_cgrp.c:209)
==19478==    by 0x13C395: rd_kafka_new (rdkafka.c:2109)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 176 bytes in 1 blocks are still reachable in loss record 37 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1B246E: rd_malloc (rd.h:100)
==19478==    by 0x1B4A7A: rd_kafka_q_new0 (rdkafka_queue.c:108)
==19478==    by 0x1654C5: rd_kafka_cgrp_new (rdkafka_cgrp.c:212)
==19478==    by 0x13C395: rd_kafka_new (rdkafka.c:2109)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 176 bytes in 1 blocks are still reachable in loss record 38 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1B246E: rd_malloc (rd.h:100)
==19478==    by 0x1B4A7A: rd_kafka_q_new0 (rdkafka_queue.c:108)
==19478==    by 0x15CBC9: rd_kafka_broker_add (rdkafka_broker.c:4742)
==19478==    by 0x15D573: rd_kafka_broker_add_logical (rdkafka_broker.c:4911)
==19478==    by 0x16559B: rd_kafka_cgrp_new (rdkafka_cgrp.c:231)
==19478==    by 0x13C395: rd_kafka_new (rdkafka.c:2109)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 176 bytes in 1 blocks are still reachable in loss record 39 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1B246E: rd_malloc (rd.h:100)
==19478==    by 0x1B4A7A: rd_kafka_q_new0 (rdkafka_queue.c:108)
==19478==    by 0x15CBC9: rd_kafka_broker_add (rdkafka_broker.c:4742)
==19478==    by 0x13C776: rd_kafka_new (rdkafka.c:2205)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 176 bytes in 1 blocks are still reachable in loss record 40 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1B246E: rd_malloc (rd.h:100)
==19478==    by 0x1B4A7A: rd_kafka_q_new0 (rdkafka_queue.c:108)
==19478==    by 0x15CBC9: rd_kafka_broker_add (rdkafka_broker.c:4742)
==19478==    by 0x15E15F: rd_kafka_brokers_add0 (rdkafka_broker.c:5220)
==19478==    by 0x13C7CE: rd_kafka_new (rdkafka.c:2212)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 193 bytes in 7 blocks are still reachable in loss record 41 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4FE853E: strdup (strdup.c:42)
==19478==    by 0x174206: rd_strdup (rd.h:117)
==19478==    by 0x17585C: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1452)
==19478==    by 0x176644: rd_kafka_defaultconf_set (rdkafka_conf.c:1879)
==19478==    by 0x17669B: rd_kafka_conf_new (rdkafka_conf.c:1890)
==19478==    by 0x124983: RdKafka::Conf::create(RdKafka::Conf::ConfType) (ConfImpl.cpp:84)
==19478==    by 0x122DC8: main (JunctionBox.cpp:59)
==19478== 
==19478== 193 bytes in 7 blocks are still reachable in loss record 42 of 54
==19478==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4FE853E: strdup (strdup.c:42)
==19478==    by 0x174206: rd_strdup (rd.h:117)
==19478==    by 0x17585C: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1452)
==19478==    by 0x176644: rd_kafka_defaultconf_set (rdkafka_conf.c:1879)
==19478==    by 0x17669B: rd_kafka_conf_new (rdkafka_conf.c:1890)
==19478==    by 0x177352: rd_kafka_conf_dup (rdkafka_conf.c:2306)
==19478==    by 0x1260B2: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:54)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 256 bytes in 1 blocks are still reachable in loss record 43 of 54
==19478==    at 0x483A723: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x483D017: realloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1E7148: rd_realloc (rd.h:106)
==19478==    by 0x1E7343: rd_list_grow (rdlist.c:47)
==19478==    by 0x1E7398: rd_list_init (rdlist.c:56)
==19478==    by 0x16550E: rd_kafka_cgrp_new (rdkafka_cgrp.c:215)
==19478==    by 0x13C395: rd_kafka_new (rdkafka.c:2109)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 304 bytes in 1 blocks are still reachable in loss record 44 of 54
==19478==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x17415B: rd_calloc (rd.h:94)
==19478==    by 0x1766C8: rd_kafka_topic_conf_new (rdkafka_conf.c:1896)
==19478==    by 0x124992: RdKafka::Conf::create(RdKafka::Conf::ConfType) (ConfImpl.cpp:86)
==19478==    by 0x122DD9: main (JunctionBox.cpp:60)
==19478== 
==19478== 304 bytes in 1 blocks are possibly lost in loss record 45 of 54
==19478==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4013E0A: allocate_dtv (dl-tls.c:286)
==19478==    by 0x4013E0A: _dl_allocate_tls (dl-tls.c:532)
==19478==    by 0x4BCE382: allocate_stack (allocatestack.c:622)
==19478==    by 0x4BCE382: pthread_create@@GLIBC_2.2.5 (pthread_create.c:662)
==19478==    by 0x4BDABA9: thrd_create (thrd_create.c:27)
==19478==    by 0x15D130: rd_kafka_broker_add (rdkafka_broker.c:4824)
==19478==    by 0x15D573: rd_kafka_broker_add_logical (rdkafka_broker.c:4911)
==19478==    by 0x16559B: rd_kafka_cgrp_new (rdkafka_cgrp.c:231)
==19478==    by 0x13C395: rd_kafka_new (rdkafka.c:2109)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 304 bytes in 1 blocks are possibly lost in loss record 46 of 54
==19478==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4013E0A: allocate_dtv (dl-tls.c:286)
==19478==    by 0x4013E0A: _dl_allocate_tls (dl-tls.c:532)
==19478==    by 0x4BCE382: allocate_stack (allocatestack.c:622)
==19478==    by 0x4BCE382: pthread_create@@GLIBC_2.2.5 (pthread_create.c:662)
==19478==    by 0x4BDABA9: thrd_create (thrd_create.c:27)
==19478==    by 0x13C63F: rd_kafka_new (rdkafka.c:2179)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 304 bytes in 1 blocks are possibly lost in loss record 47 of 54
==19478==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4013E0A: allocate_dtv (dl-tls.c:286)
==19478==    by 0x4013E0A: _dl_allocate_tls (dl-tls.c:532)
==19478==    by 0x4BCE382: allocate_stack (allocatestack.c:622)
==19478==    by 0x4BCE382: pthread_create@@GLIBC_2.2.5 (pthread_create.c:662)
==19478==    by 0x4BDABA9: thrd_create (thrd_create.c:27)
==19478==    by 0x15D130: rd_kafka_broker_add (rdkafka_broker.c:4824)
==19478==    by 0x13C776: rd_kafka_new (rdkafka.c:2205)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 304 bytes in 1 blocks are possibly lost in loss record 48 of 54
==19478==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x4013E0A: allocate_dtv (dl-tls.c:286)
==19478==    by 0x4013E0A: _dl_allocate_tls (dl-tls.c:532)
==19478==    by 0x4BCE382: allocate_stack (allocatestack.c:622)
==19478==    by 0x4BCE382: pthread_create@@GLIBC_2.2.5 (pthread_create.c:662)
==19478==    by 0x4BDABA9: thrd_create (thrd_create.c:27)
==19478==    by 0x15D130: rd_kafka_broker_add (rdkafka_broker.c:4824)
==19478==    by 0x15E15F: rd_kafka_brokers_add0 (rdkafka_broker.c:5220)
==19478==    by 0x13C7CE: rd_kafka_new (rdkafka.c:2212)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 664 bytes in 1 blocks are still reachable in loss record 49 of 54
==19478==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x1629BF: rd_calloc (rd.h:94)
==19478==    by 0x1653A2: rd_kafka_cgrp_new (rdkafka_cgrp.c:196)
==19478==    by 0x13C395: rd_kafka_new (rdkafka.c:2109)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 1,544 bytes in 1 blocks are still reachable in loss record 50 of 54
==19478==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x17415B: rd_calloc (rd.h:94)
==19478==    by 0x176686: rd_kafka_conf_new (rdkafka_conf.c:1889)
==19478==    by 0x124983: RdKafka::Conf::create(RdKafka::Conf::ConfType) (ConfImpl.cpp:84)
==19478==    by 0x122DC8: main (JunctionBox.cpp:59)
==19478== 
==19478== 2,816 bytes in 1 blocks are still reachable in loss record 51 of 54
==19478==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x148910: rd_calloc (rd.h:94)
==19478==    by 0x15C97C: rd_kafka_broker_add (rdkafka_broker.c:4711)
==19478==    by 0x15D573: rd_kafka_broker_add_logical (rdkafka_broker.c:4911)
==19478==    by 0x16559B: rd_kafka_cgrp_new (rdkafka_cgrp.c:231)
==19478==    by 0x13C395: rd_kafka_new (rdkafka.c:2109)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 2,816 bytes in 1 blocks are still reachable in loss record 52 of 54
==19478==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x148910: rd_calloc (rd.h:94)
==19478==    by 0x15C97C: rd_kafka_broker_add (rdkafka_broker.c:4711)
==19478==    by 0x13C776: rd_kafka_new (rdkafka.c:2205)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 2,816 bytes in 1 blocks are still reachable in loss record 53 of 54
==19478==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x148910: rd_calloc (rd.h:94)
==19478==    by 0x15C97C: rd_kafka_broker_add (rdkafka_broker.c:4711)
==19478==    by 0x15E15F: rd_kafka_brokers_add0 (rdkafka_broker.c:5220)
==19478==    by 0x13C7CE: rd_kafka_new (rdkafka.c:2212)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== 3,128 bytes in 1 blocks are still reachable in loss record 54 of 54
==19478==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19478==    by 0x133463: rd_calloc (rd.h:94)
==19478==    by 0x13BC03: rd_kafka_new (rdkafka.c:1949)
==19478==    by 0x1260D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==19478==    by 0x1230BF: main (JunctionBox.cpp:85)
==19478== 
==19478== LEAK SUMMARY:
==19478==    definitely lost: 0 bytes in 0 blocks
==19478==    indirectly lost: 0 bytes in 0 blocks
==19478==      possibly lost: 1,216 bytes in 4 blocks
==19478==    still reachable: 17,298 bytes in 64 blocks
==19478==         suppressed: 0 bytes in 0 blocks
==19478== 
==19478== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
==19478== 
==19478== 1 errors in context 1 of 5:
==19478== Invalid read of size 8
==19478==    at 0x132942: RdKafka::Topic::create(RdKafka::Handle*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (TopicImpl.cpp:84)
==19478==    by 0x123140: main (JunctionBox.cpp:86)
==19478==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
==19478== 
==19478== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)

@edenhill
Copy link
Contributor

Can't really make out where the null pointer dereference is happening seeing that neither base or rk_ seem to be NULL.
It might be that librdkafka is compiled with optimization and the line numbers dont add up, could you try rebuilding librdkafka with ./configure --disable-optimization --enable-devel and re-run valgrind and/or gdb and see if you can dig out more info where it is actually crashing?
Alternatively you can use ./dev-conf.sh asan to build librdkafka with ASAN (alternative to using valgrind).

@Lovett1991
Copy link

I got some wierd errors when trying to use configure even after using dos2unix it still played up so I tried with...

cmake -DCMAKE_BUILD_TYPE=Debug ../

CmakeLists.txt

cmake_minimum_required(VERSION 3.10)

project(JunctionBox VERSION 0.1)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)

#just for debugging
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall")

set(RDKAFKA_BUILD_STATIC ON CACHE BOOL "")

include_directories( ./libs/yaml-cpp/include ./libs/librdkafka)

add_executable(JunctionBox src/JunctionBox.cpp)

add_subdirectory( ./libs/yaml-cpp )
add_subdirectory( ./libs/librdkafka)
target_link_libraries( JunctionBox debug yaml-cpp rdkafka++)

configure_file(src/JunctionBox.h.in src/JunctionBox.h)

target_include_directories(JunctionBox PUBLIC "${PROJECT_BINARY_DIR}/src")

and re ran with valgrind...

==9852== Memcheck, a memory error detector
==9852== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==9852== Using Valgrind-3.15.0-608cb11914-20190413 and LibVEX; rerun with -h for copyright info
==9852== Command: ./JunctionBox
==9852== Parent PID: 13329
==9852== 
--9852-- 
--9852-- Valgrind options:
--9852--    --leak-check=full
--9852--    --show-leak-kinds=all
--9852--    --track-origins=yes
--9852--    --verbose
--9852--    --log-file=valgrind-out.txt
--9852-- Contents of /proc/version:
--9852--   Linux version 5.3.0-42-generic (buildd@lcy01-amd64-026) (gcc version 9.2.1 20191008 (Ubuntu 9.2.1-9ubuntu2)) #34-Ubuntu SMP Fri Feb 28 05:49:40 UTC 2020
--9852-- 
--9852-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand
--9852-- Page sizes: currently 4096, max supported 4096
--9852-- Valgrind library directory: /usr/lib/x86_64-linux-gnu/valgrind
--9852-- Reading syms from /home/alex/workspace/public/compendium/junction-box/build/JunctionBox
--9852-- Reading syms from /usr/lib/x86_64-linux-gnu/ld-2.30.so
--9852--   Considering /usr/lib/x86_64-linux-gnu/ld-2.30.so ..
--9852--   .. CRC mismatch (computed 27d27021 wanted aaa15eb8)
--9852--   Considering /lib/x86_64-linux-gnu/ld-2.30.so ..
--9852--   .. CRC mismatch (computed 27d27021 wanted aaa15eb8)
--9852--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.30.so ..
--9852--   .. CRC is valid
--9852-- Reading syms from /usr/lib/x86_64-linux-gnu/valgrind/memcheck-amd64-linux
--9852--    object doesn't have a symbol table
--9852--    object doesn't have a dynamic symbol table
--9852-- Scheduler: using generic scheduler lock implementation.
--9852-- Reading suppressions file: /usr/lib/x86_64-linux-gnu/valgrind/default.supp
==9852== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-9852-by-alex-on-???
==9852== embedded gdbserver: writing to   /tmp/vgdb-pipe-to-vgdb-from-9852-by-alex-on-???
==9852== embedded gdbserver: shared mem   /tmp/vgdb-pipe-shared-mem-vgdb-9852-by-alex-on-???
==9852== 
==9852== TO CONTROL THIS PROCESS USING vgdb (which you probably
==9852== don't want to do, unless you know exactly what you're doing,
==9852== or are doing some strange experiment):
==9852==   /usr/lib/x86_64-linux-gnu/valgrind/../../bin/vgdb --pid=9852 ...command...
==9852== 
==9852== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==9852==   /path/to/gdb ./JunctionBox
==9852== and then give GDB the following command
==9852==   target remote | /usr/lib/x86_64-linux-gnu/valgrind/../../bin/vgdb --pid=9852
==9852== --pid is optional if only one valgrind process is running
==9852== 
--9852-- REDIR: 0x4021b90 (ld-linux-x86-64.so.2:strlen) redirected to 0x580c9c82 (???)
--9852-- REDIR: 0x4021960 (ld-linux-x86-64.so.2:index) redirected to 0x580c9c9c (???)
--9852-- Reading syms from /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_core-amd64-linux.so
--9852--    object doesn't have a symbol table
--9852-- Reading syms from /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so
--9852--    object doesn't have a symbol table
==9852== WARNING: new redirection conflicts with existing -- ignoring it
--9852--     old: 0x04021b90 (strlen              ) R-> (0000.0) 0x580c9c82 ???
--9852--     new: 0x04021b90 (strlen              ) R-> (2007.0) 0x0483e060 strlen
--9852-- REDIR: 0x401e370 (ld-linux-x86-64.so.2:strcmp) redirected to 0x483efd0 (strcmp)
--9852-- REDIR: 0x40220f0 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4842a20 (mempcpy)
--9852-- Reading syms from /usr/lib/x86_64-linux-gnu/libssl.so.1.1
--9852--    object doesn't have a symbol table
--9852-- Reading syms from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
--9852--    object doesn't have a symbol table
--9852-- Reading syms from /usr/lib/x86_64-linux-gnu/libpthread-2.30.so
--9852--   Considering /usr/lib/debug/.build-id/7f/4107df84da625f1b445ade877e1e0ab6ba823d.debug ..
--9852--   .. build-id is valid
--9852-- Reading syms from /usr/lib/x86_64-linux-gnu/libdl-2.30.so
--9852--   Considering /usr/lib/x86_64-linux-gnu/libdl-2.30.so ..
--9852--   .. CRC mismatch (computed 771ab420 wanted a8d0413b)
--9852--   Considering /lib/x86_64-linux-gnu/libdl-2.30.so ..
--9852--   .. CRC mismatch (computed 771ab420 wanted a8d0413b)
--9852--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libdl-2.30.so ..
--9852--   .. CRC is valid
--9852-- Reading syms from /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28
--9852--    object doesn't have a symbol table
--9852-- Reading syms from /usr/lib/x86_64-linux-gnu/libm-2.30.so
--9852--   Considering /usr/lib/x86_64-linux-gnu/libm-2.30.so ..
--9852--   .. CRC mismatch (computed e12bfda3 wanted 14b81770)
--9852--   Considering /lib/x86_64-linux-gnu/libm-2.30.so ..
--9852--   .. CRC mismatch (computed e12bfda3 wanted 14b81770)
--9852--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libm-2.30.so ..
--9852--   .. CRC is valid
--9852-- Reading syms from /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
--9852--    object doesn't have a symbol table
--9852-- Reading syms from /usr/lib/x86_64-linux-gnu/libc-2.30.so
--9852--   Considering /usr/lib/x86_64-linux-gnu/libc-2.30.so ..
--9852--   .. CRC mismatch (computed 7a789c53 wanted 61e075a4)
--9852--   Considering /lib/x86_64-linux-gnu/libc-2.30.so ..
--9852--   .. CRC mismatch (computed 7a789c53 wanted 61e075a4)
--9852--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.30.so ..
--9852--   .. CRC is valid
--9852-- REDIR: 0x4fea630 (libc.so.6:memmove) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fe9930 (libc.so.6:strncpy) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fea960 (libc.so.6:strcasecmp) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fe9250 (libc.so.6:strcat) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fe9990 (libc.so.6:rindex) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4febe00 (libc.so.6:rawmemchr) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x5006e90 (libc.so.6:wmemchr) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x50069d0 (libc.so.6:wcscmp) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fea790 (libc.so.6:mempcpy) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fea5c0 (libc.so.6:bcmp) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fe98c0 (libc.so.6:strncmp) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fe9300 (libc.so.6:strcmp) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fea6f0 (libc.so.6:memset) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x5006990 (libc.so.6:wcschr) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fe9820 (libc.so.6:strnlen) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fe93e0 (libc.so.6:strcspn) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fea9b0 (libc.so.6:strncasecmp) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fe9380 (libc.so.6:strcpy) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4feab00 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x5008100 (libc.so.6:wcsnlen) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x5006a10 (libc.so.6:wcscpy) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fe99d0 (libc.so.6:strpbrk) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fe92b0 (libc.so.6:index) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fe97e0 (libc.so.6:strlen) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4ff2d50 (libc.so.6:memrchr) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4feaa00 (libc.so.6:strcasecmp_l) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fea580 (libc.so.6:memchr) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x5006ae0 (libc.so.6:wcslen) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fe9c90 (libc.so.6:strspn) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fea900 (libc.so.6:stpncpy) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fea8a0 (libc.so.6:stpcpy) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4febe40 (libc.so.6:strchrnul) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4feaa50 (libc.so.6:strncasecmp_l) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x5077bb0 (libc.so.6:__memcpy_chk) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x4fea4a0 (libc.so.6:strstr) redirected to 0x48301d0 (_vgnU_ifunc_wrapper)
--9852-- REDIR: 0x50d29c0 (libc.so.6:__strrchr_avx2) redirected to 0x483da10 (rindex)
--9852-- REDIR: 0x4fe4290 (libc.so.6:malloc) redirected to 0x483a780 (malloc)
--9852-- REDIR: 0x50d2b90 (libc.so.6:__strlen_avx2) redirected to 0x483df40 (strlen)
--9852-- REDIR: 0x50cf180 (libc.so.6:__memcmp_avx2_movbe) redirected to 0x48411e0 (bcmp)
--9852-- REDIR: 0x50ce090 (libc.so.6:__strcmp_avx2) redirected to 0x483eed0 (strcmp)
--9852-- REDIR: 0x50d5ba0 (libc.so.6:__memcpy_avx_unaligned_erms) redirected to 0x48419f0 (memmove)
--9852-- REDIR: 0x4c991c0 (libstdc++.so.6:operator new(unsigned long)) redirected to 0x483adf0 (operator new(unsigned long))
--9852-- REDIR: 0x4fe5cc0 (libc.so.6:calloc) redirected to 0x483cce0 (calloc)
--9852-- REDIR: 0x50d6020 (libc.so.6:__memset_avx2_unaligned_erms) redirected to 0x48418e0 (memset)
--9852-- REDIR: 0x4c97400 (libstdc++.so.6:operator delete(void*)) redirected to 0x483bf50 (operator delete(void*))
--9852-- REDIR: 0x50cf560 (libc.so.6:__strcasecmp_avx) redirected to 0x483e830 (strcasecmp)
--9852-- REDIR: 0x50d5b80 (libc.so.6:__mempcpy_avx_unaligned_erms) redirected to 0x4842660 (mempcpy)
--9852-- REDIR: 0x50d27d0 (libc.so.6:__strchrnul_avx2) redirected to 0x4842540 (strchrnul)
--9852-- REDIR: 0x4fe5030 (libc.so.6:realloc) redirected to 0x483cf30 (realloc)
--9852-- REDIR: 0x50ce4d0 (libc.so.6:__strncmp_avx2) redirected to 0x483e670 (strncmp)
--9852-- REDIR: 0x50d25a0 (libc.so.6:__strchr_avx2) redirected to 0x483dbf0 (index)
--9852-- REDIR: 0x5005590 (libc.so.6:__strstr_sse2_unaligned) redirected to 0x4842c20 (strstr)
--9852-- REDIR: 0x4fe4880 (libc.so.6:free) redirected to 0x483b9d0 (free)
==9852== Invalid read of size 8
==9852==    at 0x137A52: RdKafka::Topic::create(RdKafka::Handle*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (TopicImpl.cpp:84)
==9852==    by 0x128238: main (JunctionBox.cpp:88)
==9852==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
==9852== 
==9852== 
==9852== Process terminating with default action of signal 11 (SIGSEGV)
==9852==  Access not within mapped region at address 0x8
==9852==    at 0x137A52: RdKafka::Topic::create(RdKafka::Handle*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (TopicImpl.cpp:84)
==9852==    by 0x128238: main (JunctionBox.cpp:88)
==9852==  If you believe this happened as a result of a stack
==9852==  overflow in your program's main thread (unlikely but
==9852==  possible), you can try to increase the size of the
==9852==  main thread stack using the --main-stacksize= flag.
==9852==  The main thread stack size used in this run was 8388608.
==9852== 
==9852== HEAP SUMMARY:
==9852==     in use at exit: 19,628 bytes in 73 blocks
==9852==   total heap usage: 79 allocs, 6 frees, 95,016 bytes allocated
==9852== 
==9852== Searching for pointers to 73 not-freed blocks
==9852== Checked 33,819,048 bytes
==9852== 
==9852== 1 bytes in 1 blocks are still reachable in loss record 1 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4FE953E: strdup (strdup.c:42)
==9852==    by 0x14E62D: rd_strdup (rd.h:135)
==9852==    by 0x1647FE: rd_kafka_broker_add (rdkafka_broker.c:5152)
==9852==    by 0x142098: rd_kafka_new (rdkafka.c:2317)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 4 bytes in 1 blocks are still reachable in loss record 2 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4FE953E: strdup (strdup.c:42)
==9852==    by 0x17ECCC: rd_strdup (rd.h:135)
==9852==    by 0x18040D: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1543)
==9852==    by 0x1808F3: rd_kafka_anyconf_set_prop (rdkafka_conf.c:1706)
==9852==    by 0x18142B: rd_kafka_anyconf_set (rdkafka_conf.c:2039)
==9852==    by 0x1814D3: rd_kafka_conf_set (rdkafka_conf.c:2080)
==9852==    by 0x12982A: RdKafka::ConfImpl::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConfImpl.cpp:44)
==9852==    by 0x1280D4: main (JunctionBox.cpp:75)
==9852== 
==9852== 6 bytes in 1 blocks are still reachable in loss record 3 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4FE953E: strdup (strdup.c:42)
==9852==    by 0x17ECCC: rd_strdup (rd.h:135)
==9852==    by 0x18040D: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1543)
==9852==    by 0x1808F3: rd_kafka_anyconf_set_prop (rdkafka_conf.c:1706)
==9852==    by 0x18142B: rd_kafka_anyconf_set (rdkafka_conf.c:2039)
==9852==    by 0x1814D3: rd_kafka_conf_set (rdkafka_conf.c:2080)
==9852==    by 0x184B3C: rd_kafka_conf_finalize (rdkafka_conf.c:3366)
==9852==    by 0x141239: rd_kafka_new (rdkafka.c:1998)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 10 bytes in 1 blocks are still reachable in loss record 4 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4FE953E: strdup (strdup.c:42)
==9852==    by 0x17ECCC: rd_strdup (rd.h:135)
==9852==    by 0x18040D: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1543)
==9852==    by 0x1808F3: rd_kafka_anyconf_set_prop (rdkafka_conf.c:1706)
==9852==    by 0x18142B: rd_kafka_anyconf_set (rdkafka_conf.c:2039)
==9852==    by 0x1814D3: rd_kafka_conf_set (rdkafka_conf.c:2080)
==9852==    by 0x12982A: RdKafka::ConfImpl::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConfImpl.cpp:44)
==9852==    by 0x127EE6: main (JunctionBox.cpp:62)
==9852== 
==9852== 10 bytes in 1 blocks are still reachable in loss record 5 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4FE953E: strdup (strdup.c:42)
==9852==    by 0x14E62D: rd_strdup (rd.h:135)
==9852==    by 0x1647FE: rd_kafka_broker_add (rdkafka_broker.c:5152)
==9852==    by 0x165F19: rd_kafka_brokers_add0 (rdkafka_broker.c:5652)
==9852==    by 0x1420F0: rd_kafka_new (rdkafka.c:2324)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 12 bytes in 1 blocks are still reachable in loss record 6 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4FE953E: strdup (strdup.c:42)
==9852==    by 0x14E62D: rd_strdup (rd.h:135)
==9852==    by 0x164853: rd_kafka_broker_add (rdkafka_broker.c:5156)
==9852==    by 0x142098: rd_kafka_new (rdkafka.c:2317)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 14 bytes in 2 blocks are still reachable in loss record 7 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4FE953E: strdup (strdup.c:42)
==9852==    by 0x17ECCC: rd_strdup (rd.h:135)
==9852==    by 0x18040D: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1543)
==9852==    by 0x181EFB: rd_kafka_anyconf_copy (rdkafka_conf.c:2394)
==9852==    by 0x181F91: rd_kafka_conf_dup (rdkafka_conf.c:2405)
==9852==    by 0x12B1AA: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:54)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 16 bytes in 1 blocks are still reachable in loss record 8 of 55
==9852==    at 0x483A723: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x483D017: realloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x23741C: rd_realloc (rd.h:124)
==9852==    by 0x237617: rd_list_grow (rdlist.c:47)
==9852==    by 0x23766C: rd_list_init (rdlist.c:56)
==9852==    by 0x14E105: rd_kafka_assignors_init (rdkafka_assignor.c:498)
==9852==    by 0x141961: rd_kafka_new (rdkafka.c:2145)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 17 bytes in 1 blocks are still reachable in loss record 9 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4FE953E: strdup (strdup.c:42)
==9852==    by 0x14E62D: rd_strdup (rd.h:135)
==9852==    by 0x1647FE: rd_kafka_broker_add (rdkafka_broker.c:5152)
==9852==    by 0x165322: rd_kafka_broker_add_logical (rdkafka_broker.c:5341)
==9852==    by 0x16DAE6: rd_kafka_cgrp_new (rdkafka_cgrp.c:256)
==9852==    by 0x141CA2: rd_kafka_new (rdkafka.c:2218)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 17 bytes in 1 blocks are still reachable in loss record 10 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4FE953E: strdup (strdup.c:42)
==9852==    by 0x14E62D: rd_strdup (rd.h:135)
==9852==    by 0x164853: rd_kafka_broker_add (rdkafka_broker.c:5156)
==9852==    by 0x165322: rd_kafka_broker_add_logical (rdkafka_broker.c:5341)
==9852==    by 0x16DAE6: rd_kafka_cgrp_new (rdkafka_cgrp.c:256)
==9852==    by 0x141CA2: rd_kafka_new (rdkafka.c:2218)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 18 bytes in 1 blocks are still reachable in loss record 11 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x16AD28: rd_malloc (rd.h:118)
==9852==    by 0x16B8F9: rd_kafkap_str_new (rdkafka_proto.h:297)
==9852==    by 0x16DA10: rd_kafka_cgrp_new (rdkafka_cgrp.c:237)
==9852==    by 0x141CA2: rd_kafka_new (rdkafka.c:2218)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 19 bytes in 1 blocks are still reachable in loss record 12 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x16AD28: rd_malloc (rd.h:118)
==9852==    by 0x16B8F9: rd_kafkap_str_new (rdkafka_proto.h:297)
==9852==    by 0x17C5B9: rd_kafka_cgrp_set_member_id (rdkafka_cgrp.c:3469)
==9852==    by 0x16DA6C: rd_kafka_cgrp_new (rdkafka_cgrp.c:241)
==9852==    by 0x141CA2: rd_kafka_new (rdkafka.c:2218)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 20 bytes in 2 blocks are still reachable in loss record 13 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4FE953E: strdup (strdup.c:42)
==9852==    by 0x17ECCC: rd_strdup (rd.h:135)
==9852==    by 0x18040D: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1543)
==9852==    by 0x1811F5: rd_kafka_defaultconf_set (rdkafka_conf.c:1970)
==9852==    by 0x1812DE: rd_kafka_topic_conf_new (rdkafka_conf.c:1992)
==9852==    by 0x129A8A: RdKafka::Conf::create(RdKafka::Conf::ConfType) (ConfImpl.cpp:86)
==9852==    by 0x127E81: main (JunctionBox.cpp:60)
==9852== 
==9852== 22 bytes in 1 blocks are still reachable in loss record 14 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x1385D2: rd_malloc (rd.h:118)
==9852==    by 0x1393F0: rd_kafkap_str_new (rdkafka_proto.h:297)
==9852==    by 0x141864: rd_kafka_new (rdkafka.c:2114)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 24 bytes in 1 blocks are still reachable in loss record 15 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x14B8B1: rd_malloc (rd.h:118)
==9852==    by 0x14C26C: rd_kafkap_str_new (rdkafka_proto.h:297)
==9852==    by 0x14DFD0: rd_kafka_assignor_add (rdkafka_assignor.c:462)
==9852==    by 0x14E293: rd_kafka_assignors_init (rdkafka_assignor.c:524)
==9852==    by 0x141961: rd_kafka_new (rdkafka.c:2145)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 25 bytes in 1 blocks are still reachable in loss record 16 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4FE953E: strdup (strdup.c:42)
==9852==    by 0x14E62D: rd_strdup (rd.h:135)
==9852==    by 0x164853: rd_kafka_broker_add (rdkafka_broker.c:5156)
==9852==    by 0x165F19: rd_kafka_brokers_add0 (rdkafka_broker.c:5652)
==9852==    by 0x1420F0: rd_kafka_new (rdkafka.c:2324)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 26 bytes in 1 blocks are still reachable in loss record 17 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x1385D2: rd_malloc (rd.h:118)
==9852==    by 0x1393F0: rd_kafkap_str_new (rdkafka_proto.h:297)
==9852==    by 0x14183B: rd_kafka_new (rdkafka.c:2111)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 26 bytes in 1 blocks are still reachable in loss record 18 of 55
==9852==    at 0x483AE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4D3959C: void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
==9852==    by 0x1281EA: main (JunctionBox.cpp:88)
==9852== 
==9852== 27 bytes in 1 blocks are still reachable in loss record 19 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x14B8B1: rd_malloc (rd.h:118)
==9852==    by 0x14C26C: rd_kafkap_str_new (rdkafka_proto.h:297)
==9852==    by 0x14DFE9: rd_kafka_assignor_add (rdkafka_assignor.c:463)
==9852==    by 0x14E293: rd_kafka_assignors_init (rdkafka_assignor.c:524)
==9852==    by 0x141961: rd_kafka_new (rdkafka.c:2145)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 27 bytes in 1 blocks are still reachable in loss record 20 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x14B8B1: rd_malloc (rd.h:118)
==9852==    by 0x14C26C: rd_kafkap_str_new (rdkafka_proto.h:297)
==9852==    by 0x14DFE9: rd_kafka_assignor_add (rdkafka_assignor.c:463)
==9852==    by 0x14E2DA: rd_kafka_assignors_init (rdkafka_assignor.c:529)
==9852==    by 0x141961: rd_kafka_new (rdkafka.c:2145)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 28 bytes in 1 blocks are still reachable in loss record 21 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x1385D2: rd_malloc (rd.h:118)
==9852==    by 0x13957B: rd_kafkap_bytes_new (rdkafka_proto.h:425)
==9852==    by 0x14178B: rd_kafka_new (rdkafka.c:2101)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 29 bytes in 1 blocks are still reachable in loss record 22 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x14B8B1: rd_malloc (rd.h:118)
==9852==    by 0x14C26C: rd_kafkap_str_new (rdkafka_proto.h:297)
==9852==    by 0x14DFD0: rd_kafka_assignor_add (rdkafka_assignor.c:462)
==9852==    by 0x14E2DA: rd_kafka_assignors_init (rdkafka_assignor.c:529)
==9852==    by 0x141961: rd_kafka_new (rdkafka.c:2145)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 40 bytes in 1 blocks are still reachable in loss record 23 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x237720: rd_list_alloc (rdlist.c:81)
==9852==    by 0x23773A: rd_list_new (rdlist.c:85)
==9852==    by 0x16DA80: rd_kafka_cgrp_new (rdkafka_cgrp.c:243)
==9852==    by 0x141CA2: rd_kafka_new (rdkafka.c:2218)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 46 bytes in 2 blocks are still reachable in loss record 24 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x17EC69: rd_malloc (rd.h:118)
==9852==    by 0x17F5D2: rd_kafkap_str_new (rdkafka_proto.h:297)
==9852==    by 0x180491: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1555)
==9852==    by 0x1811F5: rd_kafka_defaultconf_set (rdkafka_conf.c:1970)
==9852==    by 0x181274: rd_kafka_conf_new (rdkafka_conf.c:1983)
==9852==    by 0x129A7B: RdKafka::Conf::create(RdKafka::Conf::ConfType) (ConfImpl.cpp:84)
==9852==    by 0x127E70: main (JunctionBox.cpp:59)
==9852== 
==9852== 46 bytes in 2 blocks are still reachable in loss record 25 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x17EC69: rd_malloc (rd.h:118)
==9852==    by 0x17F5D2: rd_kafkap_str_new (rdkafka_proto.h:297)
==9852==    by 0x180491: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1555)
==9852==    by 0x1811F5: rd_kafka_defaultconf_set (rdkafka_conf.c:1970)
==9852==    by 0x181274: rd_kafka_conf_new (rdkafka_conf.c:1983)
==9852==    by 0x181F53: rd_kafka_conf_dup (rdkafka_conf.c:2401)
==9852==    by 0x12B1AA: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:54)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 57 bytes in 1 blocks are still reachable in loss record 26 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x1C0637: rd_malloc (rd.h:118)
==9852==    by 0x1C419C: rd_kafka_q_io_event_enable (rdkafka_queue.c:737)
==9852==    by 0x164E50: rd_kafka_broker_add (rdkafka_broker.c:5239)
==9852==    by 0x165322: rd_kafka_broker_add_logical (rdkafka_broker.c:5341)
==9852==    by 0x16DAE6: rd_kafka_cgrp_new (rdkafka_cgrp.c:256)
==9852==    by 0x141CA2: rd_kafka_new (rdkafka.c:2218)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 57 bytes in 1 blocks are still reachable in loss record 27 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x1C0637: rd_malloc (rd.h:118)
==9852==    by 0x1C419C: rd_kafka_q_io_event_enable (rdkafka_queue.c:737)
==9852==    by 0x164E50: rd_kafka_broker_add (rdkafka_broker.c:5239)
==9852==    by 0x165F19: rd_kafka_brokers_add0 (rdkafka_broker.c:5652)
==9852==    by 0x1420F0: rd_kafka_new (rdkafka.c:2324)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 64 bytes in 1 blocks are still reachable in loss record 28 of 55
==9852==    at 0x483A723: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x483D017: realloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x23741C: rd_realloc (rd.h:124)
==9852==    by 0x237617: rd_list_grow (rdlist.c:47)
==9852==    by 0x23766C: rd_list_init (rdlist.c:56)
==9852==    by 0x1413B5: rd_kafka_new (rdkafka.c:2034)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 72 bytes in 1 blocks are still reachable in loss record 29 of 55
==9852==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x14B869: rd_calloc (rd.h:112)
==9852==    by 0x14DFBB: rd_kafka_assignor_add (rdkafka_assignor.c:460)
==9852==    by 0x14E293: rd_kafka_assignors_init (rdkafka_assignor.c:524)
==9852==    by 0x141961: rd_kafka_new (rdkafka.c:2145)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 72 bytes in 1 blocks are still reachable in loss record 30 of 55
==9852==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x14B869: rd_calloc (rd.h:112)
==9852==    by 0x14DFBB: rd_kafka_assignor_add (rdkafka_assignor.c:460)
==9852==    by 0x14E2DA: rd_kafka_assignors_init (rdkafka_assignor.c:529)
==9852==    by 0x141961: rd_kafka_new (rdkafka.c:2145)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 112 bytes in 1 blocks are still reachable in loss record 31 of 55
==9852==    at 0x483AE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x12B0D9: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:42)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 120 bytes in 1 blocks are still reachable in loss record 32 of 55
==9852==    at 0x483AE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x129A57: RdKafka::Conf::create(RdKafka::Conf::ConfType) (ConfImpl.cpp:79)
==9852==    by 0x127E70: main (JunctionBox.cpp:59)
==9852== 
==9852== 120 bytes in 1 blocks are still reachable in loss record 33 of 55
==9852==    at 0x483AE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x129A57: RdKafka::Conf::create(RdKafka::Conf::ConfType) (ConfImpl.cpp:79)
==9852==    by 0x127E81: main (JunctionBox.cpp:60)
==9852== 
==9852== 176 bytes in 1 blocks are still reachable in loss record 34 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x1C0637: rd_malloc (rd.h:118)
==9852==    by 0x1C2CC3: rd_kafka_q_new0 (rdkafka_queue.c:108)
==9852==    by 0x141478: rd_kafka_new (rdkafka.c:2047)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 176 bytes in 1 blocks are still reachable in loss record 35 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x1C0637: rd_malloc (rd.h:118)
==9852==    by 0x1C2CC3: rd_kafka_q_new0 (rdkafka_queue.c:108)
==9852==    by 0x14149D: rd_kafka_new (rdkafka.c:2048)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 176 bytes in 1 blocks are still reachable in loss record 36 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x1C0637: rd_malloc (rd.h:118)
==9852==    by 0x1C2CC3: rd_kafka_q_new0 (rdkafka_queue.c:108)
==9852==    by 0x16D94B: rd_kafka_cgrp_new (rdkafka_cgrp.c:229)
==9852==    by 0x141CA2: rd_kafka_new (rdkafka.c:2218)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 176 bytes in 1 blocks are still reachable in loss record 37 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x1C0637: rd_malloc (rd.h:118)
==9852==    by 0x1C2CC3: rd_kafka_q_new0 (rdkafka_queue.c:108)
==9852==    by 0x16D994: rd_kafka_cgrp_new (rdkafka_cgrp.c:232)
==9852==    by 0x141CA2: rd_kafka_new (rdkafka.c:2218)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 176 bytes in 1 blocks are still reachable in loss record 38 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x1C0637: rd_malloc (rd.h:118)
==9852==    by 0x1C2CC3: rd_kafka_q_new0 (rdkafka_queue.c:108)
==9852==    by 0x16D9F0: rd_kafka_cgrp_new (rdkafka_cgrp.c:235)
==9852==    by 0x141CA2: rd_kafka_new (rdkafka.c:2218)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 176 bytes in 1 blocks are still reachable in loss record 39 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x1C0637: rd_malloc (rd.h:118)
==9852==    by 0x1C2CC3: rd_kafka_q_new0 (rdkafka_queue.c:108)
==9852==    by 0x164949: rd_kafka_broker_add (rdkafka_broker.c:5163)
==9852==    by 0x165322: rd_kafka_broker_add_logical (rdkafka_broker.c:5341)
==9852==    by 0x16DAE6: rd_kafka_cgrp_new (rdkafka_cgrp.c:256)
==9852==    by 0x141CA2: rd_kafka_new (rdkafka.c:2218)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 176 bytes in 1 blocks are still reachable in loss record 40 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x1C0637: rd_malloc (rd.h:118)
==9852==    by 0x1C2CC3: rd_kafka_q_new0 (rdkafka_queue.c:108)
==9852==    by 0x164949: rd_kafka_broker_add (rdkafka_broker.c:5163)
==9852==    by 0x142098: rd_kafka_new (rdkafka.c:2317)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 176 bytes in 1 blocks are still reachable in loss record 41 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x1C0637: rd_malloc (rd.h:118)
==9852==    by 0x1C2CC3: rd_kafka_q_new0 (rdkafka_queue.c:108)
==9852==    by 0x164949: rd_kafka_broker_add (rdkafka_broker.c:5163)
==9852==    by 0x165F19: rd_kafka_brokers_add0 (rdkafka_broker.c:5652)
==9852==    by 0x1420F0: rd_kafka_new (rdkafka.c:2324)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 204 bytes in 8 blocks are still reachable in loss record 42 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4FE953E: strdup (strdup.c:42)
==9852==    by 0x17ECCC: rd_strdup (rd.h:135)
==9852==    by 0x18040D: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1543)
==9852==    by 0x1811F5: rd_kafka_defaultconf_set (rdkafka_conf.c:1970)
==9852==    by 0x181274: rd_kafka_conf_new (rdkafka_conf.c:1983)
==9852==    by 0x129A7B: RdKafka::Conf::create(RdKafka::Conf::ConfType) (ConfImpl.cpp:84)
==9852==    by 0x127E70: main (JunctionBox.cpp:59)
==9852== 
==9852== 204 bytes in 8 blocks are still reachable in loss record 43 of 55
==9852==    at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4FE953E: strdup (strdup.c:42)
==9852==    by 0x17ECCC: rd_strdup (rd.h:135)
==9852==    by 0x18040D: rd_kafka_anyconf_set_prop0 (rdkafka_conf.c:1543)
==9852==    by 0x1811F5: rd_kafka_defaultconf_set (rdkafka_conf.c:1970)
==9852==    by 0x181274: rd_kafka_conf_new (rdkafka_conf.c:1983)
==9852==    by 0x181F53: rd_kafka_conf_dup (rdkafka_conf.c:2401)
==9852==    by 0x12B1AA: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:54)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 256 bytes in 1 blocks are still reachable in loss record 44 of 55
==9852==    at 0x483A723: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x483D017: realloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x23741C: rd_realloc (rd.h:124)
==9852==    by 0x237617: rd_list_grow (rdlist.c:47)
==9852==    by 0x23766C: rd_list_init (rdlist.c:56)
==9852==    by 0x16DA59: rd_kafka_cgrp_new (rdkafka_cgrp.c:240)
==9852==    by 0x141CA2: rd_kafka_new (rdkafka.c:2218)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 304 bytes in 1 blocks are possibly lost in loss record 45 of 55
==9852==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4013E0A: allocate_dtv (dl-tls.c:286)
==9852==    by 0x4013E0A: _dl_allocate_tls (dl-tls.c:532)
==9852==    by 0x4BCF382: allocate_stack (allocatestack.c:622)
==9852==    by 0x4BCF382: pthread_create@@GLIBC_2.2.5 (pthread_create.c:662)
==9852==    by 0x4BDBBA9: thrd_create (thrd_create.c:27)
==9852==    by 0x164EA4: rd_kafka_broker_add (rdkafka_broker.c:5247)
==9852==    by 0x165322: rd_kafka_broker_add_logical (rdkafka_broker.c:5341)
==9852==    by 0x16DAE6: rd_kafka_cgrp_new (rdkafka_cgrp.c:256)
==9852==    by 0x141CA2: rd_kafka_new (rdkafka.c:2218)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 304 bytes in 1 blocks are possibly lost in loss record 46 of 55
==9852==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4013E0A: allocate_dtv (dl-tls.c:286)
==9852==    by 0x4013E0A: _dl_allocate_tls (dl-tls.c:532)
==9852==    by 0x4BCF382: allocate_stack (allocatestack.c:622)
==9852==    by 0x4BCF382: pthread_create@@GLIBC_2.2.5 (pthread_create.c:662)
==9852==    by 0x4BDBBA9: thrd_create (thrd_create.c:27)
==9852==    by 0x141F61: rd_kafka_new (rdkafka.c:2291)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 304 bytes in 1 blocks are possibly lost in loss record 47 of 55
==9852==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4013E0A: allocate_dtv (dl-tls.c:286)
==9852==    by 0x4013E0A: _dl_allocate_tls (dl-tls.c:532)
==9852==    by 0x4BCF382: allocate_stack (allocatestack.c:622)
==9852==    by 0x4BCF382: pthread_create@@GLIBC_2.2.5 (pthread_create.c:662)
==9852==    by 0x4BDBBA9: thrd_create (thrd_create.c:27)
==9852==    by 0x164EA4: rd_kafka_broker_add (rdkafka_broker.c:5247)
==9852==    by 0x142098: rd_kafka_new (rdkafka.c:2317)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 304 bytes in 1 blocks are possibly lost in loss record 48 of 55
==9852==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x4013E0A: allocate_dtv (dl-tls.c:286)
==9852==    by 0x4013E0A: _dl_allocate_tls (dl-tls.c:532)
==9852==    by 0x4BCF382: allocate_stack (allocatestack.c:622)
==9852==    by 0x4BCF382: pthread_create@@GLIBC_2.2.5 (pthread_create.c:662)
==9852==    by 0x4BDBBA9: thrd_create (thrd_create.c:27)
==9852==    by 0x164EA4: rd_kafka_broker_add (rdkafka_broker.c:5247)
==9852==    by 0x165F19: rd_kafka_brokers_add0 (rdkafka_broker.c:5652)
==9852==    by 0x1420F0: rd_kafka_new (rdkafka.c:2324)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 312 bytes in 1 blocks are still reachable in loss record 49 of 55
==9852==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x17EC21: rd_calloc (rd.h:112)
==9852==    by 0x1812A1: rd_kafka_topic_conf_new (rdkafka_conf.c:1989)
==9852==    by 0x129A8A: RdKafka::Conf::create(RdKafka::Conf::ConfType) (ConfImpl.cpp:86)
==9852==    by 0x127E81: main (JunctionBox.cpp:60)
==9852== 
==9852== 816 bytes in 1 blocks are still reachable in loss record 50 of 55
==9852==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x16ACE0: rd_calloc (rd.h:112)
==9852==    by 0x16D8CD: rd_kafka_cgrp_new (rdkafka_cgrp.c:219)
==9852==    by 0x141CA2: rd_kafka_new (rdkafka.c:2218)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 1,608 bytes in 1 blocks are still reachable in loss record 51 of 55
==9852==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x17EC21: rd_calloc (rd.h:112)
==9852==    by 0x181237: rd_kafka_conf_new (rdkafka_conf.c:1980)
==9852==    by 0x129A7B: RdKafka::Conf::create(RdKafka::Conf::ConfType) (ConfImpl.cpp:84)
==9852==    by 0x127E70: main (JunctionBox.cpp:59)
==9852== 
==9852== 2,896 bytes in 1 blocks are still reachable in loss record 52 of 55
==9852==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x14E582: rd_calloc (rd.h:112)
==9852==    by 0x1646CE: rd_kafka_broker_add (rdkafka_broker.c:5131)
==9852==    by 0x165322: rd_kafka_broker_add_logical (rdkafka_broker.c:5341)
==9852==    by 0x16DAE6: rd_kafka_cgrp_new (rdkafka_cgrp.c:256)
==9852==    by 0x141CA2: rd_kafka_new (rdkafka.c:2218)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 2,896 bytes in 1 blocks are still reachable in loss record 53 of 55
==9852==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x14E582: rd_calloc (rd.h:112)
==9852==    by 0x1646CE: rd_kafka_broker_add (rdkafka_broker.c:5131)
==9852==    by 0x142098: rd_kafka_new (rdkafka.c:2317)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 2,896 bytes in 1 blocks are still reachable in loss record 54 of 55
==9852==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x14E582: rd_calloc (rd.h:112)
==9852==    by 0x1646CE: rd_kafka_broker_add (rdkafka_broker.c:5131)
==9852==    by 0x165F19: rd_kafka_brokers_add0 (rdkafka_broker.c:5652)
==9852==    by 0x1420F0: rd_kafka_new (rdkafka.c:2324)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== 3,712 bytes in 1 blocks are still reachable in loss record 55 of 55
==9852==    at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==9852==    by 0x13858A: rd_calloc (rd.h:112)
==9852==    by 0x1412BC: rd_kafka_new (rdkafka.c:2013)
==9852==    by 0x12B1D1: RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (ConsumerImpl.cpp:58)
==9852==    by 0x12818F: main (JunctionBox.cpp:86)
==9852== 
==9852== LEAK SUMMARY:
==9852==    definitely lost: 0 bytes in 0 blocks
==9852==    indirectly lost: 0 bytes in 0 blocks
==9852==      possibly lost: 1,216 bytes in 4 blocks
==9852==    still reachable: 18,412 bytes in 69 blocks
==9852==         suppressed: 0 bytes in 0 blocks
==9852== 
==9852== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
==9852== 
==9852== 1 errors in context 1 of 5:
==9852== Invalid read of size 8
==9852==    at 0x137A52: RdKafka::Topic::create(RdKafka::Handle*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (TopicImpl.cpp:84)
==9852==    by 0x128238: main (JunctionBox.cpp:88)
==9852==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
==9852== 
==9852== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)

I'm not entirely sure this has had the desired effect.

@edenhill
Copy link
Contributor

Still weird.

Can you provide a minimal reproducible program?

@Lovett1991
Copy link

yeah give us a min :) Wierdly just tried the shared library it seems to work

@edenhill
Copy link
Contributor

Are you linking rdkafka++ statically?

@Lovett1991
Copy link

@edenhill
Copy link
Contributor

It does not build. Is librdkafka supposed to be cloned to libs/librdkafka?
If I do that it fails because of missing linking:

$ make
Scanning dependencies of target LibrdKafkaSample
[  0%] Building CXX object CMakeFiles/LibrdKafkaSample.dir/src/LibrdKafkaSample.cpp.o
[  0%] Linking CXX executable LibrdKafkaSample
/usr/bin/ld: CMakeFiles/LibrdKafkaSample.dir/src/LibrdKafkaSample.cpp.o: in function `main':
LibrdKafkaSample.cpp:(.text+0x75): undefined reference to `RdKafka::Conf::create(RdKafka::Conf::ConfType)'
/usr/bin/ld: LibrdKafkaSample.cpp:(.text+0x86): undefined reference to `RdKafka::Conf::create(RdKafka::Conf::ConfType)'
/usr/bin/ld: LibrdKafkaSample.cpp:(.text+0x344): undefined reference to `RdKafka::Consumer::create(RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
/usr/bin/ld: LibrdKafkaSample.cpp:(.text+0x3e4): undefined reference to `RdKafka::Topic::create(RdKafka::Handle*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
/usr/bin/ld: LibrdKafkaSample.cpp:(.text+0x46a): undefined reference to `RdKafka::wait_destroyed(int)'
collect2: error: ld returned 1 exit status

@Lovett1991
Copy link

yeah it's a submodule on the tag V1.4.0

Ok I've just pushed again and fixed the issue (hadn't linked publicly)

@edenhill
Copy link
Contributor

Thank you.

Works flawlessly on Ubuntu 19.04 x64 with gcc 8.3.0

maglun@eden:~/src/librdkafka-basic-sample (init)$ valgrind ./LibrdKafkaSample 
==19555== Memcheck, a memory error detector
==19555== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==19555== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==19555== Command: ./LibrdKafkaSample
==19555== 
creating consumer
eccreating topic
topic created
ho ==19555== 
==19555== HEAP SUMMARY:
==19555==     in use at exit: 37,101 bytes in 145 blocks
==19555==   total heap usage: 712 allocs, 567 frees, 248,285 bytes allocated
==19555== 
==19555== LEAK SUMMARY:
==19555==    definitely lost: 272 bytes in 3 blocks
==19555==    indirectly lost: 2,364 bytes in 17 blocks
==19555==      possibly lost: 0 bytes in 0 blocks
==19555==    still reachable: 34,465 bytes in 125 blocks
==19555==         suppressed: 0 bytes in 0 blocks
==19555== Rerun with --leak-check=full to see details of leaked memory
==19555== 
==19555== For counts of detected and suppressed errors, rerun with: -v
==19555== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
maglun@eden:~/src/librdkafka-basic-sample (init)$ echo $?
0

@Lovett1991
Copy link

super weird

Ubuntu 19.10 x64 with gcc 9.2.1

I'll try in a vm/docker and see if it makes any difference

alex@GNT-9ZDYXY2:~/workspace/lib/librdkafka-basic-sample/build$ rm -rf ./* && cmake ../ && cmake --build . && valgrind ./LibrdKafkaSample 
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pow in m
-- Looking for pow in m - found
-- Checking for module 'libsasl2'
--   No package 'libsasl2' found
CMake Warning at libs/librdkafka/CMakeLists.txt:153 (find_package):
  By not providing "FindLZ4.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "LZ4", but
  CMake did not find one.

  Could not find a package configuration file provided by "LZ4" with any of
  the following names:

    LZ4Config.cmake
    lz4-config.cmake

  Add the installation prefix of "LZ4" to CMAKE_PREFIX_PATH or set "LZ4_DIR"
  to a directory containing one of the above files.  If "LZ4" provides a
  separate development package or SDK, be sure it has been installed.


-- Using bundled LZ4 implementation.
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1c")  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/alex/workspace/lib/librdkafka-basic-sample/build
Scanning dependencies of target rdkafka
[  1%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/crc32c.c.o
[  1%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdaddr.c.o
[  2%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdavl.c.o
[  2%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdbuf.c.o
[  3%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdcrc32.c.o
[  3%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdfnv1a.c.o
[  4%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka.c.o
[  4%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_assignor.c.o
[  5%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_broker.c.o
[  5%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_buf.c.o
[  6%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_cgrp.c.o
[  6%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_conf.c.o
[  6%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_event.c.o
[  7%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_feature.c.o
[  7%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_lz4.c.o
[  8%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_metadata.c.o
[  8%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_metadata_cache.c.o
[  9%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_msg.c.o
[  9%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_msgset_reader.c.o
[ 10%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_msgset_writer.c.o
[ 10%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_offset.c.o
[ 11%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_op.c.o
[ 11%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_partition.c.o
[ 12%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_pattern.c.o
[ 12%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_queue.c.o
[ 13%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_range_assignor.c.o
[ 13%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_request.c.o
[ 14%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_roundrobin_assignor.c.o
[ 14%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_sasl.c.o
[ 15%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_sasl_plain.c.o
[ 15%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_subscription.c.o
[ 16%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_timer.c.o
[ 16%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_topic.c.o
[ 17%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_transport.c.o
[ 17%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_interceptor.c.o
[ 17%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_header.c.o
[ 18%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_admin.c.o
[ 18%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_aux.c.o
[ 19%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_background.c.o
[ 19%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_idempotence.c.o
[ 20%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_txnmgr.c.o
[ 20%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_cert.c.o
[ 21%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_coord.c.o
[ 21%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_mock.c.o
[ 22%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_mock_handlers.c.o
[ 22%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_mock_cgrp.c.o
[ 23%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_error.c.o
[ 23%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdlist.c.o
[ 24%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdlog.c.o
[ 24%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdmurmur2.c.o
[ 25%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdports.c.o
[ 25%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdrand.c.o
[ 26%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdregex.c.o
[ 26%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdstring.c.o
[ 27%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdunittest.c.o
[ 27%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdvarint.c.o
[ 28%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/snappy.c.o
[ 28%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/tinycthread.c.o
[ 28%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/tinycthread_extra.c.o
[ 29%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdxxhash.c.o
[ 29%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_ssl.c.o
[ 30%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdhdrhistogram.c.o
[ 30%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rddl.c.o
[ 31%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/rdkafka_plugin.c.o
[ 31%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/lz4.c.o
[ 32%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/lz4frame.c.o
[ 32%] Building C object libs/librdkafka/src/CMakeFiles/rdkafka.dir/lz4hc.c.o
[ 33%] Linking C static library librdkafka.a
[ 33%] Built target rdkafka
Scanning dependencies of target rdkafka++
[ 33%] Building CXX object libs/librdkafka/src-cpp/CMakeFiles/rdkafka++.dir/ConfImpl.cpp.o
[ 34%] Building CXX object libs/librdkafka/src-cpp/CMakeFiles/rdkafka++.dir/ConsumerImpl.cpp.o
[ 34%] Building CXX object libs/librdkafka/src-cpp/CMakeFiles/rdkafka++.dir/HandleImpl.cpp.o
[ 35%] Building CXX object libs/librdkafka/src-cpp/CMakeFiles/rdkafka++.dir/HeadersImpl.cpp.o
[ 35%] Building CXX object libs/librdkafka/src-cpp/CMakeFiles/rdkafka++.dir/KafkaConsumerImpl.cpp.o
[ 36%] Building CXX object libs/librdkafka/src-cpp/CMakeFiles/rdkafka++.dir/MessageImpl.cpp.o
[ 36%] Building CXX object libs/librdkafka/src-cpp/CMakeFiles/rdkafka++.dir/MetadataImpl.cpp.o
[ 37%] Building CXX object libs/librdkafka/src-cpp/CMakeFiles/rdkafka++.dir/ProducerImpl.cpp.o
[ 37%] Building CXX object libs/librdkafka/src-cpp/CMakeFiles/rdkafka++.dir/QueueImpl.cpp.o
[ 38%] Building CXX object libs/librdkafka/src-cpp/CMakeFiles/rdkafka++.dir/RdKafka.cpp.o
[ 38%] Building CXX object libs/librdkafka/src-cpp/CMakeFiles/rdkafka++.dir/TopicImpl.cpp.o
[ 39%] Building CXX object libs/librdkafka/src-cpp/CMakeFiles/rdkafka++.dir/TopicPartitionImpl.cpp.o
[ 39%] Linking CXX static library librdkafka++.a
[ 39%] Built target rdkafka++
Scanning dependencies of target LibrdKafkaSample
[ 39%] Building CXX object CMakeFiles/LibrdKafkaSample.dir/src/LibrdKafkaSample.cpp.o
[ 39%] Linking CXX executable LibrdKafkaSample
[ 39%] Built target LibrdKafkaSample
Scanning dependencies of target rdkafka_example_cpp
[ 39%] Building CXX object libs/librdkafka/examples/CMakeFiles/rdkafka_example_cpp.dir/rdkafka_example.cpp.o
[ 40%] Linking CXX executable rdkafka_example_cpp
[ 40%] Built target rdkafka_example_cpp
Scanning dependencies of target consumer
[ 41%] Building C object libs/librdkafka/examples/CMakeFiles/consumer.dir/consumer.c.o
[ 41%] Linking C executable consumer
[ 41%] Built target consumer
Scanning dependencies of target rdkafka_performance
[ 41%] Building C object libs/librdkafka/examples/CMakeFiles/rdkafka_performance.dir/rdkafka_performance.c.o
[ 42%] Linking C executable rdkafka_performance
[ 42%] Built target rdkafka_performance
Scanning dependencies of target producer
[ 43%] Building C object libs/librdkafka/examples/CMakeFiles/producer.dir/producer.c.o
[ 43%] Linking C executable producer
[ 43%] Built target producer
Scanning dependencies of target rdkafka_complex_consumer_example_cpp
[ 43%] Building CXX object libs/librdkafka/examples/CMakeFiles/rdkafka_complex_consumer_example_cpp.dir/rdkafka_complex_consumer_example.cpp.o
[ 44%] Linking CXX executable rdkafka_complex_consumer_example_cpp
[ 44%] Built target rdkafka_complex_consumer_example_cpp
Scanning dependencies of target producer_cpp
[ 45%] Building CXX object libs/librdkafka/examples/CMakeFiles/producer_cpp.dir/producer.cpp.o
[ 45%] Linking CXX executable producer_cpp
[ 45%] Built target producer_cpp
Scanning dependencies of target kafkatest_verifiable_client
[ 46%] Building CXX object libs/librdkafka/examples/CMakeFiles/kafkatest_verifiable_client.dir/kafkatest_verifiable_client.cpp.o
[ 46%] Linking CXX executable kafkatest_verifiable_client
[ 46%] Built target kafkatest_verifiable_client
Scanning dependencies of target rdkafka_complex_consumer_example
[ 46%] Building C object libs/librdkafka/examples/CMakeFiles/rdkafka_complex_consumer_example.dir/rdkafka_complex_consumer_example.c.o
[ 47%] Linking C executable rdkafka_complex_consumer_example
[ 47%] Built target rdkafka_complex_consumer_example
Scanning dependencies of target rdkafka_example
[ 47%] Building C object libs/librdkafka/examples/CMakeFiles/rdkafka_example.dir/rdkafka_example.c.o
[ 48%] Linking C executable rdkafka_example
[ 48%] Built target rdkafka_example
Scanning dependencies of target test-runner
[ 48%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0000-unittests.c.o
[ 49%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0001-multiobj.c.o
[ 49%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0002-unkpart.c.o
[ 50%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0003-msgmaxsize.c.o
[ 50%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0004-conf.c.o
[ 51%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0005-order.c.o
[ 51%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0006-symbols.c.o
[ 52%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0007-autotopic.c.o
[ 52%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0008-reqacks.c.o
[ 53%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0009-mock_cluster.c.o
[ 53%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0011-produce_batch.c.o
In file included from /home/alex/workspace/lib/librdkafka-basic-sample/libs/librdkafka/tests/../src/rd.h:73,
                 from /home/alex/workspace/lib/librdkafka-basic-sample/libs/librdkafka/tests/test.h:31,
                 from /home/alex/workspace/lib/librdkafka-basic-sample/libs/librdkafka/tests/0011-produce_batch.c:34:
/home/alex/workspace/lib/librdkafka-basic-sample/libs/librdkafka/tests/0011-produce_batch.c: In function ‘test_single_partition’:
/home/alex/workspace/lib/librdkafka-basic-sample/libs/librdkafka/tests/0011-produce_batch.c:112:47: warning: ‘%i’ directive output may be truncated writing between 1 and 11 bytes into a region of size between 0 and 21 [-Wformat-truncation=]
  112 |                 rd_snprintf(msg, sizeof(msg), "%s:%s test message #%i",
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/workspace/lib/librdkafka-basic-sample/libs/librdkafka/tests/../src/rdposix.h:85:36: note: in definition of macro ‘rd_snprintf’
   85 | #define rd_snprintf(...)  snprintf(__VA_ARGS__)
      |                                    ^~~~~~~~~~~
/home/alex/workspace/lib/librdkafka-basic-sample/libs/librdkafka/tests/0011-produce_batch.c:112:68: note: format string is defined here
  112 |                 rd_snprintf(msg, sizeof(msg), "%s:%s test message #%i",
      |                                                                    ^~
In file included from /home/alex/workspace/lib/librdkafka-basic-sample/libs/librdkafka/tests/../src/rd.h:73,
                 from /home/alex/workspace/lib/librdkafka-basic-sample/libs/librdkafka/tests/test.h:31,
                 from /home/alex/workspace/lib/librdkafka-basic-sample/libs/librdkafka/tests/0011-produce_batch.c:34:
/home/alex/workspace/lib/librdkafka-basic-sample/libs/librdkafka/tests/../src/rdposix.h:85:27: note: ‘snprintf’ output between 109 and 140 bytes into a destination of size 128
   85 | #define rd_snprintf(...)  snprintf(__VA_ARGS__)
      |                           ^~~~~~~~~~~~~~~~~~~~~
/home/alex/workspace/lib/librdkafka-basic-sample/libs/librdkafka/tests/0011-produce_batch.c:112:17: note: in expansion of macro ‘rd_snprintf’
  112 |                 rd_snprintf(msg, sizeof(msg), "%s:%s test message #%i",
      |                 ^~~~~~~~~~~
[ 54%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0012-produce_consume.c.o
[ 54%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0013-null-msgs.c.o
[ 54%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0014-reconsume-191.c.o
[ 55%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0015-offset_seeks.c.o
[ 55%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0016-client_swname.c.o
[ 56%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0017-compression.c.o
[ 56%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0018-cgrp_term.c.o
[ 57%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0019-list_groups.c.o
[ 57%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0020-destroy_hang.c.o
[ 58%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0021-rkt_destroy.c.o
[ 58%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0022-consume_batch.c.o
[ 59%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0025-timers.c.o
[ 59%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0026-consume_pause.c.o
[ 60%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0028-long_topicnames.c.o
[ 60%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0029-assign_offset.c.o
[ 61%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0030-offset_commit.c.o
[ 61%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0031-get_offsets.c.o
[ 62%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0033-regex_subscribe.c.o
[ 62%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0034-offset_reset.c.o
[ 63%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0035-api_version.c.o
[ 63%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0036-partial_fetch.c.o
[ 64%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0037-destroy_hang_local.c.o
[ 64%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0038-performance.c.o
[ 65%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0039-event.c.o
[ 65%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0040-io_event.c.o
[ 65%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0041-fetch_max_bytes.c.o
[ 66%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0042-many_topics.c.o
[ 66%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0043-no_connection.c.o
[ 67%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0044-partition_cnt.c.o
[ 67%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0045-subscribe_update.c.o
[ 68%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0046-rkt_cache.c.o
[ 68%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0047-partial_buf_tmout.c.o
[ 69%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0048-partitioner.c.o
[ 69%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0049-consume_conn_close.c.o
[ 70%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0050-subscribe_adds.c.o
[ 70%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0051-assign_adds.c.o
[ 71%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0052-msg_timestamps.c.o
[ 71%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0053-stats_cb.cpp.o
[ 72%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0054-offset_time.cpp.o
[ 72%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0055-producer_latency.c.o
[ 73%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0056-balanced_group_mt.c.o
[ 73%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0057-invalid_topic.cpp.o
[ 74%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0058-log.cpp.o
[ 74%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0059-bsearch.cpp.o
[ 75%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0060-op_prio.cpp.o
[ 75%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0061-consumer_lag.cpp.o
[ 76%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0062-stats_event.c.o
[ 76%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0063-clusterid.cpp.o
[ 76%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0064-interceptors.c.o
[ 77%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0065-yield.cpp.o
[ 77%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0066-plugins.cpp.o
[ 78%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0067-empty_topic.cpp.o
[ 78%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0068-produce_timeout.c.o
[ 79%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0069-consumer_add_parts.c.o
[ 79%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0070-null_empty.cpp.o
[ 80%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0072-headers_ut.c.o
[ 80%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0073-headers.c.o
[ 81%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0074-producev.c.o
[ 81%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0075-retry.c.o
[ 82%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0076-produce_retry.c.o
[ 82%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0077-compaction.c.o
[ 83%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0078-c_from_cpp.cpp.o
[ 83%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0079-fork.c.o
[ 84%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0080-admin_ut.c.o
[ 84%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0081-admin.c.o
[ 85%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0082-fetch_max_bytes.cpp.o
[ 85%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0083-cb_event.c.o
[ 86%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0084-destroy_flags.c.o
[ 86%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0085-headers.cpp.o
[ 87%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0086-purge.c.o
[ 87%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0088-produce_metadata_timeout.c.o
[ 87%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0089-max_poll_interval.c.o
[ 88%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0090-idempotence.c.o
[ 88%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0091-max_poll_interval_timeout.c.o
[ 89%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0092-mixed_msgver.c.o
[ 89%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0093-holb.c.o
[ 90%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0094-idempotence_msg_timeout.c.o
[ 90%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0095-all_brokers_down.cpp.o
[ 91%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0097-ssl_verify.cpp.o
[ 91%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0098-consumer-txn.cpp.o
[ 92%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0099-commit_metadata.c.o
[ 92%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0100-thread_interceptors.cpp.o
[ 93%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0101-fetch-from-follower.cpp.o
[ 93%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0102-static_group_rebalance.c.o
[ 94%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0103-transactions.c.o
[ 94%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0104-fetch_from_follower_mock.c.o
[ 95%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0105-transactions_mock.c.o
[ 95%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/0106-cgrp_sess_timeout.c.o
[ 96%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/8000-idle.cpp.o
[ 96%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/test.c.o
[ 97%] Building CXX object libs/librdkafka/tests/CMakeFiles/test-runner.dir/testcpp.cpp.o
[ 97%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/rusage.c.o
[ 98%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/sockem.c.o
[ 98%] Building C object libs/librdkafka/tests/CMakeFiles/test-runner.dir/sockem_ctrl.c.o
[ 99%] Linking CXX executable test-runner
[ 99%] Built target test-runner
Scanning dependencies of target interceptor_test
[100%] Building C object libs/librdkafka/tests/interceptor_test/CMakeFiles/interceptor_test.dir/interceptor_test.c.o
[100%] Linking C shared library interceptor_test.so
[100%] Built target interceptor_test
==22929== Memcheck, a memory error detector
==22929== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==22929== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==22929== Command: ./LibrdKafkaSample
==22929== 
creating consumer
creating topic
==22929== Invalid read of size 8
==22929==    at 0x13674A: RdKafka::Topic::create(RdKafka::Handle*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (in /home/alex/workspace/lib/librdkafka-basic-sample/build/LibrdKafkaSample)
==22929==    by 0x128174: main (in /home/alex/workspace/lib/librdkafka-basic-sample/build/LibrdKafkaSample)
==22929==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
==22929== 
==22929== 
==22929== Process terminating with default action of signal 11 (SIGSEGV)
==22929==  Access not within mapped region at address 0x8
==22929==    at 0x13674A: RdKafka::Topic::create(RdKafka::Handle*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RdKafka::Conf*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (in /home/alex/workspace/lib/librdkafka-basic-sample/build/LibrdKafkaSample)
==22929==    by 0x128174: main (in /home/alex/workspace/lib/librdkafka-basic-sample/build/LibrdKafkaSample)
==22929==  If you believe this happened as a result of a stack
==22929==  overflow in your program's main thread (unlikely but
==22929==  possible), you can try to increase the size of the
==22929==  main thread stack using the --main-stacksize= flag.
==22929==  The main thread stack size used in this run was 8388608.
==22929== 
==22929== HEAP SUMMARY:
==22929==     in use at exit: 19,628 bytes in 73 blocks
==22929==   total heap usage: 79 allocs, 6 frees, 95,016 bytes allocated
==22929== 
==22929== LEAK SUMMARY:
==22929==    definitely lost: 0 bytes in 0 blocks
==22929==    indirectly lost: 0 bytes in 0 blocks
==22929==      possibly lost: 1,216 bytes in 4 blocks
==22929==    still reachable: 18,412 bytes in 69 blocks
==22929==         suppressed: 0 bytes in 0 blocks
==22929== Rerun with --leak-check=full to see details of leaked memory
==22929== 
==22929== For lists of detected and suppressed errors, rerun with: -s
==22929== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped

@Lovett1991
Copy link

... someone did a derp.

problem was similar to @Patrick-Hua with headers...

In the sample project I had

#include <librdkafka/rdkafkacpp.h>

as opposed to

#include "../libs/librdkafka/src-cpp/rdkafkacpp.h"

not sure what version I have in the shared lib but evidently theres a difference.

Thanks for the help.

@edenhill
Copy link
Contributor

So all is good now, problem resolved?

The C++ API is not ABI safe, unfortunately.

@Lovett1991
Copy link

yup works fine now ;)

@edenhill
Copy link
Contributor

Glad to hear it!

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

4 participants