-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
ALL
-
Dev Platform 2020-07-13, Dev Platform 2020-07-27
-
0
The printStackTrace function allocates memory and is called as part of signal handlers. ThreadSanitizer warns about any calls to malloc/free and new/delete as part of signal handling. These memory allocation calls are expected and the warning should be suppressed in etc/tsan.suppressions.
Here is my proposed list from ad-hoc testing. The allocations are from many places: boost::log, RamLog, the backtrace code, BSONObj, json escaping, etc.
signal:boost::log::v2s_mt_posix::aux::stateless_allocator<unsigned char>::allocate signal:boost::log::v2s_mt_posix::aux::stateless_allocator<unsigned char>::deallocate signal:boost::log::v2s_mt_posix::aux::stateless_allocator<char>::allocate signal:boost::log::v2s_mt_posix::aux::stateless_allocator<char>::deallocate signal:__gnu_cxx::new_allocator<boost::shared_ptr<boost::log::v2s_mt_posix::sinks::sink> >::allocate signal:__gnu_cxx::new_allocator<boost::shared_ptr<boost::log::v2s_mt_posix::sinks::sink> >::deallocate signal:mongo::mongoMalloc signal:mongo::intrusive_ptr_release signal:std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign signal:__gnu_cxx::new_allocator<boost::shared_ptr<boost::log::v2s_mt_posix::sinks::sink> >::deallocate signal:std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_mutate signal:mongo::mongoRealloc signal:__gnu_cxx::new_allocator<unsigned long>::allocate signal:__gnu_cxx::new_allocator<unsigned long>::deallocate signal:__gnu_cxx::new_allocator<mongo::BSONElement>::allocate signal:__gnu_cxx::new_allocator<mongo::BSONElement>::deallocate signal:__gnu_cxx::new_allocator<char>::allocate signal:__gnu_cxx::new_allocator<char>::deallocate signal:mongo::logv2::(anonymous namespace)::JSONValueExtractor::storeUnquoted signal:mongo::StackTraceAddressMetadata::BaseAndName::~BaseAndName signal:mongo::stack_trace_detail::(anonymous namespace)::printStackTraceImpl
- is related to
-
SERVER-48622 stacktrace_test segfaults with TSAN
- Open
- related to
-
SERVER-49346 Re-enable use of libunwind with TSAN
- Closed