[C++][FlightRPC] Support Unloading For Arrow Libraries Used by Flight SQL ODBC in MSVC
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the enhancement requested
Add the unloading support for Arrow Libraries Used by Flight SQL ODBC in MSVC platforms. These libraries are:
- Arrow Compute
- Arrow Flight
- Arrow Flight SQL
Currently, we are seeing segmentation fault errors occurring during the unload of Arrow.DLL, it is due to the Arrow Compute library.
Log:
```
> arrow.dll!std::_Ref_count_base::_Decref() Line 1160 C++
arrow.dll!std::_Ptr_base::_Decref() Line 1385 C++
arrow.dll!std::shared_ptr::~shared_ptr() Line 1690 C++
arrow.dll!std::pair>::~pair>() C++
arrow.dll!std::pair>::`scalar deleting destructor'(unsigned int) C++
arrow.dll!std::destroy_at>>(std::pair> * const _Location) Line 337 C++
arrow.dll!std::_Default_allocator_traits>,void *>>>::destroy>>(std::allocator>,void *>> & __formal, std::pair> * const _Ptr) Line 739 C++
arrow.dll!std::_List_node>,void *>::_Freenode>,void *>>>(std::allocator>,void *>> & _Al, std::_List_node>,void *> * _Ptr) Line 318 C++
arrow.dll!std::_List_node>,void *>::_Free_non_head>,void *>>>(std::allocator>,void *>> & _Al, std::_List_node>,void *> * _Head) Line 329 C++
arrow.dll!std::list>,std::allocator>>>::_Tidy() Line 1519 C++
arrow.dll!std::list>,std::allocator>>>::~list>,std::allocator>>>() Line 1063 C++
arrow.dll!std::_Hash,std::_Uhash_compare,std::equal_to>,std::allocator>>,0>>::~_Hash,std::_Uhash_compare,std::equal_to>,std::allocator>>,0>>() C++
arrow.dll!std::unordered_map,std::hash,std::equal_to,std::allocator>>>::~unordered_map,std::hash,std::equal_to,std::allocator>>>() C++
arrow.dll!arrow::compute::FunctionRegistry::FunctionRegistryImpl::~FunctionRegistryImpl() Line 40 C++
arrow.dll!arrow::compute::FunctionRegistry::FunctionRegistryImpl::`scalar deleting destructor'(unsigned int) C++
arrow.dll!std::default_delete::operator()(arrow::compute::FunctionRegistry::FunctionRegistryImpl * _Ptr) Line 3309 C++
arrow.dll!std::unique_ptr>::~unique_ptr>() Line 3427 C++
arrow.dll!arrow::compute::FunctionRegistry::~FunctionRegistry() Line 230 C++
arrow.dll!arrow::compute::FunctionRegistry::`scalar deleting destructor'(unsigned int) C++
arrow.dll!std::default_delete::operator()(arrow::compute::FunctionRegistry * _Ptr) Line 3309 C++
arrow.dll!std::unique_ptr>::~unique_ptr>() Line 3427 C++
arrow.dll!`arrow::compute::GetFunctionRegistry'::`2'::`dynamic atexit destructor for 'g_registry''() C++
ucrtbased.dll!_execute_onexit_table::__l2::() Line 206 C++
ucrtbased.dll!__crt_seh_guarded_call::operator()(void),int (void) &,void (void)>(__acrt_lock_and_call::__l2::void (void) && setup, _execute_onexit_table::__l2::int (void) & action, __acrt_lock_and_call::__l2::void (void) && cleanup) Line 204 C++
ucrtbased.dll!__acrt_lock_and_call(void)>(const __acrt_lock_id lock_id, _execute_onexit_table::__l2::int (void) && action) Line 983 C++
ucrtbased.dll!_execute_onexit_table(_onexit_table_t * table) Line 231 C++
arrow.dll!__scrt_dllmain_uninitialize_c() Line 398 C++
arrow.dll!dllmain_crt_process_detach(const bool is_terminating) Line 182 C++
arrow.dll!dllmain_crt_dispatch(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 220 C++
arrow.dll!dllmain_dispatch(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 293 C++
arrow.dll!_DllMainCRTStartup(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 335 C++
ntdll.dll!LdrpCallInitRoutineInternal() Unknown
ntdll.dll!LdrpCallInitRoutine() Unknown
ntdll.dll!LdrShutdownProcess() Unknown
ntdll.dll!RtlExitUserProcess() Unknown
kernel32.dll!ExitProcessImplementation() Unknown
ucrtbased.dll!exit_or_terminate_process(const unsigned int return_code, bool should_call_terminate_proc) Line 142 C++
ucrtbased.dll!common_exit(const int return_code, const _crt_exit_cleanup_mode cleanup_mode, const _crt_exit_return_mode return_mode) Line 288 C++
ucrtbased.dll!exit(int return_code) Line 302 C++
arrow-flight-sql-odbc-test.exe!__scrt_common_main_seh() Line 295 C++
arrow-flight-sql-odbc-test.exe!__scrt_common_main() Line 331 C++
arrow-flight-sql-odbc-test.exe!mainCRTStartup(void * __formal) Line 17 C++
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown
```
### Component(s)
FlightRPC, C++
Contributor guide
Assessment
This issue has not been assessed yet.