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

double free? #2314

Closed
xiedeacc opened this issue Jul 11, 2023 · 3 comments
Closed

double free? #2314

xiedeacc opened this issue Jul 11, 2023 · 3 comments

Comments

@xiedeacc
Copy link

Describe the bug (描述bug)
rogram terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7f0ccb5fd700 (LWP 36598))]
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007f0de5aa07f1 in __GI_abort () at abort.c:79
#2 0x00007f0de610ef0a in __gnu_cxx::__verbose_terminate_handler () at ../../../../libstdc++-v3/libsupc++/vterminate.cc:95
#3 0x00007f0de611a71a in __cxxabiv1::__terminate(void ()()) () at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:48
#4 0x00007f0de6119779 in __cxa_call_terminate (ue_header=0x7f098ccedc60) at ../../../../libstdc++-v3/libsupc++/eh_call.cc:54
#5 0x00007f0de6119ea7 in __gxx_personality_v0 () at ../../../../libstdc++-v3/libsupc++/eh_personality.cc:685
#6 0x00007f0de5e61e24 in _Unwind_RaiseException_Phase2 () at ../../../libgcc/unwind.inc:64
#7 0x00007f0de5e6285e in _Unwind_Resume () at ../../../libgcc/unwind.inc:241
#8 0x000000000045520d in brpc::DestroyingPtrbrpc::policy::HttpContext::~DestroyingPtr (this=, __in_chrg=) at external/brpc/src/brpc/destroyable.h:41
#9 brpc::policy::ProcessHttpRequest (msg=) at external/brpc/src/brpc/policy/http_rpc_protocol.cpp:1562
#10 0x0000000000861c27 in brpc::ProcessInputMessage (void_arg=) at external/brpc/src/brpc/input_messenger.cpp:153
#11 brpc::RunLastMessage::operator() (last_msg=, this=) at external/brpc/src/brpc/input_messenger.cpp:153
#12 std::unique_ptr<brpc::InputMessageBase, brpc::RunLastMessage>::~unique_ptr (this=, __in_chrg=)
at /usr/local/gcc-11.3.0/lib/gcc/x86_64-linux-gnu/11.3.0/../../../../include/c++/11.3.0/bits/unique_ptr.h:361
#13 brpc::InputMessenger::OnNewMessages(brpc::Socket
) () at external/brpc/src/brpc/input_messenger.cpp:347
#14 0x00000000007adc5e in brpc::Socket::ProcessEvent(void*) () at external/brpc/src/brpc/socket.cpp:1050
#15 0x00000000008dcb67 in bthread::TaskGroup::task_runner(long) () at external/brpc/src/bthread/task_group.cpp:295
#16 0x00000000008ef761 in bthread_make_fcontext ()
#17 0x0000000000000000 in ?? ()
(gdb)

这是brpc导致的double free还是我自己的代码? 稳定core在这

To Reproduce (复现方法)

Expected behavior (期望行为)

Versions (各种版本)
OS: ubuntu18.04
Compiler: gcc 11.3.0
brpc: 1.3.0
protobuf: 3.19.2

@lorinlee
Copy link
Contributor

看着是你代码抛异常了。brpc目前可能会在析构函数里调用ProcessHttpRequest,如果抛异常会导致进程abort,可以试下在你的代码的最外面加个try catch看看

@wwbmmm
Copy link
Contributor

wwbmmm commented Jul 13, 2023

已知问题,这个PR已修复:#2256

@xiedeacc
Copy link
Author

已知问题,这个PR已修复:#2256

嗯,就是这个问题

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

3 participants