-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[BugFix] Fix the bug of RuntimeState use_after_free #28055
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: trueeyu <[email protected]>
imay
approved these changes
Jul 27, 2023
[FE PR Coverage Check]😍 pass : 0 / 0 (0%) |
@Mergifyio backport branch-3.1 |
✅ Backports have been created
|
mergify bot
pushed a commit
that referenced
this pull request
Jul 27, 2023
Fixes [#3000](StarRocks/StarRocksTest#3000) ``` ==2390==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7f3c65102a14 at pc 0x00000a0c5def bp 0x7f3c65101c40 sp 0x7f3c65101c38 READ of size 4 at 0x7f3c65102a14 thread T197 (load_rpc) #0 0xa0c5dee in starrocks::RuntimeState::chunk_size() const /root/starrocks/be/src/runtime/runtime_state.h:123 #1 0xd0a9cdb in starrocks::ORCScanner::open() /root/starrocks/be/src/exec/orc_scanner.cpp:84 #2 0x12b6dcff in starrocks::PInternalServiceImplBase<doris::PBackendService>::_get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*) /root/starrocks/be/src/service/internal_service.cpp:818 #3 0x12b7a02f in starrocks::PInternalServiceImplBase<doris::PBackendService>::get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*)::{lambda()#1}::operator()() const /root/starrocks/be/src/service/internal_service.cpp:757 #4 0x12b89b89 in void std::__invoke_impl<void, starrocks::PInternalServiceImplBase<doris::PBackendService>::get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*)::{lambda()#1}&>(std::__invoke_other, starrocks::PInternalServiceImplBase<doris::PBackendService>::get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*)::{lambda()#1}&) /opt/gcc/usr/include/c++/10.3.0/bits/invoke.h:60 #5 0x12b87158 in std::enable_if<is_invocable_r_v<void, starrocks::PInternalServiceImplBase<doris::PBackendService>::get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*)::{lambda()#1}&>, std::enable_if>::type std::__invoke_r<void, starrocks::PInternalServiceImplBase<doris::PBackendService>::get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*)::{lambda()#1}&>(void&&, (starrocks::PInternalServiceImplBase<doris::PBackendService>::get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*)::{lambda()#1}&)...) /opt/gcc/usr/include/c++/10.3.0/bits/invoke.h:110 #6 0x12b83377 in std::_Function_handler<void (), starrocks::PInternalServiceImplBase<doris::PBackendService>::get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*)::{lambda()#1}>::_M_invoke(std::_Any_data const&) /opt/gcc/usr/include/c++/10.3.0/bits/std_function.h:291 #7 0x99f88bd in std::function<void ()>::operator()() const /opt/gcc/usr/include/c++/10.3.0/bits/std_function.h:622 #8 0xa436e73 in starrocks::FunctionRunnable::run() (/home/disk1/sr/be/lib/starrocks_be+0xa436e73) #9 0xa4339c8 in starrocks::ThreadPool::dispatch_thread() /root/starrocks/be/src/util/threadpool.cpp:553 #10 0xa450765 in void std::__invoke_impl<void, void (starrocks::ThreadPool::*&)(), starrocks::ThreadPool*&>(std::__invoke_memfun_deref, void (starrocks::ThreadPool::*&)(), starrocks::ThreadPool*&) /opt/gcc/usr/include/c++/10.3.0/bits/invoke.h:73 #11 0xa450250 in std::__invoke_result<void (starrocks::ThreadPool::*&)(), starrocks::ThreadPool*&>::type std::__invoke<void (starrocks::ThreadPool::*&)(), starrocks::ThreadPool*&>(void (starrocks::ThreadPool::*&)(), starrocks::ThreadPool*&) /opt/gcc/usr/include/c++/10.3.0/bits/invoke.h:95 #12 0xa44f199 in void std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /opt/gcc/usr/include/c++/10.3.0/functional:416 #13 0xa44e107 in void std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()>::operator()<, void>() /opt/gcc/usr/include/c++/10.3.0/functional:499 #14 0xa44bc61 in void std::__invoke_impl<void, std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()>&>(std::__invoke_other, std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()>&) (/home/disk1/sr/be/lib/starrocks_be+0xa44bc61) #15 0xa4485cf in std::enable_if<is_invocable_r_v<void, std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()>&>, void>::type std::__invoke_r<void, std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()>&>(std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()>&) /opt/gcc/usr/include/c++/10.3.0/bits/invoke.h:110 #16 0xa4448ba in std::_Function_handler<void (), std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()> >::_M_invoke(std::_Any_data const&) /opt/gcc/usr/include/c++/10.3.0/bits/std_function.h:291 #17 0x99f88bd in std::function<void ()>::operator()() const /opt/gcc/usr/include/c++/10.3.0/bits/std_function.h:622 #18 0xa41b326 in starrocks::Thread::supervise_thread(void*) /root/starrocks/be/src/util/thread.cpp:364 #19 0x7f3cc51b5ea4 in start_thread (/lib64/libpthread.so.0+0x7ea4) #20 0x7f3cc47d0b0c in clone (/lib64/libc.so.6+0xfeb0c) ``` Signed-off-by: trueeyu <[email protected]> (cherry picked from commit 9635e6e)
wanpengfei-git
pushed a commit
that referenced
this pull request
Jul 27, 2023
Fixes [#3000](StarRocks/StarRocksTest#3000) ``` ==2390==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7f3c65102a14 at pc 0x00000a0c5def bp 0x7f3c65101c40 sp 0x7f3c65101c38 READ of size 4 at 0x7f3c65102a14 thread T197 (load_rpc) #0 0xa0c5dee in starrocks::RuntimeState::chunk_size() const /root/starrocks/be/src/runtime/runtime_state.h:123 #1 0xd0a9cdb in starrocks::ORCScanner::open() /root/starrocks/be/src/exec/orc_scanner.cpp:84 #2 0x12b6dcff in starrocks::PInternalServiceImplBase<doris::PBackendService>::_get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*) /root/starrocks/be/src/service/internal_service.cpp:818 #3 0x12b7a02f in starrocks::PInternalServiceImplBase<doris::PBackendService>::get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*)::{lambda()#1}::operator()() const /root/starrocks/be/src/service/internal_service.cpp:757 #4 0x12b89b89 in void std::__invoke_impl<void, starrocks::PInternalServiceImplBase<doris::PBackendService>::get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*)::{lambda()#1}&>(std::__invoke_other, starrocks::PInternalServiceImplBase<doris::PBackendService>::get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*)::{lambda()#1}&) /opt/gcc/usr/include/c++/10.3.0/bits/invoke.h:60 #5 0x12b87158 in std::enable_if<is_invocable_r_v<void, starrocks::PInternalServiceImplBase<doris::PBackendService>::get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*)::{lambda()#1}&>, std::enable_if>::type std::__invoke_r<void, starrocks::PInternalServiceImplBase<doris::PBackendService>::get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*)::{lambda()#1}&>(void&&, (starrocks::PInternalServiceImplBase<doris::PBackendService>::get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*)::{lambda()#1}&)...) /opt/gcc/usr/include/c++/10.3.0/bits/invoke.h:110 #6 0x12b83377 in std::_Function_handler<void (), starrocks::PInternalServiceImplBase<doris::PBackendService>::get_file_schema(google::protobuf::RpcController*, starrocks::PGetFileSchemaRequest const*, starrocks::PGetFileSchemaResult*, google::protobuf::Closure*)::{lambda()#1}>::_M_invoke(std::_Any_data const&) /opt/gcc/usr/include/c++/10.3.0/bits/std_function.h:291 #7 0x99f88bd in std::function<void ()>::operator()() const /opt/gcc/usr/include/c++/10.3.0/bits/std_function.h:622 #8 0xa436e73 in starrocks::FunctionRunnable::run() (/home/disk1/sr/be/lib/starrocks_be+0xa436e73) #9 0xa4339c8 in starrocks::ThreadPool::dispatch_thread() /root/starrocks/be/src/util/threadpool.cpp:553 #10 0xa450765 in void std::__invoke_impl<void, void (starrocks::ThreadPool::*&)(), starrocks::ThreadPool*&>(std::__invoke_memfun_deref, void (starrocks::ThreadPool::*&)(), starrocks::ThreadPool*&) /opt/gcc/usr/include/c++/10.3.0/bits/invoke.h:73 #11 0xa450250 in std::__invoke_result<void (starrocks::ThreadPool::*&)(), starrocks::ThreadPool*&>::type std::__invoke<void (starrocks::ThreadPool::*&)(), starrocks::ThreadPool*&>(void (starrocks::ThreadPool::*&)(), starrocks::ThreadPool*&) /opt/gcc/usr/include/c++/10.3.0/bits/invoke.h:95 #12 0xa44f199 in void std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /opt/gcc/usr/include/c++/10.3.0/functional:416 #13 0xa44e107 in void std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()>::operator()<, void>() /opt/gcc/usr/include/c++/10.3.0/functional:499 #14 0xa44bc61 in void std::__invoke_impl<void, std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()>&>(std::__invoke_other, std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()>&) (/home/disk1/sr/be/lib/starrocks_be+0xa44bc61) #15 0xa4485cf in std::enable_if<is_invocable_r_v<void, std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()>&>, void>::type std::__invoke_r<void, std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()>&>(std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()>&) /opt/gcc/usr/include/c++/10.3.0/bits/invoke.h:110 #16 0xa4448ba in std::_Function_handler<void (), std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()> >::_M_invoke(std::_Any_data const&) /opt/gcc/usr/include/c++/10.3.0/bits/std_function.h:291 #17 0x99f88bd in std::function<void ()>::operator()() const /opt/gcc/usr/include/c++/10.3.0/bits/std_function.h:622 #18 0xa41b326 in starrocks::Thread::supervise_thread(void*) /root/starrocks/be/src/util/thread.cpp:364 #19 0x7f3cc51b5ea4 in start_thread (/lib64/libpthread.so.0+0x7ea4) #20 0x7f3cc47d0b0c in clone (/lib64/libc.so.6+0xfeb0c) ``` Signed-off-by: trueeyu <[email protected]> (cherry picked from commit 9635e6e)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3000
What type of PR is this:
Checklist:
Bugfix cherry-pick branch check: