Skip to content

core dump: pure virtual method called #253

@dusteye

Description

@dusteye

I use brpc as http service run in a std::thread with a little modification from http_c++ example. When I access a invalid path, the server return a error message "failed to find method", which seems normal, but when I access / and the /HttpService/Echo, the server core with message "pure virtual method called"

the call stack :
#0 0x00007f5751c4f625 in raise () from /lib64/libc.so.6
#1 0x00007f5751c50e05 in abort () from /lib64/libc.so.6
#2 0x0000000000682675 in __gnu_cxx::__verbose_terminate_handler () at ../../.././libstdc++-v3/libsupc++/vterminate.cc:95
#3 0x000000000063a806 in __cxxabiv1::__terminate (handler=) at ../../.././libstdc++-v3/libsupc++/eh_terminate.cc:38
#4 0x000000000063a833 in std::terminate () at ../../.././libstdc++-v3/libsupc++/eh_terminate.cc:48
#5 0x000000000063ad5f in __cxxabiv1::__cxa_pure_virtual () at ../../.././libstdc++-v3/libsupc++/pure.cc:50
#6 0x0000000000816fea in FindMethodPropertyByURIImpl (unresolved_path=0x7f571003b240, server=0x3d19a40, uri_path=...)
at src/brpc/policy/http_rpc_protocol.cpp:802
#7 brpc::policy::FindMethodPropertyByURI (uri_path=..., server=0x3d19a40, unresolved_path=0x7f571003b240)
at src/brpc/policy/http_rpc_protocol.cpp:842
#8 0x000000000081aecc in brpc::policy::ProcessHttpRequest (msg=0x7f57100227a0) at src/brpc/policy/http_rpc_protocol.cpp:1150
#9 0x00000000007d2aca in brpc::ProcessInputMessage (void_arg=void_arg@entry=0x7f57100227a0) at src/brpc/input_messenger.cpp:132
#10 0x00000000007d3ad4 in operator() (this=, last_msg=0x7f57100227a0) at src/brpc/input_messenger.cpp:138
#11 brpc::InputMessenger::OnNewMessages (m=0x7f570c01ac80) at /usr/local/include/c++/4.8.4/bits/unique_ptr.h:184
#12 0x00000000006c4a1d in brpc::Socket::ProcessEvent (arg=0x7f570c01ac80) at src/brpc/socket.cpp:1051
#13 0x000000000077d5fa in bthread::TaskGroup::task_runner (skip_remained=) at src/bthread/task_group.cpp:297
#14 0x000000000076b811 in bthread_make_fcontext ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions