zanmato1984 opened a new issue, #40863: URL: https://github.com/apache/arrow/issues/40863
### Describe the bug, including details regarding any error messages, version, and platform. I'm on Intel Mac using Apple Clang, building arrow with TSAN using the following command: `cmake .. --preset ninja-debug -DARROW_USE_TSAN=ON -DARROW_JEMALLOC=OFF -DARROW_MIMALLOC=OFF` Get link error: ``` [build] [1/1] Linking CXX shared module debug/libarrow_filesystem_example.so [build] FAILED: debug/libarrow_filesystem_example.so [build] : && /Library/Developer/CommandLineTools/usr/bin/c++ -fno-aligned-new -Qunused-arguments -fcolor-diagnostics -Wall -Wextra -Wdocumentation -Wshorten-64-to-32 -Wno-missing-braces -Wno-unused-parameter -Wno-constant-logical-operand -Wno-return-stack-address -Wdate-time -Wno-unknown-warning-option -Wno-pass-failed -msse4.2 -fsanitize-blacklist=/Users/zanmato/dev/arrow/cpp/build-support/sanitizer-disallowed-entries.txt -g -Werror -O0 -ggdb -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk -bundle -Wl,-headerpad_max_install_names -o debug/libarrow_filesystem_example.so src/arrow/testing/CMakeFiles/arrow_filesystem_example.dir/examplefs.cc.o -Wl,-rpath,/Users/zanmato/dev/arrow/cpp/out/build/scalar-race/debug debug/libarrow_testing.1600.0.0.dylib /usr/local/lib/libgmock.a /usr/local/lib/libgtest_main.a debug/libarrow.1600.0.0.dylib /usr/local/lib/libgtest.a && : [build] ld: Undefined symbols: [build] ___tsan_func_entry, referenced from: [build] _arrow_filesystem_get_registry in examplefs.cc.o [build] std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_string[abi:v160006]<std::nullptr_t>(char const*) in examplefs.cc.o [build] std::__1::function<arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>::function<arrow::fs::$_0, void>(arrow::fs::$_0) in examplefs.cc.o [build] std::__1::function<void ()>::function[abi:v160006]() in examplefs.cc.o [build] std::__1::function<void ()>::~function() in examplefs.cc.o [build] std::__1::function<arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>::~function() in examplefs.cc.o [build] std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_string[abi:v160006]<std::nullptr_t>(char const*) in examplefs.cc.o [build] ... [build] ___tsan_func_exit, referenced from: [build] _arrow_filesystem_get_registry in examplefs.cc.o [build] _arrow_filesystem_get_registry in examplefs.cc.o [build] std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_string[abi:v160006]<std::nullptr_t>(char const*) in examplefs.cc.o [build] std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_string[abi:v160006]<std::nullptr_t>(char const*) in examplefs.cc.o [build] std::__1::function<arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>::function<arrow::fs::$_0, void>(arrow::fs::$_0) in examplefs.cc.o [build] std::__1::function<arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>::function<arrow::fs::$_0, void>(arrow::fs::$_0) in examplefs.cc.o [build] std::__1::function<void ()>::function[abi:v160006]() in examplefs.cc.o [build] ... [build] ___tsan_init, referenced from: [build] _tsan.module_ctor in examplefs.cc.o [build] ___tsan_memcpy, referenced from: [build] std::__1::__compressed_pair<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>>::__compressed_pair[abi:v160006]<arrow::fs::$_0&&, std::__1::allocator<arrow::fs::$_0>&&>(std::__1::piecewise_construct_t, std::__1::tuple<arrow::fs::$_0&&>, std::__1::tuple<std::__1::allocator<arrow::fs::$_0>&&>) in examplefs.cc.o [build] std::__1::__compressed_pair<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>>::__compressed_pair[abi:v160006]<arrow::fs::$_0&&, std::__1::allocator<arrow::fs::$_0>&&>(std::__1::piecewise_construct_t, std::__1::tuple<arrow::fs::$_0&&>, std::__1::tuple<std::__1::allocator<arrow::fs::$_0>&&>) in examplefs.cc.o [build] std::__1::__compressed_pair_elem<std::__1::__allocator_destructor<std::__1::allocator<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>>>, 1, false>::__compressed_pair_elem[abi:v160006]<std::__1::__allocator_destructor<std::__1::allocator<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>>>, void>(std::__1::__allocator_destructor<std::__1::allocator<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri con st&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>>>&&) in examplefs.cc.o [build] std::__1::__compressed_pair<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>>::__compressed_pair[abi:v160006]<arrow::fs::$_0 const&, std::__1::allocator<arrow::fs::$_0>&&>(std::__1::piecewise_construct_t, std::__1::tuple<arrow::fs::$_0 const&>, std::__1::tuple<std::__1::allocator<arrow::fs::$_0>&&>) in examplefs.cc.o [build] std::__1::__compressed_pair<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>>::__compressed_pair[abi:v160006]<arrow::fs::$_0 const&, std::__1::allocator<arrow::fs::$_0>&&>(std::__1::piecewise_construct_t, std::__1::tuple<arrow::fs::$_0 const&>, std::__1::tuple<std::__1::allocator<arrow::fs::$_0>&&>) in examplefs.cc.o [build] std::__1::__compressed_pair<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>>::__compressed_pair[abi:v160006]<arrow::fs::$_0 const&, std::__1::allocator<arrow::fs::$_0> const&>(std::__1::piecewise_construct_t, std::__1::tuple<arrow::fs::$_0 const&>, std::__1::tuple<std::__1::allocator<arrow::fs::$_0> const&>) in examplefs.cc.o [build] std::__1::__compressed_pair<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>>::__compressed_pair[abi:v160006]<arrow::fs::$_0 const&, std::__1::allocator<arrow::fs::$_0> const&>(std::__1::piecewise_construct_t, std::__1::tuple<arrow::fs::$_0 const&>, std::__1::tuple<std::__1::allocator<arrow::fs::$_0> const&>) in examplefs.cc.o [build] ... [build] ___tsan_memset, referenced from: [build] std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::__default_init[abi:v160006]() in examplefs.cc.o [build] ___tsan_read1, referenced from: [build] testing::AssertionResult::operator bool() const in examplefs.cc.o [build] std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::__is_long[abi:v160006]() const in examplefs.cc.o [build] std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::__get_short_size[abi:v160006]() const in examplefs.cc.o [build] ___tsan_read16, referenced from: [build] std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::operator std::__1::basic_string_view<char, std::__1::char_traits<char>>[abi:v160006]() const in examplefs.cc.o [build] ___tsan_read8, referenced from: [build] std::__1::__tuple_leaf<0ul, arrow::fs::$_0&&, false>::get[abi:v160006]() in examplefs.cc.o [build] std::__1::__tuple_leaf<0ul, std::__1::allocator<arrow::fs::$_0>&&, false>::get[abi:v160006]() in examplefs.cc.o [build] std::__1::unique_ptr<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>, std::__1::__allocator_destructor<std::__1::allocator<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>>>>::get[abi:v160006]() const in examplefs.cc.o [build] std::__1::unique_ptr<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>, std::__1::__allocator_destructor<std::__1::allocator<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>>>>::release[abi:v160006]() in examplefs.cc.o [build] std::__1::__compressed_pair_elem<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>*, 0, false>::__compressed_pair_elem[abi:v160006]<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>*&, void>(std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>*&) in examplefs.cc.o [build] std::__1::__tuple_leaf<0ul, arrow::fs::$_0 const&, false>::get[abi:v160006]() in examplefs.cc.o [build] std::__1::unique_ptr<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>, std::__1::__allocator_destructor<std::__1::allocator<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>>>>::reset[abi:v160006](std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>*) in examplefs.cc.o [build] ... [build] ___tsan_vptr_read, referenced from: [build] std::__1::basic_iostream<char, std::__1::char_traits<char>>::basic_iostream[abi:v160006](std::__1::basic_streambuf<char, std::__1::char_traits<char>>*) in examplefs.cc.o [build] std::__1::basic_istream<char, std::__1::char_traits<char>>::basic_istream[abi:v160006](std::__1::basic_streambuf<char, std::__1::char_traits<char>>*) in examplefs.cc.o [build] std::__1::basic_istream<char, std::__1::char_traits<char>>::basic_istream[abi:v160006](std::__1::basic_streambuf<char, std::__1::char_traits<char>>*) in examplefs.cc.o [build] std::__1::basic_ostream<char, std::__1::char_traits<char>>::basic_ostream[abi:v160006]() in examplefs.cc.o [build] std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char>>::~basic_stringstream() in examplefs.cc.o [build] virtual thunk to std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char>>::~basic_stringstream() in examplefs.cc.o [build] std::__1::default_delete<std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char>>>::operator()[abi:v160006](std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char>>*) const in examplefs.cc.o [build] ... [build] ___tsan_vptr_update, referenced from: [build] std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>::__func[abi:v160006](arrow::fs::$_0&&, std::__1::allocator<arrow::fs::$_0>&&) in examplefs.cc.o [build] std::__1::__function::__base<arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>::__base[abi:v160006]() in examplefs.cc.o [build] std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>::__func[abi:v160006](arrow::fs::$_0 const&, std::__1::allocator<arrow::fs::$_0>&&) in examplefs.cc.o [build] std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>::__func[abi:v160006](arrow::fs::$_0 const&, std::__1::allocator<arrow::fs::$_0> const&) in examplefs.cc.o [build] std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_stringstream[abi:v160006]() in examplefs.cc.o [build] std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_stringstream[abi:v160006]() in examplefs.cc.o [build] std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_stringstream[abi:v160006]() in examplefs.cc.o [build] std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_stringstream[abi:v160006]() in examplefs.cc.o [build] std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_stringstream[abi:v160006]() in examplefs.cc.o [build] std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_stringstream[abi:v160006]() in examplefs.cc.o [build] ... [build] ___tsan_write4, referenced from: [build] std::__1::basic_ios<char, std::__1::char_traits<char>>::init[abi:v160006](std::__1::basic_streambuf<char, std::__1::char_traits<char>>*) in examplefs.cc.o [build] std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_stringbuf[abi:v160006](unsigned int) in examplefs.cc.o [build] ___tsan_write8, referenced from: [build] std::__1::__function::__value_func<arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>::__value_func[abi:v160006]<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>>(arrow::fs::$_0&&, std::__1::allocator<arrow::fs::$_0> const&) in examplefs.cc.o [build] std::__1::__function::__value_func<arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>::__value_func[abi:v160006]<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>>(arrow::fs::$_0&&, std::__1::allocator<arrow::fs::$_0> const&) in examplefs.cc.o [build] std::__1::__tuple_leaf<0ul, arrow::fs::$_0&&, false>::__tuple_leaf[abi:v160006]<arrow::fs::$_0, void>(arrow::fs::$_0&&) in examplefs.cc.o [build] std::__1::__tuple_leaf<0ul, std::__1::allocator<arrow::fs::$_0>&&, false>::__tuple_leaf[abi:v160006]<std::__1::allocator<arrow::fs::$_0>, void>(std::__1::allocator<arrow::fs::$_0>&&) in examplefs.cc.o [build] std::__1::unique_ptr<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>, std::__1::__allocator_destructor<std::__1::allocator<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>>>>::release[abi:v160006]() in examplefs.cc.o [build] std::__1::__allocator_destructor<std::__1::allocator<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>>>::__allocator_destructor[abi:v160006](std::__1::allocator<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>>&, unsigned long) in examplefs.cc.o [build] std::__1::__allocator_destructor<std::__1::allocator<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>>>::__allocator_destructor[abi:v160006](std::__1::allocator<std::__1::__function::__func<arrow::fs::$_0, std::__1::allocator<arrow::fs::$_0>, arrow::Result<std::__1::shared_ptr<arrow::fs::FileSystem>> (arrow::util::Uri const&, arrow::io::IOContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)>>&, unsigned long) in examplefs.cc.o [build] ... [build] clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` ### Component(s) C++ -- 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: issues-unsubscr...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org