jai1 commented on issue #590: CPP Client - removed log statement from ClientImpl Destructor URL: https://github.com/apache/incubator-pulsar/pull/590#issuecomment-317603127 > Are we controlling the logger object destruction? No, it is a boost::thread_specific static object > Have you ran this through valgrind? That should give a hint, irrespectively on whether it crashes or not. Yes, valgrind gives the following error (with or w/o fix) - *but* only in specific env ``` ==28710== Invalid read of size 1 ==28710== at 0x5BA8F40: pthread_mutex_destroy (in /lib64/libpthread-2.12.so) ==28710== by 0x70257F9: log4cxx::Logger::~Logger() (in /home/jai1/lib64/liblog4cxx.so.10.0.0) ==28710== by 0x7053FF4: log4cxx::spi::RootLogger::~RootLogger() (in /home/jai1/lib64/liblog4cxx.so.10.0.0) ==28710== by 0x702561A: log4cxx::Logger::~Logger() (in /home/jai1/lib64/liblog4cxx.so.10.0.0) ==28710== by 0x7025798: log4cxx::Logger::~Logger() (in /home/jai1/lib64/liblog4cxx.so.10.0.0) ==28710== by 0x6FE5004: log4cxx::helpers::ObjectPtrT<log4cxx::Logger>::~ObjectPtrT() (in /home/jai1/lib64/liblog4cxx.so.10.0.0) ==28710== by 0x5FCBA05: boost::detail::set_tss_data(void const*, boost::shared_ptr<boost::detail::tss_cleanup_function>, void*, bool) (in /usr/lib64/libboost_thread-mt.so.5) ==28710== by 0x4E400E8: boost::thread_specific_ptr<log4cxx::helpers::ObjectPtrT<log4cxx::Logger> >::~thread_specific_ptr() (tss.hpp:77) ==28710== by 0x5841B21: exit (in /lib64/libc-2.12.so) ==28710== by 0x582AD63: (below main) (in /lib64/libc-2.12.so) ==28710== Address 0xe5156a8 is 264 bytes inside a block of size 8,192 free'd ==28710== at 0x4C273F0: free (vg_replace_malloc.c:446) ==28710== by 0xB5AD90C: apr_allocator_destroy (apr_pools.c:152) ==28710== by 0xB5AE223: apr_pool_terminate (apr_pools.c:639) ==28710== by 0x6FE1958: log4cxx::helpers::APRInitializer::~APRInitializer() (in /home/jai1/lib64/liblog4cxx.so.10.0.0) ==28710== by 0x5841B21: exit (in /lib64/libc-2.12.so) ==28710== by 0x582AD63: (below main) (in /lib64/libc-2.12.so) ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
With regards, Apache Git Services