protobuf icon indicating copy to clipboard operation
protobuf copied to clipboard

coredump in RepeatedPtrFieldBase::DestroyProtos()

Open kkzheng opened this issue 2 months ago • 1 comments

What version of protobuf and what language are you using? 3.19.6

What operating system (Linux, Windows, ...) and version? linux

What runtime / compiler are you using (e.g., python version or gcc version) gcc 8.2

What did you do? core dump in google::protobuf::internal::RepeatedPtrFieldBase::DestroyProtos()

(gdb) bt #0 0x0000000000000000 in ?? () #1 0x000000000164770f in google::protobuf::internal::RepeatedPtrFieldBase::DestroyProtos() () #2 0x0000000000855739 in ckv_plus::ShardStatistics::~ShardStatistics() () #3 0x0000000000855779 in ckv_plus::ShardStatistics::~ShardStatistics() () #4 0x000000000164770f in google::protobuf::internal::RepeatedPtrFieldBase::DestroyProtos() () #5 0x000000000077d938 in ckv_plus::GetCacheBaseInfoRsp::~GetCacheBaseInfoRsp() () #6 0x0000000000750ec7 in dollar::HttpHandlerService::GetCacheBaseInfo(trpc::RefPtrtrpc::ServerContext, std::shared_ptrtrpc::http::HttpRequest, trpc::http::HttpResponse*) () #7 0x0000000000755538 in std::_Function_handler<trpc::Status (trpc::RefPtrtrpc::ServerContext, std::shared_ptrtrpc::http::HttpRequest, trpc::http::HttpResponse*), std::_Bind<trpc::Status (dollar::HttpHandlerService::(dollar::HttpHandlerService, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(trpc::RefPtrtrpc::ServerContext, std::shared_ptrtrpc::http::HttpRequest, trpc::http::HttpResponse*)> >::_M_invoke(std::_Any_data const&, trpc::RefPtrtrpc::ServerContext&&, std::shared_ptrtrpc::http::HttpRequest&&, trpc::http::HttpResponse*&&) () #8 0x0000000000754ecd in trpc::http::FuncHandler::Handle(std::string const&, trpc::RefPtrtrpc::ServerContext, std::shared_ptrtrpc::http::HttpRequest, trpc::http::HttpResponse*) () #9 0x0000000000a1fa3e in trpc::http::HttpRoutes::Handle(std::string const&, trpc::http::HandlerBase*, trpc::RefPtrtrpc::ServerContext, std::shared_ptrtrpc::http::HttpRequest&, trpc::http::HttpResponse&) () #10 0x0000000000a19efd in trpc::HttpService::Dispatch(std::string const&, trpc::http::HandlerBase*, trpc::RefPtrtrpc::ServerContext&, std::shared_ptrtrpc::http::HttpRequest&, trpc::http::HttpResponse&) () #11 0x0000000000a1b4cd in trpc::HttpService::Handle(std::string const&, trpc::http::HandlerBase*, trpc::RefPtrtrpc::ServerContext&, std::shared_ptrtrpc::http::HttpRequest&, trpc::http::HttpResponse&, trpc::STransportMessage**) () #12 0x0000000000a1d0e6 in trpc::HttpService::HandleTransportMessage(trpc::STransportMessage*, trpc::STransportMessage**) () #13 0x00000000010d8b43 in trpc::Function<void ()>::TypeOps const* trpc::Function<void ()>::ErasedCopySmall<trpc::ServiceAdapter::HandleAnyMessage(trpc::RefPtrtrpc::Connection const&, std::deque<std::any, std::allocatorstd::any >&)::{lambda()#1}>(void*, trpc::ServiceAdapter::HandleAnyMessage(trpc::RefPtrtrpc::Connection const&, std::deque<std::any, std::allocatorstd::any >&)::{lambda()#1}&&)::{lambda(trpc::Function<void ()>::TypeOps const*)#1}::_FUN(trpc::Function<void ()>::TypeOps const*) () #14 0x00000000010e7175 in trpc::separate::NonCoroutineScheduling::HandleMsgTask(unsigned long) () #15 0x00000000010e71eb in trpc::separate::NonCoroutineScheduling::Schedule() () #16 0x00000000011327c1 in trpc::HandleWorkerThread::Run() () #17 0x00000000017e6fdf in execute_native_thread_routine () #18 0x00007f123c5baea5 in start_thread () from /lib64/libpthread.so.0 #19 0x00007f123b7f096d in sysctl () from /lib64/libc.so.6 #20 0x0000000000000000 in ?? ()

What did you expect to see give me some suggestion

Anything else we should know about your project / environment

kkzheng avatar Oct 30 '25 11:10 kkzheng

You might need to find the code that is adding a nullptr to a repeated field inside your ckv_plus::ShardStatistics message.

shaod2 avatar Oct 30 '25 16:10 shaod2