Skip to content

[Bug](http-api) fix core dump on API check_rpc_channel coz exec_env not initialized #39519

@Vallishp

Description

@Vallishp

Search before asking

  • I had searched in the issues and found no similar issues.

Version

master

What's Wrong?

when invoke http API be crashed.
curl http://127.0.0.1:8040/api/check_rpc_channel/127.0.0.1/8060/1024000
added new regression based on #38375 learning

Thread 1116 "EvHttpServer [w" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 1225670]
doris::ExecEnv::brpc_internal_client_cache (this=0x7d64) at /root/doris/workspace/doris/be/src/runtime/exec_env.h:221
221 return internal_client_cache;
(gdb) bt
#0 doris::ExecEnv::brpc_internal_client_cache (this=0x7d64) at /root/doris/workspace/doris/be/src/runtime/exec_env.h:221
#1 0x000064cfa0aea205 in doris::CheckRPCChannelAction::handle (this=0x64cfed019b00, req=0x64cfeb6c2a20) at /root/doris/workspace/doris/be/src/http/action/check_rpc_channel_action.cpp:84
#2 0x000064cfa0b8a235 in doris::on_request (ev_req=0x64cfb91190e0, arg=0x64cfeb524400) at /root/doris/workspace/doris/be/src/http/ev_http_server.cpp:68
#3 0x000064cfb046be66 in ?? ()
#4 0x000064cfb046b5c3 in ?? ()
#5 0x000064cfb0450ab6 in bufferevent_run_readcb
()
#6 0x000064cfb046c3cf in ?? ()
#7 0x000064cfb045cb09 in ?? ()
#8 0x000064cfb045930f in event_base_loop ()
#9 0x000064cfa0b8a131 in doris::EvHttpServer::start()::$_0::operator()() const (this=0x64cfed502798) at /root/doris/workspace/doris/be/src/http/ev_http_server.cpp:139
#10 0x000064cfa0b89da5 in std::__invoke_impl<void, doris::EvHttpServer::start()::$_0&>(std::__invoke_other, doris::EvHttpServer::start()::$_0&) (__f=...)
at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61
#11 0x000064cfa0b89d55 in std::__invoke_r<void, doris::EvHttpServer::start()::$_0&>(doris::EvHttpServer:

What You Expected?

No crash and API should be success.

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions