MySQL Forums
Forum List  »  Connector/C++

Re: MySQL 8.0: Connector/C++ - 8.0.17 - leak?
Posted by: Csaba Bordas
Date: September 20, 2019 09:22AM

I have an update on this!

After I have initialized the Session with "SessionOption::SSL_MODE, SSLMode::DISABLED" and
compiled with -g flag I see more detailed information in the report:

...
...
==24039== Searching for pointers to 2 not-freed blocks
==24039== Checked 220,904 bytes
==24039==
==24039== 64 bytes in 1 blocks are still reachable in loss record 1 of 2
==24039== at 0x4835DEF: operator new(unsigned long) (vg_replace_malloc.c:334)
==24039== by 0x4AE4E34: google::protobuf::internal::ShutdownData::get() (common.cc:347)
==24039== by 0x4AE48EE: google::protobuf::internal::OnShutdownRun(void (*)(void const*), void const*) (common.cc:364)
==24039== by 0x4AA630E: google::protobuf::internal::OnShutdownDestroyString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*) (generated_message_util.h:384)
==24039== by 0x4AEB242: google::protobuf::internal::InitProtobufDefaultsImpl() (generated_message_util.cc:76)
==24039== by 0x4AEB280: google::protobuf::internal::InitProtobufDefaults() (generated_message_util.cc:81)
==24039== by 0x4AEE220: google::protobuf::internal::InitSCCImpl(google::protobuf::internal::SCCInfoBase*) (generated_message_util.cc:804)
==24039== by 0x4A48D97: google::protobuf::internal::InitSCC(google::protobuf::internal::SCCInfoBase*) (generated_message_util.h:373)
==24039== by 0x4A93D19: Mysqlx::Prepare::Execute::Execute() (mysqlx_prepare.pb.cc:877)
==24039== by 0x4A25F87: cdk::protocol::mysqlx::Protocol_impl::Protocol_impl(cdk::protocol::mysqlx::Protocol::Stream*, cdk::protocol::mysqlx::Protocol_side) (protocol.cc:144)
==24039== by 0x4A2AF29: cdk::protocol::mysqlx::Protocol::Impl::Impl(cdk::protocol::mysqlx::Protocol::Stream*) (protocol.h:335)
==24039== by 0x4A2B8FA: cdk::foundation::opaque_impl<cdk::protocol::mysqlx::Protocol>::opaque_impl<cdk::protocol::mysqlx::Protocol::Stream*>(void*, cdk::protocol::mysqlx::Protocol::Stream*) (opa
==24039==
==24039== 1,024 bytes in 1 blocks are still reachable in loss record 2 of 2
==24039== at 0x4835DEF: operator new(unsigned long) (vg_replace_malloc.c:334)
==24039== by 0x4AE5D39: __gnu_cxx::new_allocator<std::pair<void (*)(void const*), void const*> >::allocate(unsigned long, void const*) (new_allocator.h:111)
==24039== by 0x4AE5BA8: std::allocator_traits<std::allocator<std::pair<void (*)(void const*), void const*> > >::allocate(std::allocator<std::pair<void (*)(void const*), void const*> >&, unsigned
==24039== by 0x4AE5A45: std::_Vector_base<std::pair<void (*)(void const*), void const*>, std::allocator<std::pair<void (*)(void const*), void const*> > >::_M_allocate(unsigned long) (stl_vector.
==24039== by 0x4AE567D: void std::vector<std::pair<void (*)(void const*), void const*>, std::allocator<std::pair<void (*)(void const*), void const*> > >::_M_realloc_insert<std::pair<void (*)(voi
==24039== by 0x4AE53FD: void std::vector<std::pair<void (*)(void const*), void const*>, std::allocator<std::pair<void (*)(void const*), void const*> > >::emplace_back<std::pair<void (*)(void con
==24039== by 0x4AE514D: std::vector<std::pair<void (*)(void const*), void const*>, std::allocator<std::pair<void (*)(void const*), void const*> > >::push_back(std::pair<void (*)(void const*), vo
==24039== by 0x4AE4937: google::protobuf::internal::OnShutdownRun(void (*)(void const*), void const*) (common.cc:366)
==24039== by 0x4A48DBC: google::protobuf::internal::OnShutdownDestroyMessage(void const*) (generated_message_util.h:380)
==24039== by 0x4A4AA36: protobuf_mysqlx_5fcrud_2eproto::InitDefaultsLimit() (mysqlx_crud.pb.cc:168)
==24039== by 0x4AEE0CB: google::protobuf::internal::(anonymous namespace)::InitSCC_DFS(google::protobuf::internal::SCCInfoBase*) (generated_message_util.cc:780)
==24039== by 0x4AEE0BB: google::protobuf::internal::(anonymous namespace)::InitSCC_DFS(google::protobuf::internal::SCCInfoBase*) (generated_message_util.cc:778)
==24039==
==24039== LEAK SUMMARY:
==24039== definitely lost: 0 bytes in 0 blocks
==24039== indirectly lost: 0 bytes in 0 blocks
==24039== possibly lost: 0 bytes in 0 blocks
==24039== still reachable: 1,088 bytes in 2 blocks
==24039== suppressed: 0 bytes in 0 blocks
==24039==
==24039== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==24039== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
....
...



Do I have to call some function to release these things?

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: MySQL 8.0: Connector/C++ - 8.0.17 - leak?
399
September 20, 2019 09:22AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.