linrrzqqq opened a new pull request, #61196:
URL: https://github.com/apache/doris/pull/61196
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
When `enable_python_udf_support` is not set to true, a null pointer
dereference occurs when invoking helper commands (`SHOW PYTHON VERSION/
PACKAGES IN`).
```text
/home/zcp/repo_center/doris_master/doris/be/src/udf/python/python_env.cpp:305:38:
runtime error: member call on null pointer of type 'doris::PythonEnvScanner'
#0 0x559edede162c in doris::PythonVersionManager::env_infos_to_thrift()
const
/home/zcp/repo_center/doris_master/doris/be/src/udf/python/python_env.cpp:305:38
#1 0x559ede63acd4 in
doris::BaseBackendService::get_python_envs(std::vector>&)
/home/zcp/repo_center/doris_master/doris/be/src/service/backend_service.cpp:1316:47
#2 0x559edf99796a in
doris::BackendServiceProcessor::process_get_python_envs(int,
apache::thrift::protocol::TProtocol*, apache::thrift::protocol::TProtocol*,
void*)
/home/zcp/repo_center/doris_master/doris/gensrc/build/gen_cpp/BackendService.cpp:7789:13
#3 0x559edf94a69c in
doris::BackendServiceProcessor::dispatchCall(apache::thrift::protocol::TProtocol*,
apache::thrift::protocol::TProtocol*, std::__cxx11::basic_string,
std::allocator> const&, int, void*)
/home/zcp/repo_center/doris_master/doris/gensrc/build/gen_cpp/BackendService.cpp:6466:3
#4 0x559eac6bad06 in
apache::thrift::TDispatchProcessor::process(std::shared_ptr, std::shared_ptr,
void*)
/home/zcp/repo_center/doris_master/doris/thirdparty/installed/include/thrift/TDispatchProcessor.h:121:12
#5 0x559ee47c071a in apache::thrift::server::TConnectedClient::run()
(/mnt/hdd01/ci/doris-deploy-master-local/be/lib/doris_be+0x8a1c871a)
#6 0x559ee47c1a45 in
apache::thrift::server::TThreadedServer::TConnectedClientRunner::run()
(/mnt/hdd01/ci/doris-deploy-master-local/be/lib/doris_be+0x8a1c9a45)
#7 0x559ee47c557f in
apache::thrift::concurrency::Thread::threadMain(std::shared_ptr)
(/mnt/hdd01/ci/doris-deploy-master-local/be/lib/doris_be+0x8a1cd57f)
#8 0x559ee47c52a5 in void std::__invoke_impl),
std::shared_ptr>(std::__invoke_other, void (*&&)(std::shared_ptr),
std::shared_ptr&&)
(/mnt/hdd01/ci/doris-deploy-master-local/be/lib/doris_be+0x8a1cd2a5)
#9 0x559ee47c521c in std::__invoke_result), std::shared_ptr>::type
std::__invoke), std::shared_ptr>(void (*&&)(std::shared_ptr),
std::shared_ptr&&)
(/mnt/hdd01/ci/doris-deploy-master-local/be/lib/doris_be+0x8a1cd21c)
#10 0x559ee47c51f1 in void std::thread::_Invoker),
std::shared_ptr>>::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>)
(/mnt/hdd01/ci/doris-deploy-master-local/be/lib/doris_be+0x8a1cd1f1)
#11 0x559ee47c51b4 in std::thread::_Invoker),
std::shared_ptr>>::operator()()
(/mnt/hdd01/ci/doris-deploy-master-local/be/lib/doris_be+0x8a1cd1b4)
#12 0x559ee47c4fd8 in std::thread::_State_impl),
std::shared_ptr>>>::_M_run()
(/mnt/hdd01/ci/doris-deploy-master-local/be/lib/doris_be+0x8a1ccfd8)
#13 0x559ef61b5f3f in execute_native_thread_routine archive64.c
#14 0x559eac535d26 in asan_thread_start(void*)
(/mnt/hdd01/ci/doris-deploy-master-local/be/lib/doris_be+0x51f3dd26)
#15 0x7fcba62bfac2 in start_thread nptl/pthread_create.c:442:8
#16 0x7fcba635184f misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
/home/zcp/repo_center/doris_master/doris/be/src/udf/python/python_env.cpp:305:38
```
now:
```text
Doris> show python packages in '3.19.18';
ERROR 1105 (HY000): errCode = 2, detailMessage = Failed to get python
packages from any backend: [E42] Set 'python_venv_interpreter_paths' in be.conf
to enable PythonUDF feature
Doris> show python versions;
ERROR 1105 (HY000): errCode = 2, detailMessage = Failed to get python envs
from any backend: [E-236] Set 'python_venv_interpreter_paths' in be.conf to
enable PythonUDF feature
```
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should
merge into -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]